We're updating the issue view to help you get more done. 

Fix Driver's PortAllocation class, and then use it for Node's integration tests.


Corda's node-driver contains a PortAllocation class that provides a new port number atomically from a given starting port number. There is also a GlobalTestPortAllocation variant which is intended to be used across a suite of tests running in the same JVM.

The GlobalTestPortAllocation class is enabled and configured by these two system properties:

1 2 corda.test.global.port.allocation.enabled=true corda.test.global.port.allocation.starting.port=NNN

Unfortunately, Corda's net.corda.node.services.config.ConfigHelper object assumes that every system property starting with corda. is intended to configure the Node, so enabling the GlobalTestPortAllocation breaks node-driver.

I will rename these system properties as follows, so as not to conflict with ConfigHelper:

1 2 testing.global.port.allocation.enabled testing.global.port.allocation.starting.port

I will also ensure that PortAllocation wraps back to its startingPort when it reaches 49152, because ports 49152-65535 are designated as "ephemeral ports" by TCP/IP.

Finally, I will enabled GlobalTestPortAllocation for Node's integration tests.



Chris Rankin


Chris Rankin





Fix versions

Ported to...


Feature Team

Dev Ops

Affects versions

Corda 4
Corda Enterprise 4