diff --git a/experimental/ha-testing/src/integration-test/kotlin/net/corda/instrumentation/byteman/InstrumentationTest.kt b/experimental/ha-testing/src/integration-test/kotlin/net/corda/instrumentation/byteman/InstrumentationTest.kt index 6f2d49cab9..6905f779cc 100644 --- a/experimental/ha-testing/src/integration-test/kotlin/net/corda/instrumentation/byteman/InstrumentationTest.kt +++ b/experimental/ha-testing/src/integration-test/kotlin/net/corda/instrumentation/byteman/InstrumentationTest.kt @@ -19,6 +19,7 @@ import net.corda.testing.core.ALICE_NAME import net.corda.testing.core.DUMMY_NOTARY_NAME import net.corda.testing.core.singleIdentity import net.corda.testing.driver.NodeHandle +import net.corda.testing.driver.NodeParameters import net.corda.testing.driver.OutOfProcess import net.corda.testing.driver.internal.incrementalPortAllocation import net.corda.testing.internal.IntegrationTest @@ -86,7 +87,7 @@ class InstrumentationTest : IntegrationTest() { ) { bytemanPort = portAllocation.nextPort() - alice = startNode(providedName = ALICE_NAME, rpcUsers = listOf(testUser), bytemanPort = bytemanPort).getOrThrow() + alice = startNode(NodeParameters(providedName = ALICE_NAME, rpcUsers = listOf(testUser)), bytemanPort = bytemanPort).getOrThrow() raftNotaryIdentity = defaultNotaryIdentity notaryNodes = defaultNotaryHandle.nodeHandles.getOrThrow().map { it as OutOfProcess } @@ -203,7 +204,7 @@ ENDRULE // Restart node alice.stop() // this should perform un-registration in the NetworkMap - alice = startNode(providedName = ALICE_NAME, rpcUsers = listOf(testUser), bytemanPort = bytemanPort).getOrThrow() + alice = startNode(NodeParameters(providedName = ALICE_NAME, rpcUsers = listOf(testUser)), bytemanPort = bytemanPort).getOrThrow() aliceProxy = connectRpc(alice) // Check that all 11 transactions are present diff --git a/experimental/ha-testing/src/integration-test/kotlin/net/corda/instrumentation/byteman/SystematicTerminationTest.kt b/experimental/ha-testing/src/integration-test/kotlin/net/corda/instrumentation/byteman/SystematicTerminationTest.kt index c31c444e47..607c5e8107 100644 --- a/experimental/ha-testing/src/integration-test/kotlin/net/corda/instrumentation/byteman/SystematicTerminationTest.kt +++ b/experimental/ha-testing/src/integration-test/kotlin/net/corda/instrumentation/byteman/SystematicTerminationTest.kt @@ -21,6 +21,7 @@ import net.corda.node.services.statemachine.ActionExecutorImpl import net.corda.testing.core.ALICE_NAME import net.corda.testing.core.singleIdentity import net.corda.testing.driver.NodeHandle +import net.corda.testing.driver.NodeParameters import net.corda.testing.driver.OutOfProcess import net.corda.testing.driver.internal.incrementalPortAllocation import net.corda.testing.internal.IntegrationTest @@ -112,7 +113,7 @@ class SystematicTerminationTest(private val terminationData: TerminationData) : //, isDebug = true ) { bytemanPort = portAllocation.nextPort() - alice = startNode(providedName = ALICE_NAME, rpcUsers = listOf(testUser), bytemanPort = bytemanPort).getOrThrow() + alice = startNode(NodeParameters(providedName = ALICE_NAME, rpcUsers = listOf(testUser)), bytemanPort = bytemanPort).getOrThrow() raftNotaryIdentity = defaultNotaryIdentity aliceProxy = connectRpc(alice) @@ -192,7 +193,7 @@ ENDRULE // Restart node alice.stop() // this should perform un-registration in the NetworkMap - alice = startNode(providedName = ALICE_NAME, rpcUsers = listOf(testUser), bytemanPort = bytemanPort).getOrThrow() + alice = startNode(NodeParameters(providedName = ALICE_NAME, rpcUsers = listOf(testUser)), bytemanPort = bytemanPort).getOrThrow() aliceProxy = connectRpc(alice) logger.info("Node re-started successfully") 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 f805749189..3b18f35251 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 @@ -194,7 +194,9 @@ class DriverDSLImpl( } } - override fun startNode(parameters: NodeParameters): CordaFuture { + override fun startNode(parameters: NodeParameters): CordaFuture = startNode(parameters, bytemanPort = null) + + override fun startNode(parameters: NodeParameters, bytemanPort: Int?): CordaFuture { val p2pAddress = portAllocation.nextHostAndPort() // TODO: Derive name from the full picked name, don't just wrap the common name val name = parameters.providedName ?: CordaX500Name("${oneOf(names).organisation}-${p2pAddress.port}", "London", "GB") @@ -978,16 +980,7 @@ interface InternalDriverDSL : DriverDSL { fun shutdown() fun startNode( - defaultParameters: NodeParameters = NodeParameters(), - providedName: CordaX500Name? = defaultParameters.providedName, - rpcUsers: List = defaultParameters.rpcUsers, - verifierType: VerifierType = defaultParameters.verifierType, - customOverrides: Map = defaultParameters.customOverrides, - startInSameProcess: Boolean? = defaultParameters.startInSameProcess, - maximumHeapSize: String = defaultParameters.maximumHeapSize, - additionalCordapps: Collection = defaultParameters.additionalCordapps, - regenerateCordappsOnStart: Boolean = defaultParameters.regenerateCordappsOnStart, - flowOverrides: Map>, Class>> = emptyMap(), + parameters: NodeParameters = NodeParameters(), bytemanPort: Int? = null ): CordaFuture }