Allocate ports in a non-deprecated way

This commit is contained in:
Dominic Fox 2018-07-20 11:38:33 +01:00
parent 935c4d2863
commit 7217a27b28

View File

@ -34,6 +34,7 @@ import net.corda.nodeapi.internal.ArtemisMessagingComponent.Companion.P2P_PREFIX
import net.corda.nodeapi.internal.protonwrapper.messages.MessageStatus
import net.corda.nodeapi.internal.protonwrapper.netty.*
import net.corda.testing.core.*
import net.corda.testing.driver.PortAllocation
import net.corda.testing.internal.rigorousMock
import org.apache.activemq.artemis.api.core.RoutingType
import org.junit.After
@ -50,10 +51,11 @@ class SocksTests {
@JvmField
val temporaryFolder = TemporaryFolder()
private val socksPort = freePort()
private val serverPort = freePort()
private val serverPort2 = freePort()
private val artemisPort = freePort()
private val portAllocator = PortAllocation.Incremental(10000)
private val socksPort = portAllocator.nextPort()
private val serverPort = portAllocator.nextPort()
private val serverPort2 = portAllocator.nextPort()
private val artemisPort = portAllocator.nextPort()
private abstract class AbstractNodeConfiguration : NodeConfiguration