mirror of
https://github.com/corda/corda.git
synced 2025-01-18 10:46:38 +00:00
CORDA-1443: re-wrote tests to ensure connection closes before node to avoid lengthy artemis timeouts (#3104)
This commit is contained in:
parent
3bb95c3ed1
commit
8419b24d80
@ -35,14 +35,15 @@ class RpcSslTest {
|
||||
withKeyStores(server, client) { nodeSslOptions, clientSslOptions ->
|
||||
var successful = false
|
||||
driver(DriverParameters(isDebug = true, startNodesInProcess = true, portAllocation = RandomFree)) {
|
||||
startNode(rpcUsers = listOf(user), customOverrides = nodeSslOptions.useSslRpcOverrides()).getOrThrow().use { node ->
|
||||
createCordaRPCClientWithSsl(node.rpcAddress, sslConfiguration = clientSslOptions).start(user.username, user.password).use { connection ->
|
||||
connection.proxy.apply {
|
||||
nodeInfo()
|
||||
successful = true
|
||||
}
|
||||
}
|
||||
val node = startNode(rpcUsers = listOf(user), customOverrides = nodeSslOptions.useSslRpcOverrides()).getOrThrow()
|
||||
val client = createCordaRPCClientWithSsl(node.rpcAddress, sslConfiguration = clientSslOptions)
|
||||
val connection = client.start(user.username, user.password)
|
||||
connection.proxy.apply {
|
||||
nodeInfo()
|
||||
successful = true
|
||||
}
|
||||
|
||||
connection.close()
|
||||
}
|
||||
assertThat(successful).isTrue()
|
||||
}
|
||||
@ -54,14 +55,15 @@ class RpcSslTest {
|
||||
val user = User("mark", "dadada", setOf(all()))
|
||||
var successful = false
|
||||
driver(DriverParameters(isDebug = true, startNodesInProcess = true, portAllocation = RandomFree)) {
|
||||
startNode(rpcUsers = listOf(user)).getOrThrow().use { node ->
|
||||
CordaRPCClient(node.rpcAddress).start(user.username, user.password).use { connection ->
|
||||
connection.proxy.apply {
|
||||
nodeInfo()
|
||||
successful = true
|
||||
}
|
||||
}
|
||||
val node = startNode(rpcUsers = listOf(user)).getOrThrow()
|
||||
val client = CordaRPCClient(node.rpcAddress)
|
||||
val connection = client.start(user.username, user.password)
|
||||
connection.proxy.apply {
|
||||
nodeInfo()
|
||||
successful = true
|
||||
}
|
||||
|
||||
connection.close()
|
||||
}
|
||||
assertThat(successful).isTrue()
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user