mirror of
https://github.com/corda/corda.git
synced 2025-01-18 18:56:28 +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 ->
|
withKeyStores(server, client) { nodeSslOptions, clientSslOptions ->
|
||||||
var successful = false
|
var successful = false
|
||||||
driver(DriverParameters(isDebug = true, startNodesInProcess = true, portAllocation = RandomFree)) {
|
driver(DriverParameters(isDebug = true, startNodesInProcess = true, portAllocation = RandomFree)) {
|
||||||
startNode(rpcUsers = listOf(user), customOverrides = nodeSslOptions.useSslRpcOverrides()).getOrThrow().use { node ->
|
val node = startNode(rpcUsers = listOf(user), customOverrides = nodeSslOptions.useSslRpcOverrides()).getOrThrow()
|
||||||
createCordaRPCClientWithSsl(node.rpcAddress, sslConfiguration = clientSslOptions).start(user.username, user.password).use { connection ->
|
val client = createCordaRPCClientWithSsl(node.rpcAddress, sslConfiguration = clientSslOptions)
|
||||||
connection.proxy.apply {
|
val connection = client.start(user.username, user.password)
|
||||||
nodeInfo()
|
connection.proxy.apply {
|
||||||
successful = true
|
nodeInfo()
|
||||||
}
|
successful = true
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
connection.close()
|
||||||
}
|
}
|
||||||
assertThat(successful).isTrue()
|
assertThat(successful).isTrue()
|
||||||
}
|
}
|
||||||
@ -54,14 +55,15 @@ class RpcSslTest {
|
|||||||
val user = User("mark", "dadada", setOf(all()))
|
val user = User("mark", "dadada", setOf(all()))
|
||||||
var successful = false
|
var successful = false
|
||||||
driver(DriverParameters(isDebug = true, startNodesInProcess = true, portAllocation = RandomFree)) {
|
driver(DriverParameters(isDebug = true, startNodesInProcess = true, portAllocation = RandomFree)) {
|
||||||
startNode(rpcUsers = listOf(user)).getOrThrow().use { node ->
|
val node = startNode(rpcUsers = listOf(user)).getOrThrow()
|
||||||
CordaRPCClient(node.rpcAddress).start(user.username, user.password).use { connection ->
|
val client = CordaRPCClient(node.rpcAddress)
|
||||||
connection.proxy.apply {
|
val connection = client.start(user.username, user.password)
|
||||||
nodeInfo()
|
connection.proxy.apply {
|
||||||
successful = true
|
nodeInfo()
|
||||||
}
|
successful = true
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
connection.close()
|
||||||
}
|
}
|
||||||
assertThat(successful).isTrue()
|
assertThat(successful).isTrue()
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user