[ https://issues.apache.org/jira/browse/GEODE-8772?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17352884#comment-17352884 ]
ASF subversion and git services commented on GEODE-8772: -------------------------------------------------------- Commit b67d77a0241d03627c244951f8ce9b977b0f2fca in geode's branch refs/heads/develop from Dale Emery [ https://gitbox.apache.org/repos/asf?p=geode.git;h=b67d77a ] GEODE-8772: Fix ClusterComms test port conflicts (#6533) Change `ClusterCommunicationsDUnitTest` to assign the locator port in the test JVM and to not start the HTTP service. BACKGROUND I am working on a project to allow Geode tests to run in parallel outside of Docker. Running in parallel outside of Docker requires tests: - To assign ports only in the test JVM, to ensure that ports are assigned only by the latest implementation of `AvailablePortHelper`, which knows how to allocate a unique range of ports to each test. - Not to start services using default ports, to ensure that no two tests try to use a default port at the same time. This commit prepares for those changes. PROBLEMS `ClusterCommunicationsDUnitTest` inhibits running in parallel outside of Docker in two ways: - It calls `createLocator()` in child VMs running prior versions of Geode. The method assigns a locator port by calling `AvailablePortHelper`. The old implementation of `AvailablePortHelper` in the child VM might assign a port that is "reserved" by another test, resulting in bind failures. - `createLocator()` tacitly starts the HTTP service on the default port (7070). If multiple tests attempt to bind to this port, some will experience bind failures. THIS COMMIT Change `ClusterCommunicationsDUnitTest` to: - Assign the locator port in the test JVM. - Disable the HTTP service, which the test does not need. > Make tests assign necessary ports in test JVM [PERMANENT] > --------------------------------------------------------- > > Key: GEODE-8772 > URL: https://issues.apache.org/jira/browse/GEODE-8772 > Project: Geode > Issue Type: Test > Components: tests > Affects Versions: 1.14.0 > Reporter: Dale Emery > Assignee: Dale Emery > Priority: Major > Labels: GeodeOperationAPI, pull-request-available > > *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. -- This message was sent by Atlassian Jira (v8.3.4#803005)