Uploaded image for project: 'Corda'
  1. CORDA-2759

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

    Details

    • Severity:
      Medium
    • Feature Team:
      Dev Ops
    • Sprint:

      Description

      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:

      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:

      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.

        Attachments

          Issue links

            Activity

              People

              • Assignee:
                chris.rankin Chris Rankin
                Reporter:
                chris.rankin Chris Rankin
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: