mirror of
https://github.com/corda/corda.git
synced 2025-05-31 22:50:53 +00:00
Apply some protective measures to prevent the reconnection test failing when rogue RPC clients on the team city server connect. (#4413)
This commit is contained in:
parent
870058e72d
commit
767e37a34e
@ -49,7 +49,7 @@ class ProtonWrapperTests {
|
|||||||
@JvmField
|
@JvmField
|
||||||
val temporaryFolder = TemporaryFolder()
|
val temporaryFolder = TemporaryFolder()
|
||||||
|
|
||||||
private val portAllocation = incrementalPortAllocation(10000)
|
private val portAllocation = incrementalPortAllocation(15000) // use 15000 to move us out of harms way
|
||||||
private val serverPort = portAllocation.nextPort()
|
private val serverPort = portAllocation.nextPort()
|
||||||
private val serverPort2 = portAllocation.nextPort()
|
private val serverPort2 = portAllocation.nextPort()
|
||||||
private val artemisPort = portAllocation.nextPort()
|
private val artemisPort = portAllocation.nextPort()
|
||||||
@ -207,9 +207,10 @@ class ProtonWrapperTests {
|
|||||||
val amqpServer2 = createServer(serverPort2)
|
val amqpServer2 = createServer(serverPort2)
|
||||||
val amqpClient = createClient()
|
val amqpClient = createClient()
|
||||||
try {
|
try {
|
||||||
val serverConnected = amqpServer.onConnection.toFuture()
|
// The filter here is to prevent rogue RPC clients from messing us up
|
||||||
val serverConnected2 = amqpServer2.onConnection.toFuture()
|
val serverConnected = amqpServer.onConnection.filter { it.remoteCert != null }.toFuture()
|
||||||
val clientConnected = amqpClient.onConnection.toBlocking().iterator
|
val serverConnected2 = amqpServer2.onConnection.filter { it.remoteCert != null }.toFuture()
|
||||||
|
val clientConnected = amqpClient.onConnection.filter { it.remoteCert != null }.toBlocking().iterator
|
||||||
amqpServer.start()
|
amqpServer.start()
|
||||||
amqpClient.start()
|
amqpClient.start()
|
||||||
val serverConn1 = serverConnected.get()
|
val serverConn1 = serverConnected.get()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user