diff --git a/node/src/integration-test/kotlin/net/corda/MessageState.kt b/node/src/integration-test/kotlin/net/corda/MessageState.kt index fcbe58417c..cb7a8ecdab 100644 --- a/node/src/integration-test/kotlin/net/corda/MessageState.kt +++ b/node/src/integration-test/kotlin/net/corda/MessageState.kt @@ -40,10 +40,10 @@ object MessageSchemaV1 : MappedSchema( @Entity @Table(name = "messages") class PersistentMessage( - @Column(name = "by") + @Column(name = "message_by") var by: String, - @Column(name = "value") + @Column(name = "message_value") var value: String ) : PersistentState() } 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 beffc2bea8..b5838306e0 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 @@ -25,6 +25,8 @@ import net.corda.core.transactions.TransactionBuilder import net.corda.core.utilities.getOrThrow import net.corda.core.utilities.unwrap import net.corda.node.services.Permissions.Companion.all +import net.corda.testing.core.ALICE_NAME +import net.corda.testing.core.BOB_NAME import net.corda.testing.core.singleIdentity import net.corda.testing.driver.DriverParameters import net.corda.testing.driver.PortAllocation @@ -62,8 +64,8 @@ class FlowsDrainingModeContentionTest { driver(DriverParameters(isDebug = true, startNodesInProcess = true, portAllocation = portAllocation, extraCordappPackagesToScan = listOf(MessageState::class.packageName))) { - val nodeA = startNode(rpcUsers = users).getOrThrow() - val nodeB = startNode(rpcUsers = users).getOrThrow() + val nodeA = startNode(providedName = ALICE_NAME, rpcUsers = users).getOrThrow() + val nodeB = startNode(providedName = BOB_NAME, rpcUsers = users).getOrThrow() defaultNotaryNode.getOrThrow() val nodeARpcInfo = RpcInfo(nodeA.rpcAddress, user.username, user.password) 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 add347191c..85bb9f3db6 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 @@ -11,12 +11,8 @@ package net.corda.node.modes.draining import co.paralleluniverse.fibers.Suspendable -import net.corda.core.flows.FlowLogic -import net.corda.core.flows.FlowSession -import net.corda.core.flows.InitiatedBy -import net.corda.core.flows.InitiatingFlow -import net.corda.core.flows.StartableByRPC import net.corda.client.rpc.internal.drainAndShutdown +import net.corda.core.flows.* import net.corda.core.identity.Party import net.corda.core.internal.concurrent.map import net.corda.core.messaging.startFlow @@ -24,7 +20,9 @@ import net.corda.core.utilities.getOrThrow import net.corda.core.utilities.loggerFor import net.corda.core.utilities.unwrap import net.corda.node.services.Permissions -import net.corda.testing.core.* +import net.corda.testing.core.ALICE_NAME +import net.corda.testing.core.BOB_NAME +import net.corda.testing.core.singleIdentity import net.corda.testing.driver.DriverParameters import net.corda.testing.driver.PortAllocation import net.corda.testing.driver.driver @@ -73,9 +71,10 @@ class P2PFlowsDrainingModeTest : IntegrationTest() { @Test fun `flows draining mode suspends consumption of initial session messages`() { - driver(DriverParameters(isDebug = true, startNodesInProcess = true, portAllocation = portAllocation)) { + driver(DriverParameters(isDebug = true, startNodesInProcess = false, portAllocation = portAllocation)) { + val initiatedNode = startNode(providedName = ALICE_NAME).getOrThrow() - val initiating = startNode(rpcUsers = users, providedName = BOB_NAME).getOrThrow().rpc + val initiating = startNode(providedName = BOB_NAME, rpcUsers = users).getOrThrow().rpc val counterParty = initiatedNode.nodeInfo.singleIdentity() val initiated = initiatedNode.rpc @@ -106,8 +105,8 @@ class P2PFlowsDrainingModeTest : IntegrationTest() { driver(DriverParameters(isDebug = true, startNodesInProcess = true, portAllocation = portAllocation)) { - val nodeA = startNode(rpcUsers = users).getOrThrow() - val nodeB = startNode(rpcUsers = users).getOrThrow() + val nodeA = startNode(providedName = ALICE_NAME, rpcUsers = users).getOrThrow() + val nodeB = startNode(providedName = BOB_NAME, rpcUsers = users).getOrThrow() var successful = false val latch = CountDownLatch(1) nodeB.rpc.setFlowsDrainingModeEnabled(true)