[ 
https://issues.apache.org/jira/browse/GEODE-8772?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17344678#comment-17344678
 ] 

ASF subversion and git services commented on GEODE-8772:
--------------------------------------------------------

Commit b8aef025bac80f52729aa0201d8fe1c905862038 in geode's branch 
refs/heads/develop from Dale Emery
[ https://gitbox.apache.org/repos/asf?p=geode.git;h=b8aef02 ]

GEODE-8772: Assign TCP Server test ports in test JVM (#6472)

* GEODE-8772: Assign TCP Server test ports in test JVM

Make TcpServerProductVersionDUnitTest assign the locator port in the
test JVM rather than in child VMs.

An upcoming change to AvailablePortHelper will improve how it assigns
ports to better support tests running in parallel outside of docker.  A
child VM running an older version of Geode (as happens in this test)
will have an out-of-date implementation of AvailablePortHelper, and so
may assign a port that is in use by another test running in parallel.

* Move func per review suggestion

> 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)

Reply via email to