Uploaded image for project: 'Geode'
  1. Geode
  2. GEODE-8772

Make tests assign necessary ports in test JVM [PERMANENT]




      Make tests assign all necessary ports. Many distributed tests and upgrade tests (and sometimes others) launch members with default ports, especially for JMX (1099) and HTTP service (7070). When run in parallel outside of docker, these tests often fail because the default port is already in use in another test.

      Except when specifically testing the product's use of the defaults, every test should assign ports from a pool of ports known to be available. For many tests, we can accomplish this by changing the test framework to assign available ports. Other tests may require changes in the test code.

      Assign ports only in test JVMs, and not in child VMs. The AvailablePortHelper class occasionally gains new features to improve its assignment of ports when tests run in parallel. For these improvements to work, each test must use the latest AvailablePortHelper implementation for all port assignments. Child VMs that run older versions of Geode may not include the latest implementation of AvailablePortHelper. For this reason, tests should invoke AvailablePortHelper only in the test JVM and not in child VMs.




            • Assignee:
              demery Dale Emery
              demery Dale Emery
            • Votes:
              0 Vote for this issue
              3 Start watching this issue


              • Created: