From d481c55b8281327c5f62ab24864a5d52fd1f6aaf Mon Sep 17 00:00:00 2001 From: Viktor Kolomeyko Date: Mon, 9 Jul 2018 16:37:01 +0100 Subject: [PATCH] CORDA-1743: Remove `isDebug = true` from Node driver to speed-up integration tests execution. (#3535) * CORDA-1743: Remove `isDebug = true` from Node driver to speed-up integration tests execution. * CORDA-1743: Undo removal of "isDebug = true" from the test that specifically checks for this condition. * CORDA-1743: Address input from @shamsasari --- .../net/corda/client/rpc/FlowsExecutionModeRpcTest.kt | 2 +- .../kotlin/net/corda/node/BootTests.kt | 2 +- .../kotlin/net/corda/node/NodeUnloadHandlerTests.kt | 2 +- .../kotlin/net/corda/node/flows/FlowRetryTest.kt | 2 +- .../modes/draining/FlowsDrainingModeContentionTest.kt | 2 +- .../node/modes/draining/P2PFlowsDrainingModeTest.kt | 4 ++-- .../node/modes/draining/RpcFlowsDrainingModeTest.kt | 2 +- .../node/persistence/NodeStatePersistenceTests.kt | 4 ++-- .../kotlin/net/corda/node/services/rpc/RpcSslTest.kt | 8 ++++---- .../node/services/statemachine/HardRestartTest.kt | 8 ++++---- .../net/corda/attachmentdemo/AttachmentDemoTest.kt | 2 +- .../src/main/kotlin/net/corda/attachmentdemo/Main.kt | 2 +- .../kotlin/net/corda/bank/BankOfCordaRPCClientTest.kt | 2 +- .../cordapp/src/test/kotlin/net/corda/irs/Main.kt | 2 +- .../kotlin/net/corda/irs/IRSDemoTest.kt | 1 - .../kotlin/net/corda/vega/SimmValuationTest.kt | 1 - .../src/test/kotlin/net/corda/vega/Main.kt | 2 +- .../kotlin/net/corda/traderdemo/TraderDemoTest.kt | 2 +- .../src/test/kotlin/net/corda/traderdemo/Main.kt | 2 +- .../node/internal/demorun/CordformNodeRunner.kt | 1 - .../tools/shell/InteractiveShellIntegrationTest.kt | 10 +++++----- .../kotlin/net/corda/tools/shell/SSHServerTest.kt | 4 ++-- 22 files changed, 32 insertions(+), 35 deletions(-) diff --git a/client/rpc/src/integration-test/kotlin/net/corda/client/rpc/FlowsExecutionModeRpcTest.kt b/client/rpc/src/integration-test/kotlin/net/corda/client/rpc/FlowsExecutionModeRpcTest.kt index 2cfd313256..4418c9d6e9 100644 --- a/client/rpc/src/integration-test/kotlin/net/corda/client/rpc/FlowsExecutionModeRpcTest.kt +++ b/client/rpc/src/integration-test/kotlin/net/corda/client/rpc/FlowsExecutionModeRpcTest.kt @@ -30,7 +30,7 @@ class FlowsExecutionModeRpcTest { assumeFalse(System.getProperty("os.name").toLowerCase().startsWith("win")) val user = User("mark", "dadada", setOf(invokeRpc("setFlowsDrainingModeEnabled"), invokeRpc("isFlowsDrainingModeEnabled"))) - driver(DriverParameters(isDebug = true, inMemoryDB = false, startNodesInProcess = true)) { + driver(DriverParameters(inMemoryDB = false, startNodesInProcess = true)) { val nodeName = { val nodeHandle = startNode(rpcUsers = listOf(user)).getOrThrow() val nodeName = nodeHandle.nodeInfo.chooseIdentity().name diff --git a/node/src/integration-test/kotlin/net/corda/node/BootTests.kt b/node/src/integration-test/kotlin/net/corda/node/BootTests.kt index 51ccf7b974..53dcd1f666 100644 --- a/node/src/integration-test/kotlin/net/corda/node/BootTests.kt +++ b/node/src/integration-test/kotlin/net/corda/node/BootTests.kt @@ -36,7 +36,7 @@ class BootTests { @Test fun `double node start doesn't write into log file`() { - driver(DriverParameters(isDebug = true)) { + driver { val alice = startNode(providedName = ALICE_NAME).get() val logFolder = alice.baseDirectory / NodeStartup.LOGS_DIRECTORY_NAME val logFile = logFolder.list { it.filter { it.fileName.toString().endsWith(".log") }.findAny().get() } diff --git a/node/src/integration-test/kotlin/net/corda/node/NodeUnloadHandlerTests.kt b/node/src/integration-test/kotlin/net/corda/node/NodeUnloadHandlerTests.kt index f4881a075a..7d5d0406dd 100644 --- a/node/src/integration-test/kotlin/net/corda/node/NodeUnloadHandlerTests.kt +++ b/node/src/integration-test/kotlin/net/corda/node/NodeUnloadHandlerTests.kt @@ -21,7 +21,7 @@ class NodeUnloadHandlerTests { @Test fun `should be able to register run on stop lambda`() { - driver(DriverParameters(startNodesInProcess = true, extraCordappPackagesToScan = listOf("net.corda.node"), isDebug = true)) { + driver(DriverParameters(startNodesInProcess = true, extraCordappPackagesToScan = listOf("net.corda.node"))) { startNode(providedName = DUMMY_BANK_A_NAME).getOrThrow() // just want to fall off the end of this for the mo... } diff --git a/node/src/integration-test/kotlin/net/corda/node/flows/FlowRetryTest.kt b/node/src/integration-test/kotlin/net/corda/node/flows/FlowRetryTest.kt index 40bdb29444..f9064c4795 100644 --- a/node/src/integration-test/kotlin/net/corda/node/flows/FlowRetryTest.kt +++ b/node/src/integration-test/kotlin/net/corda/node/flows/FlowRetryTest.kt @@ -36,7 +36,7 @@ class FlowRetryTest { val numSessions = 2 val numIterations = 10 val user = User("mark", "dadada", setOf(Permissions.startFlow())) - val result: Any? = driver(DriverParameters(isDebug = true, startNodesInProcess = isQuasarAgentSpecified(), + val result: Any? = driver(DriverParameters(startNodesInProcess = isQuasarAgentSpecified(), portAllocation = RandomFree)) { val nodeAHandle = startNode(rpcUsers = listOf(user)).getOrThrow() diff --git a/node/src/integration-test/kotlin/net/corda/node/modes/draining/FlowsDrainingModeContentionTest.kt b/node/src/integration-test/kotlin/net/corda/node/modes/draining/FlowsDrainingModeContentionTest.kt index 7a3ed586cd..72bd435160 100644 --- a/node/src/integration-test/kotlin/net/corda/node/modes/draining/FlowsDrainingModeContentionTest.kt +++ b/node/src/integration-test/kotlin/net/corda/node/modes/draining/FlowsDrainingModeContentionTest.kt @@ -53,7 +53,7 @@ class FlowsDrainingModeContentionTest { @Test fun `draining mode does not deadlock with acks between 2 nodes`() { val message = "Ground control to Major Tom" - driver(DriverParameters(isDebug = true, startNodesInProcess = true, portAllocation = portAllocation, extraCordappPackagesToScan = listOf(MessageState::class.packageName))) { + driver(DriverParameters(startNodesInProcess = true, portAllocation = portAllocation, extraCordappPackagesToScan = listOf(MessageState::class.packageName))) { val nodeA = startNode(providedName = ALICE_NAME, rpcUsers = users).getOrThrow() val nodeB = startNode(providedName = BOB_NAME, rpcUsers = users).getOrThrow() diff --git a/node/src/integration-test/kotlin/net/corda/node/modes/draining/P2PFlowsDrainingModeTest.kt b/node/src/integration-test/kotlin/net/corda/node/modes/draining/P2PFlowsDrainingModeTest.kt index f92321c3be..8fe8fbc0a4 100644 --- a/node/src/integration-test/kotlin/net/corda/node/modes/draining/P2PFlowsDrainingModeTest.kt +++ b/node/src/integration-test/kotlin/net/corda/node/modes/draining/P2PFlowsDrainingModeTest.kt @@ -53,7 +53,7 @@ class P2PFlowsDrainingModeTest { @Test fun `flows draining mode suspends consumption of initial session messages`() { - driver(DriverParameters(isDebug = true, startNodesInProcess = false, portAllocation = portAllocation)) { + driver(DriverParameters(startNodesInProcess = false, portAllocation = portAllocation)) { val initiatedNode = startNode(providedName = ALICE_NAME).getOrThrow() val initiating = startNode(providedName = BOB_NAME, rpcUsers = users).getOrThrow().rpc @@ -85,7 +85,7 @@ class P2PFlowsDrainingModeTest { @Test fun `clean shutdown by draining`() { - driver(DriverParameters(isDebug = true, startNodesInProcess = true, portAllocation = portAllocation)) { + driver(DriverParameters(startNodesInProcess = true, portAllocation = portAllocation)) { val nodeA = startNode(providedName = ALICE_NAME, rpcUsers = users).getOrThrow() val nodeB = startNode(providedName = BOB_NAME, rpcUsers = users).getOrThrow() diff --git a/node/src/integration-test/kotlin/net/corda/node/modes/draining/RpcFlowsDrainingModeTest.kt b/node/src/integration-test/kotlin/net/corda/node/modes/draining/RpcFlowsDrainingModeTest.kt index 2984b5e5c2..3b5963877c 100644 --- a/node/src/integration-test/kotlin/net/corda/node/modes/draining/RpcFlowsDrainingModeTest.kt +++ b/node/src/integration-test/kotlin/net/corda/node/modes/draining/RpcFlowsDrainingModeTest.kt @@ -24,7 +24,7 @@ class RpcFlowsDrainingModeTest { @Test fun `flows draining mode rejects start flows commands through rpc`() { - driver(DriverParameters(isDebug = true, startNodesInProcess = false, portAllocation = portAllocation)) { + driver(DriverParameters(startNodesInProcess = false, portAllocation = portAllocation)) { startNode(rpcUsers = users).getOrThrow().rpc.apply { diff --git a/node/src/integration-test/kotlin/net/corda/node/persistence/NodeStatePersistenceTests.kt b/node/src/integration-test/kotlin/net/corda/node/persistence/NodeStatePersistenceTests.kt index 71b5de69a6..00df28b5a8 100644 --- a/node/src/integration-test/kotlin/net/corda/node/persistence/NodeStatePersistenceTests.kt +++ b/node/src/integration-test/kotlin/net/corda/node/persistence/NodeStatePersistenceTests.kt @@ -37,7 +37,7 @@ class NodeStatePersistenceTests { fun `persistent state survives node restart`() { val user = User("mark", "dadada", setOf(startFlow(), invokeRpc("vaultQuery"))) val message = Message("Hello world!") - val stateAndRef: StateAndRef? = driver(DriverParameters(isDebug = true, inMemoryDB = false, startNodesInProcess = isQuasarAgentSpecified(), + val stateAndRef: StateAndRef? = driver(DriverParameters(inMemoryDB = false, startNodesInProcess = isQuasarAgentSpecified(), portAllocation = RandomFree, extraCordappPackagesToScan = listOf(MessageState::class.packageName))) { val nodeName = { val nodeHandle = startNode(rpcUsers = listOf(user)).getOrThrow() @@ -70,7 +70,7 @@ class NodeStatePersistenceTests { val user = User("mark", "dadada", setOf(startFlow(), invokeRpc("vaultQuery"))) val message = Message("Hello world!") - val stateAndRef: StateAndRef? = driver(DriverParameters(isDebug = true, inMemoryDB = false, startNodesInProcess = isQuasarAgentSpecified(), portAllocation = RandomFree, extraCordappPackagesToScan = listOf(MessageState::class.packageName))) { + val stateAndRef: StateAndRef? = driver(DriverParameters(inMemoryDB = false, startNodesInProcess = isQuasarAgentSpecified(), portAllocation = RandomFree, extraCordappPackagesToScan = listOf(MessageState::class.packageName))) { val nodeName = { val nodeHandle = startNode(rpcUsers = listOf(user)).getOrThrow() val nodeName = nodeHandle.nodeInfo.singleIdentity().name diff --git a/node/src/integration-test/kotlin/net/corda/node/services/rpc/RpcSslTest.kt b/node/src/integration-test/kotlin/net/corda/node/services/rpc/RpcSslTest.kt index 1478322cf4..848b2ddb42 100644 --- a/node/src/integration-test/kotlin/net/corda/node/services/rpc/RpcSslTest.kt +++ b/node/src/integration-test/kotlin/net/corda/node/services/rpc/RpcSslTest.kt @@ -46,7 +46,7 @@ class RpcSslTest { val trustStorePath = saveToTrustStore(tempFolder.root.toPath() / "truststore.jks", cert) val clientSslOptions = ClientRpcSslOptions(trustStorePath, "password") - driver(DriverParameters(isDebug = true, startNodesInProcess = true, portAllocation = RandomFree)) { + driver(DriverParameters(startNodesInProcess = true, portAllocation = RandomFree)) { val node = startNode(rpcUsers = listOf(user), customOverrides = brokerSslOptions.useSslRpcOverrides()).getOrThrow() val client = CordaRPCClient.createWithSsl(node.rpcAddress, sslConfiguration = clientSslOptions) val connection = client.start(user.username, user.password) @@ -84,7 +84,7 @@ class RpcSslTest { val trustStorePath = saveToTrustStore(tempFolder.root.toPath() / "truststore.jks", cert1) val clientSslOptions = ClientRpcSslOptions(trustStorePath, "password") - driver(DriverParameters(isDebug = true, startNodesInProcess = true, portAllocation = RandomFree)) { + driver(DriverParameters(startNodesInProcess = true, portAllocation = RandomFree)) { val node = startNode(rpcUsers = listOf(user), customOverrides = brokerSslOptions.useSslRpcOverrides()).getOrThrow() Assertions.assertThatThrownBy { val connection = CordaRPCClient.createWithSsl(node.rpcAddress, sslConfiguration = clientSslOptions).start(user.username, user.password) @@ -104,7 +104,7 @@ class RpcSslTest { fun `RPC client not using ssl can run commands`() { val user = User("mark", "dadada", setOf(all())) var successful = false - driver(DriverParameters(isDebug = true, startNodesInProcess = true, portAllocation = RandomFree)) { + driver(DriverParameters(startNodesInProcess = true, portAllocation = RandomFree)) { val node = startNode(rpcUsers = listOf(user)).getOrThrow() val connection = CordaRPCClient(node.rpcAddress).start(user.username, user.password) connection.proxy.apply { @@ -124,7 +124,7 @@ class RpcSslTest { val trustStorePath = saveToTrustStore(tempFolder.root.toPath() / "truststore.jks", cert) val clientSslOptions = ClientRpcSslOptions(trustStorePath, "password") - driver(DriverParameters(isDebug = true, startNodesInProcess = true, portAllocation = RandomFree)) { + driver(DriverParameters(startNodesInProcess = true, portAllocation = RandomFree)) { val node = startNode(customOverrides = brokerSslOptions.useSslRpcOverrides()).getOrThrow() val client = CordaRPCClient.createWithSsl(node.rpcAddress, sslConfiguration = clientSslOptions) diff --git a/node/src/integration-test/kotlin/net/corda/node/services/statemachine/HardRestartTest.kt b/node/src/integration-test/kotlin/net/corda/node/services/statemachine/HardRestartTest.kt index 91d23dd829..2ee4013338 100644 --- a/node/src/integration-test/kotlin/net/corda/node/services/statemachine/HardRestartTest.kt +++ b/node/src/integration-test/kotlin/net/corda/node/services/statemachine/HardRestartTest.kt @@ -61,7 +61,7 @@ class HardRestartTest { @Test fun restartShortPingPongFlowRandomly() { val demoUser = User("demo", "demo", setOf(Permissions.startFlow(), Permissions.all())) - driver(DriverParameters(isDebug = true, startNodesInProcess = false, inMemoryDB = false, systemProperties = mapOf("log4j.configurationFile" to logConfigFile.toString()))) { + driver(DriverParameters(startNodesInProcess = false, inMemoryDB = false, systemProperties = mapOf("log4j.configurationFile" to logConfigFile.toString()))) { val (a, b) = listOf( startNode(providedName = DUMMY_BANK_A_NAME, rpcUsers = listOf(demoUser), customOverrides = mapOf("p2pAddress" to "localhost:30000")), startNode(providedName = DUMMY_BANK_B_NAME, rpcUsers = listOf(demoUser), customOverrides = mapOf("p2pAddress" to "localhost:40000")) @@ -93,7 +93,7 @@ class HardRestartTest { @Test fun restartLongPingPongFlowRandomly() { val demoUser = User("demo", "demo", setOf(Permissions.startFlow(), Permissions.all())) - driver(DriverParameters(isDebug = true, startNodesInProcess = false, inMemoryDB = false, systemProperties = mapOf("log4j.configurationFile" to logConfigFile.toString()))) { + driver(DriverParameters(startNodesInProcess = false, inMemoryDB = false, systemProperties = mapOf("log4j.configurationFile" to logConfigFile.toString()))) { val (a, b) = listOf( startNode(providedName = DUMMY_BANK_A_NAME, rpcUsers = listOf(demoUser), customOverrides = mapOf("p2pAddress" to "localhost:30000")), startNode(providedName = DUMMY_BANK_B_NAME, rpcUsers = listOf(demoUser), customOverrides = mapOf("p2pAddress" to "localhost:40000")) @@ -125,7 +125,7 @@ class HardRestartTest { @Test fun softRestartLongPingPongFlowRandomly() { val demoUser = User("demo", "demo", setOf(Permissions.startFlow(), Permissions.all())) - driver(DriverParameters(isDebug = true, startNodesInProcess = false, inMemoryDB = false, systemProperties = mapOf("log4j.configurationFile" to logConfigFile.toString()))) { + driver(DriverParameters(startNodesInProcess = false, inMemoryDB = false, systemProperties = mapOf("log4j.configurationFile" to logConfigFile.toString()))) { val (a, b) = listOf( startNode(providedName = DUMMY_BANK_A_NAME, rpcUsers = listOf(demoUser), customOverrides = mapOf("p2pAddress" to "localhost:30000")), startNode(providedName = DUMMY_BANK_B_NAME, rpcUsers = listOf(demoUser), customOverrides = mapOf("p2pAddress" to "localhost:40000")) @@ -201,7 +201,7 @@ class HardRestartTest { @Test fun restartRecursiveFlowRandomly() { val demoUser = User("demo", "demo", setOf(Permissions.startFlow(), Permissions.all())) - driver(DriverParameters(isDebug = true, startNodesInProcess = false, inMemoryDB = false, systemProperties = mapOf("log4j.configurationFile" to logConfigFile.toString()))) { + driver(DriverParameters(startNodesInProcess = false, inMemoryDB = false, systemProperties = mapOf("log4j.configurationFile" to logConfigFile.toString()))) { val (a, b) = listOf( startNode(providedName = DUMMY_BANK_A_NAME, rpcUsers = listOf(demoUser), customOverrides = mapOf("p2pAddress" to "localhost:30000")), startNode(providedName = DUMMY_BANK_B_NAME, rpcUsers = listOf(demoUser), customOverrides = mapOf("p2pAddress" to "localhost:40000")) diff --git a/samples/attachment-demo/src/integration-test/kotlin/net/corda/attachmentdemo/AttachmentDemoTest.kt b/samples/attachment-demo/src/integration-test/kotlin/net/corda/attachmentdemo/AttachmentDemoTest.kt index 2d6c876139..e47bc11f0d 100644 --- a/samples/attachment-demo/src/integration-test/kotlin/net/corda/attachmentdemo/AttachmentDemoTest.kt +++ b/samples/attachment-demo/src/integration-test/kotlin/net/corda/attachmentdemo/AttachmentDemoTest.kt @@ -17,7 +17,7 @@ class AttachmentDemoTest { @Test fun `attachment demo using a 10MB zip file`() { val numOfExpectedBytes = 10_000_000 - driver(DriverParameters(isDebug = true, portAllocation = PortAllocation.Incremental(20000))) { + driver(DriverParameters(portAllocation = PortAllocation.Incremental(20000))) { val demoUser = listOf(User("demo", "demo", setOf(all()))) val (nodeA, nodeB) = listOf( startNode(providedName = DUMMY_BANK_A_NAME, rpcUsers = demoUser, maximumHeapSize = "1g"), diff --git a/samples/attachment-demo/src/main/kotlin/net/corda/attachmentdemo/Main.kt b/samples/attachment-demo/src/main/kotlin/net/corda/attachmentdemo/Main.kt index cdc6313a25..0941dc888d 100644 --- a/samples/attachment-demo/src/main/kotlin/net/corda/attachmentdemo/Main.kt +++ b/samples/attachment-demo/src/main/kotlin/net/corda/attachmentdemo/Main.kt @@ -13,7 +13,7 @@ import net.corda.testing.driver.driver */ fun main(args: Array) { val demoUser = listOf(User("demo", "demo", setOf("StartFlow.net.corda.flows.FinalityFlow"))) - driver(DriverParameters(isDebug = true, driverDirectory = "build" / "attachment-demo-nodes", waitForAllNodesToFinish = true)) { + driver(DriverParameters(driverDirectory = "build" / "attachment-demo-nodes", waitForAllNodesToFinish = true)) { startNode(providedName = DUMMY_BANK_A_NAME, rpcUsers = demoUser) startNode(providedName = DUMMY_BANK_B_NAME, rpcUsers = demoUser) } diff --git a/samples/bank-of-corda-demo/src/integration-test/kotlin/net/corda/bank/BankOfCordaRPCClientTest.kt b/samples/bank-of-corda-demo/src/integration-test/kotlin/net/corda/bank/BankOfCordaRPCClientTest.kt index 48a3705b27..d247b64ab6 100644 --- a/samples/bank-of-corda-demo/src/integration-test/kotlin/net/corda/bank/BankOfCordaRPCClientTest.kt +++ b/samples/bank-of-corda-demo/src/integration-test/kotlin/net/corda/bank/BankOfCordaRPCClientTest.kt @@ -29,7 +29,7 @@ class BankOfCordaRPCClientTest { invokeRpc(CordaRPCOps::wellKnownPartyFromX500Name), invokeRpc(CordaRPCOps::notaryIdentities) ) - driver(DriverParameters(extraCordappPackagesToScan = listOf("net.corda.finance"), isDebug = true)) { + driver(DriverParameters(extraCordappPackagesToScan = listOf("net.corda.finance"))) { val bocManager = User("bocManager", "password1", permissions = setOf( startFlow()) + commonPermissions) val bigCorpCFO = User("bigCorpCFO", "password2", permissions = emptySet() + commonPermissions) diff --git a/samples/irs-demo/cordapp/src/test/kotlin/net/corda/irs/Main.kt b/samples/irs-demo/cordapp/src/test/kotlin/net/corda/irs/Main.kt index 99a0887b52..8bc93edc47 100644 --- a/samples/irs-demo/cordapp/src/test/kotlin/net/corda/irs/Main.kt +++ b/samples/irs-demo/cordapp/src/test/kotlin/net/corda/irs/Main.kt @@ -12,7 +12,7 @@ import net.corda.testing.driver.driver * Do not use in a production environment. */ fun main(args: Array) { - driver(DriverParameters(useTestClock = true, isDebug = true, waitForAllNodesToFinish = true)) { + driver(DriverParameters(useTestClock = true, waitForAllNodesToFinish = true)) { val (nodeA, nodeB) = listOf( startNode(providedName = DUMMY_BANK_A_NAME), startNode(providedName = DUMMY_BANK_B_NAME), diff --git a/samples/irs-demo/src/integration-test/kotlin/net/corda/irs/IRSDemoTest.kt b/samples/irs-demo/src/integration-test/kotlin/net/corda/irs/IRSDemoTest.kt index 8a90d7a56d..854014a863 100644 --- a/samples/irs-demo/src/integration-test/kotlin/net/corda/irs/IRSDemoTest.kt +++ b/samples/irs-demo/src/integration-test/kotlin/net/corda/irs/IRSDemoTest.kt @@ -53,7 +53,6 @@ class IRSDemoTest { springDriver(DriverParameters( useTestClock = true, notarySpecs = listOf(NotarySpec(DUMMY_NOTARY_NAME, rpcUsers = rpcUsers)), - isDebug = true, extraCordappPackagesToScan = listOf("net.corda.irs") )) { val (controller, nodeA, nodeB) = listOf( diff --git a/samples/simm-valuation-demo/src/integration-test/kotlin/net/corda/vega/SimmValuationTest.kt b/samples/simm-valuation-demo/src/integration-test/kotlin/net/corda/vega/SimmValuationTest.kt index da89c5a780..7a3844b5ed 100644 --- a/samples/simm-valuation-demo/src/integration-test/kotlin/net/corda/vega/SimmValuationTest.kt +++ b/samples/simm-valuation-demo/src/integration-test/kotlin/net/corda/vega/SimmValuationTest.kt @@ -48,7 +48,6 @@ class SimmValuationTest { val logConfigFile = projectRootDir / "samples" / "simm-valuation-demo" / "src" / "main" / "resources" / "log4j2.xml" assertThat(logConfigFile).isRegularFile() driver(DriverParameters( - isDebug = true, extraCordappPackagesToScan = listOf("net.corda.vega.contracts", "net.corda.vega.plugin.customserializers"), systemProperties = mapOf("log4j.configurationFile" to logConfigFile.toString())) ) { diff --git a/samples/simm-valuation-demo/src/test/kotlin/net/corda/vega/Main.kt b/samples/simm-valuation-demo/src/test/kotlin/net/corda/vega/Main.kt index e20f24a4f0..b75102c013 100644 --- a/samples/simm-valuation-demo/src/test/kotlin/net/corda/vega/Main.kt +++ b/samples/simm-valuation-demo/src/test/kotlin/net/corda/vega/Main.kt @@ -13,7 +13,7 @@ import net.corda.testing.driver.driver * via the web api. */ fun main(args: Array) { - driver(DriverParameters(isDebug = true, waitForAllNodesToFinish = true)) { + driver(DriverParameters(waitForAllNodesToFinish = true)) { val (nodeA, nodeB, nodeC) = listOf( startNode(providedName = DUMMY_BANK_A_NAME), startNode(providedName = DUMMY_BANK_B_NAME), diff --git a/samples/trader-demo/src/integration-test/kotlin/net/corda/traderdemo/TraderDemoTest.kt b/samples/trader-demo/src/integration-test/kotlin/net/corda/traderdemo/TraderDemoTest.kt index 9160a43c2d..aa074cdab2 100644 --- a/samples/trader-demo/src/integration-test/kotlin/net/corda/traderdemo/TraderDemoTest.kt +++ b/samples/trader-demo/src/integration-test/kotlin/net/corda/traderdemo/TraderDemoTest.kt @@ -76,7 +76,7 @@ class TraderDemoTest { @Test fun `Tudor test`() { - driver(DriverParameters(isDebug = true, startNodesInProcess = false, inMemoryDB = false, extraCordappPackagesToScan = listOf("net.corda.finance"))) { + driver(DriverParameters(startNodesInProcess = false, inMemoryDB = false, extraCordappPackagesToScan = listOf("net.corda.finance"))) { val demoUser = User("demo", "demo", setOf(startFlow(), all())) val bankUser = User("user1", "test", permissions = setOf(all())) val (nodeA, nodeB, bankNode) = listOf( diff --git a/samples/trader-demo/src/test/kotlin/net/corda/traderdemo/Main.kt b/samples/trader-demo/src/test/kotlin/net/corda/traderdemo/Main.kt index 61d711312d..324cdee343 100644 --- a/samples/trader-demo/src/test/kotlin/net/corda/traderdemo/Main.kt +++ b/samples/trader-demo/src/test/kotlin/net/corda/traderdemo/Main.kt @@ -23,7 +23,7 @@ fun main(args: Array) { startFlow(), all()) val demoUser = listOf(User("demo", "demo", permissions)) - driver(DriverParameters(driverDirectory = "build" / "trader-demo-nodes", isDebug = true, waitForAllNodesToFinish = true)) { + driver(DriverParameters(driverDirectory = "build" / "trader-demo-nodes", waitForAllNodesToFinish = true)) { val user = User("user1", "test", permissions = setOf(startFlow(), startFlow(), startFlow())) diff --git a/testing/node-driver/src/main/kotlin/net/corda/testing/node/internal/demorun/CordformNodeRunner.kt b/testing/node-driver/src/main/kotlin/net/corda/testing/node/internal/demorun/CordformNodeRunner.kt index 1ffe04a291..fa5b9b5150 100644 --- a/testing/node-driver/src/main/kotlin/net/corda/testing/node/internal/demorun/CordformNodeRunner.kt +++ b/testing/node-driver/src/main/kotlin/net/corda/testing/node/internal/demorun/CordformNodeRunner.kt @@ -57,7 +57,6 @@ class CordformNodeRunner(val cordformDefinition: CordformDefinition) { .mapNotNull { address -> address?.let { NetworkHostAndPort.parse(it).port } } .max()!! internalDriver( - isDebug = true, jmxPolicy = JmxPolicy(true), driverDirectory = cordformDefinition.nodesDirectory, extraCordappPackagesToScan = extraPackagesToScan, diff --git a/tools/shell/src/integration-test/kotlin/net/corda/tools/shell/InteractiveShellIntegrationTest.kt b/tools/shell/src/integration-test/kotlin/net/corda/tools/shell/InteractiveShellIntegrationTest.kt index 5fd88e0cf3..e9b1636a99 100644 --- a/tools/shell/src/integration-test/kotlin/net/corda/tools/shell/InteractiveShellIntegrationTest.kt +++ b/tools/shell/src/integration-test/kotlin/net/corda/tools/shell/InteractiveShellIntegrationTest.kt @@ -44,7 +44,7 @@ class InteractiveShellIntegrationTest { @Test fun `shell should not log in with invalid credentials`() { val user = User("u", "p", setOf()) - driver(DriverParameters(isDebug = true, startNodesInProcess = true, portAllocation = RandomFree)) { + driver(DriverParameters(startNodesInProcess = true, portAllocation = RandomFree)) { val nodeFuture = startNode(providedName = ALICE_NAME, rpcUsers = listOf(user), startInSameProcess = true) val node = nodeFuture.getOrThrow() @@ -85,7 +85,7 @@ class InteractiveShellIntegrationTest { val trustStorePath = saveToTrustStore(tempFolder.root.toPath() / "truststore.jks", cert) val clientSslOptions = ClientRpcSslOptions(trustStorePath, "password") - driver(DriverParameters(isDebug = true, startNodesInProcess = true, portAllocation = RandomFree)) { + driver(DriverParameters(startNodesInProcess = true, portAllocation = RandomFree)) { startNode(rpcUsers = listOf(user), customOverrides = brokerSslOptions.useSslRpcOverrides()).getOrThrow().use { node -> val conf = ShellConfiguration(commandsDirectory = Files.createTempDir().toPath(), @@ -113,7 +113,7 @@ class InteractiveShellIntegrationTest { val trustStorePath = saveToTrustStore(tempFolder.root.toPath() / "truststore.jks", cert1) val clientSslOptions = ClientRpcSslOptions(trustStorePath, "password") - driver(DriverParameters(isDebug = true, startNodesInProcess = true, portAllocation = RandomFree)) { + driver(DriverParameters(startNodesInProcess = true, portAllocation = RandomFree)) { startNode(rpcUsers = listOf(user), customOverrides = brokerSslOptions.useSslRpcOverrides()).getOrThrow().use { node -> val conf = ShellConfiguration(commandsDirectory = Files.createTempDir().toPath(), @@ -130,7 +130,7 @@ class InteractiveShellIntegrationTest { @Test fun `internal shell user should not be able to connect if node started with devMode=false`() { - driver(DriverParameters(isDebug = true, startNodesInProcess = true, portAllocation = RandomFree)) { + driver(DriverParameters(startNodesInProcess = true, portAllocation = RandomFree)) { startNode().getOrThrow().use { node -> val conf = (node as NodeHandleInternal).configuration.toShellConfig() InteractiveShell.startShellInternal(conf) @@ -196,7 +196,7 @@ class InteractiveShellIntegrationTest { val clientSslOptions = ClientRpcSslOptions(trustStorePath, "password") var successful = false - driver(DriverParameters(isDebug = true, startNodesInProcess = true, portAllocation = RandomFree)) { + driver(DriverParameters(startNodesInProcess = true, portAllocation = RandomFree)) { startNode(rpcUsers = listOf(user), customOverrides = brokerSslOptions.useSslRpcOverrides()).getOrThrow().use { node -> val conf = ShellConfiguration(commandsDirectory = Files.createTempDir().toPath(), diff --git a/tools/shell/src/integration-test/kotlin/net/corda/tools/shell/SSHServerTest.kt b/tools/shell/src/integration-test/kotlin/net/corda/tools/shell/SSHServerTest.kt index 9aceb2cff2..a68b9d85d7 100644 --- a/tools/shell/src/integration-test/kotlin/net/corda/tools/shell/SSHServerTest.kt +++ b/tools/shell/src/integration-test/kotlin/net/corda/tools/shell/SSHServerTest.kt @@ -97,7 +97,7 @@ class SSHServerTest { val user = User("u", "p", setOf(startFlow(), invokeRpc(CordaRPCOps::wellKnownPartyFromX500Name))) // The driver will automatically pick up the annotated flows below - driver(DriverParameters(isDebug = true)) { + driver { val node = startNode(providedName = ALICE_NAME, rpcUsers = listOf(user), customOverrides = mapOf("sshd" to mapOf("port" to 2222))) node.getOrThrow() @@ -126,7 +126,7 @@ class SSHServerTest { fun `ssh runs flows`() { val user = User("u", "p", setOf(startFlow())) // The driver will automatically pick up the annotated flows below - driver(DriverParameters(isDebug = true)) { + driver { val node = startNode(providedName = ALICE_NAME, rpcUsers = listOf(user), customOverrides = mapOf("sshd" to mapOf("port" to 2222))) node.getOrThrow()