mirror of
https://github.com/corda/corda.git
synced 2025-06-22 09:08:49 +00:00
Fix tests that check ports are bound/unbound (#756)
* Specifically, DriverTests and WebserverDriverTests * RPCDriver.startRpcBroker now waits for port to be unbound, as was probably intended * Explicitly drop network map future while ensuring the error is logged
This commit is contained in:
@ -419,7 +419,7 @@ data class RPCDriverDSL(
|
||||
server.start()
|
||||
driverDSL.shutdownManager.registerShutdown {
|
||||
server.stop()
|
||||
addressMustNotBeBound(driverDSL.executorService, hostAndPort).get()
|
||||
addressMustNotBeBound(driverDSL.executorService, hostAndPort)
|
||||
}
|
||||
RpcBrokerHandle(
|
||||
hostAndPort = hostAndPort,
|
||||
|
@ -11,7 +11,7 @@ import net.corda.core.node.services.ServiceType
|
||||
import net.corda.core.utilities.DUMMY_CA
|
||||
import net.corda.core.utilities.DUMMY_MAP
|
||||
import net.corda.core.utilities.WHITESPACE
|
||||
import net.corda.node.driver.addressMustNotBeBound
|
||||
import net.corda.node.driver.addressMustNotBeBoundFuture
|
||||
import net.corda.node.internal.Node
|
||||
import net.corda.node.services.config.ConfigHelper
|
||||
import net.corda.node.services.config.FullNodeConfiguration
|
||||
@ -62,8 +62,8 @@ abstract class NodeBasedTest {
|
||||
// Wait until ports are released
|
||||
val portNotBoundChecks = nodes.flatMap {
|
||||
listOf(
|
||||
it.configuration.p2pAddress.let { addressMustNotBeBound(shutdownExecutor, it) },
|
||||
it.configuration.rpcAddress?.let { addressMustNotBeBound(shutdownExecutor, it) }
|
||||
it.configuration.p2pAddress.let { addressMustNotBeBoundFuture(shutdownExecutor, it) },
|
||||
it.configuration.rpcAddress?.let { addressMustNotBeBoundFuture(shutdownExecutor, it) }
|
||||
)
|
||||
}.filterNotNull()
|
||||
nodes.clear()
|
||||
|
Reference in New Issue
Block a user