Skip to content

Conversation

@demery-pivotal
Copy link
Contributor

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.

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.
Copy link
Contributor

@Bill Bill left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved.

Made one optional suggestion below…


private int createLocator(VM memberVM, boolean usingOldVersion) {
private int createLocator(VM memberVM) {
final int port = AvailablePortHelper.getRandomAvailableTCPPort();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One minor tweak might be to move this definition closer to the first point of use down on line 262.

@demery-pivotal demery-pivotal merged commit b8aef02 into apache:develop May 14, 2021
@demery-pivotal demery-pivotal deleted the geode-8772/tcp-server-version-tests branch May 14, 2021 15:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants