From 979aef1308aaa9c77ac41190d6b986401c00c655 Mon Sep 17 00:00:00 2001 From: Shams Asari Date: Tue, 20 Feb 2018 12:57:59 +0000 Subject: [PATCH] Removed DriverParameters.initialiseSerialization (#2572) --- .ci/api-current.txt | 11 +++++------ .../main/kotlin/net/corda/testing/driver/Driver.kt | 4 +--- .../net/corda/testing/node/internal/DriverDSLImpl.kt | 4 ++-- 3 files changed, 8 insertions(+), 11 deletions(-) diff --git a/.ci/api-current.txt b/.ci/api-current.txt index 672d74ef83..95f69464fb 100644 --- a/.ci/api-current.txt +++ b/.ci/api-current.txt @@ -3656,12 +3656,11 @@ public final class net.corda.testing.driver.Driver extends java.lang.Object ## public final class net.corda.testing.driver.DriverParameters extends java.lang.Object public () - public (boolean, java.nio.file.Path, net.corda.testing.driver.PortAllocation, net.corda.testing.driver.PortAllocation, Map, boolean, boolean, boolean, boolean, List, List, net.corda.testing.driver.JmxPolicy, net.corda.core.node.NetworkParameters) + public (boolean, java.nio.file.Path, net.corda.testing.driver.PortAllocation, net.corda.testing.driver.PortAllocation, Map, boolean, boolean, boolean, List, List, net.corda.testing.driver.JmxPolicy, net.corda.core.node.NetworkParameters) public final boolean component1() @org.jetbrains.annotations.NotNull public final List component10() - @org.jetbrains.annotations.NotNull public final List component11() - @org.jetbrains.annotations.NotNull public final net.corda.testing.driver.JmxPolicy component12() - @org.jetbrains.annotations.NotNull public final net.corda.core.node.NetworkParameters component13() + @org.jetbrains.annotations.NotNull public final net.corda.testing.driver.JmxPolicy component11() + @org.jetbrains.annotations.NotNull public final net.corda.core.node.NetworkParameters component12() @org.jetbrains.annotations.NotNull public final java.nio.file.Path component2() @org.jetbrains.annotations.NotNull public final net.corda.testing.driver.PortAllocation component3() @org.jetbrains.annotations.NotNull public final net.corda.testing.driver.PortAllocation component4() @@ -3669,8 +3668,8 @@ public final class net.corda.testing.driver.DriverParameters extends java.lang.O public final boolean component6() public final boolean component7() public final boolean component8() - public final boolean component9() - @org.jetbrains.annotations.NotNull public final net.corda.testing.driver.DriverParameters copy(boolean, java.nio.file.Path, net.corda.testing.driver.PortAllocation, net.corda.testing.driver.PortAllocation, Map, boolean, boolean, boolean, boolean, List, List, net.corda.testing.driver.JmxPolicy, net.corda.core.node.NetworkParameters) + @org.jetbrains.annotations.NotNull public final List component9() + @org.jetbrains.annotations.NotNull public final net.corda.testing.driver.DriverParameters copy(boolean, java.nio.file.Path, net.corda.testing.driver.PortAllocation, net.corda.testing.driver.PortAllocation, Map, boolean, boolean, boolean, List, List, net.corda.testing.driver.JmxPolicy, net.corda.core.node.NetworkParameters) public boolean equals(Object) @org.jetbrains.annotations.NotNull public final net.corda.testing.driver.PortAllocation getDebugPortAllocation() @org.jetbrains.annotations.NotNull public final java.nio.file.Path getDriverDirectory() diff --git a/testing/node-driver/src/main/kotlin/net/corda/testing/driver/Driver.kt b/testing/node-driver/src/main/kotlin/net/corda/testing/driver/Driver.kt index 1083dd0674..cf9d5f216d 100644 --- a/testing/node-driver/src/main/kotlin/net/corda/testing/driver/Driver.kt +++ b/testing/node-driver/src/main/kotlin/net/corda/testing/driver/Driver.kt @@ -156,7 +156,7 @@ fun driver(defaultParameters: DriverParameters = DriverParameters(), dsl: Dr ), coerce = { it }, dsl = dsl, - initialiseSerialization = defaultParameters.initialiseSerialization + initialiseSerialization = true ) } @@ -189,7 +189,6 @@ data class DriverParameters( val debugPortAllocation: PortAllocation = PortAllocation.Incremental(5005), val systemProperties: Map = emptyMap(), val useTestClock: Boolean = false, - val initialiseSerialization: Boolean = true, val startNodesInProcess: Boolean = false, val waitForAllNodesToFinish: Boolean = false, val notarySpecs: List = listOf(NotarySpec(DUMMY_NOTARY_NAME)), @@ -203,7 +202,6 @@ data class DriverParameters( fun withDebugPortAllocation(debugPortAllocation: PortAllocation): DriverParameters = copy(debugPortAllocation = debugPortAllocation) fun withSystemProperties(systemProperties: Map): DriverParameters = copy(systemProperties = systemProperties) fun withUseTestClock(useTestClock: Boolean): DriverParameters = copy(useTestClock = useTestClock) - fun withInitialiseSerialization(initialiseSerialization: Boolean): DriverParameters = copy(initialiseSerialization = initialiseSerialization) fun withStartNodesInProcess(startNodesInProcess: Boolean): DriverParameters = copy(startNodesInProcess = startNodesInProcess) fun withWaitForAllNodesToFinish(waitForAllNodesToFinish: Boolean): DriverParameters = copy(waitForAllNodesToFinish = waitForAllNodesToFinish) fun withNotarySpecs(notarySpecs: List): DriverParameters = copy(notarySpecs = notarySpecs) diff --git a/testing/node-driver/src/main/kotlin/net/corda/testing/node/internal/DriverDSLImpl.kt b/testing/node-driver/src/main/kotlin/net/corda/testing/node/internal/DriverDSLImpl.kt index e7cc449d84..846a9eea2f 100644 --- a/testing/node-driver/src/main/kotlin/net/corda/testing/node/internal/DriverDSLImpl.kt +++ b/testing/node-driver/src/main/kotlin/net/corda/testing/node/internal/DriverDSLImpl.kt @@ -952,7 +952,7 @@ fun genericDriver( driverDslWrapper: (DriverDSLImpl) -> D, coerce: (D) -> DI, dsl: DI.() -> A ): A { - val serializationEnv = setGlobalSerialization(defaultParameters.initialiseSerialization) + val serializationEnv = setGlobalSerialization(true) val driverDsl = driverDslWrapper( DriverDSLImpl( portAllocation = defaultParameters.portAllocation, @@ -1003,7 +1003,7 @@ fun internalDriver( debugPortAllocation: PortAllocation = DriverParameters().debugPortAllocation, systemProperties: Map = DriverParameters().systemProperties, useTestClock: Boolean = DriverParameters().useTestClock, - initialiseSerialization: Boolean = DriverParameters().initialiseSerialization, + initialiseSerialization: Boolean = true, startNodesInProcess: Boolean = DriverParameters().startNodesInProcess, waitForAllNodesToFinish: Boolean = DriverParameters().waitForAllNodesToFinish, notarySpecs: List = DriverParameters().notarySpecs,