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..9508102a7a 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 @@ -10,12 +10,16 @@ import net.corda.core.utilities.ProgressTracker import net.corda.core.utilities.getOrThrow import net.corda.core.utilities.unwrap import net.corda.node.services.Permissions -import net.corda.testing.core.singleIdentity +import net.corda.testing.core.* import net.corda.testing.driver.DriverParameters import net.corda.testing.driver.driver import net.corda.testing.driver.internal.RandomFree +import net.corda.testing.internal.IntegrationTest +import net.corda.testing.internal.IntegrationTestSchemas +import net.corda.testing.internal.toDatabaseSchemaName import net.corda.testing.node.User import org.junit.Before +import org.junit.ClassRule import org.junit.Test import java.lang.management.ManagementFactory import java.sql.SQLException @@ -24,7 +28,13 @@ import kotlin.test.assertEquals import kotlin.test.assertNotNull -class FlowRetryTest { +class FlowRetryTest : IntegrationTest() { + companion object { + @ClassRule + @JvmField + val databaseSchemas = IntegrationTestSchemas(ALICE_NAME.toDatabaseSchemaName(), BOB_NAME.toDatabaseSchemaName(), DUMMY_NOTARY_NAME.toDatabaseSchemaName()) + } + @Before fun resetCounters() { InitiatorFlow.seen.clear() @@ -39,8 +49,8 @@ class FlowRetryTest { val result: Any? = driver(DriverParameters(isDebug = true, startNodesInProcess = isQuasarAgentSpecified(), portAllocation = RandomFree)) { - val nodeAHandle = startNode(rpcUsers = listOf(user)).getOrThrow() - val nodeBHandle = startNode(rpcUsers = listOf(user)).getOrThrow() + val nodeAHandle = startNode(providedName = ALICE_NAME, rpcUsers = listOf(user)).getOrThrow() + val nodeBHandle = startNode(providedName = BOB_NAME, rpcUsers = listOf(user)).getOrThrow() val result = CordaRPCClient(nodeAHandle.rpcAddress).start(user.username, user.password).use { it.proxy.startFlow(::InitiatorFlow, numSessions, numIterations, nodeBHandle.nodeInfo.singleIdentity()).returnValue.getOrThrow() diff --git a/node/src/integration-test/kotlin/net/corda/node/services/rpc/RpcExceptionHandlingTest.kt b/node/src/integration-test/kotlin/net/corda/node/services/rpc/RpcExceptionHandlingTest.kt index 012a6b1345..56be0c1cde 100644 --- a/node/src/integration-test/kotlin/net/corda/node/services/rpc/RpcExceptionHandlingTest.kt +++ b/node/src/integration-test/kotlin/net/corda/node/services/rpc/RpcExceptionHandlingTest.kt @@ -15,11 +15,7 @@ import net.corda.core.utilities.getOrThrow import net.corda.core.utilities.unwrap import net.corda.node.services.Permissions import net.corda.nodeapi.exceptions.InternalNodeException -import net.corda.testing.core.ALICE_NAME -import net.corda.testing.core.BOB_NAME -import net.corda.testing.core.DUMMY_BANK_A_NAME -import net.corda.testing.core.DUMMY_NOTARY_NAME -import net.corda.testing.core.singleIdentity +import net.corda.testing.core.* import net.corda.testing.driver.DriverDSL import net.corda.testing.driver.DriverParameters import net.corda.testing.driver.NodeHandle @@ -41,7 +37,7 @@ class RpcExceptionHandlingTest : IntegrationTest() { companion object { @ClassRule @JvmField - val databaseSchemas = IntegrationTestSchemas(*listOf(ALICE_NAME, BOB_NAME, DUMMY_BANK_A_NAME, DUMMY_NOTARY_NAME) + val databaseSchemas = IntegrationTestSchemas(*listOf(ALICE_NAME, BOB_NAME, DUMMY_BANK_A_NAME, DUMMY_BANK_B_NAME, DUMMY_NOTARY_NAME) .map { it.toDatabaseSchemaName() }.toTypedArray()) } @@ -68,7 +64,7 @@ class RpcExceptionHandlingTest : IntegrationTest() { driver(DriverParameters(startNodesInProcess = true, notarySpecs = emptyList())) { val devModeNode = startNode(params).getOrThrow() - val node = startNode(ALICE_NAME, devMode = false, parameters = params).getOrThrow() + val node = startNode(DUMMY_BANK_B_NAME, devMode = false, parameters = params).getOrThrow() assertThatThrownExceptionIsReceivedUnwrapped(devModeNode) assertThatThrownExceptionIsReceivedUnwrapped(node) @@ -87,7 +83,7 @@ class RpcExceptionHandlingTest : IntegrationTest() { driver(DriverParameters(startNodesInProcess = true, notarySpecs = emptyList())) { val devModeNode = startNode(params).getOrThrow() - val node = startNode(ALICE_NAME, devMode = false, parameters = params).getOrThrow() + val node = startNode(DUMMY_BANK_B_NAME, devMode = false, parameters = params).getOrThrow() assertThatThrownBy { devModeNode.throwExceptionFromFlow() }.isInstanceOfSatisfying(FlowException::class.java) { exception ->