You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@geode.apache.org by GitBox <gi...@apache.org> on 2021/05/24 17:49:22 UTC

[GitHub] [geode] demery-pivotal opened a new pull request #6512: GEODE-8772: ClientServer test port assignment

demery-pivotal opened a new pull request #6512:
URL: https://github.com/apache/geode/pull/6512


   Change `ClientServerMiscDUnitTestBase` and `ClientServerMiscBCDUnitTest`
   to assign ports only in the test JVM.
   
   BACKGROUND
   
   As part of my project to allow Geode tests to run in parallel outside of
   Docker, I am changing our build system to allocate a distinct range of
   ports to each test JVM, and changing `AvailablePort` and
   `AvailablePortHelper` to honor these allocated port ranges.
   
   This commit prepares for those changes.
   
   PROBLEM
   
   To test compatibility, `ClientServerMiscDUnitTestBase` executes
   `createServerCache()` in a child VMs running old versions of Geode. The
   `createServerCache()` method assigns a server port via
   `AvailablePortHelper`.  The old implementation of `AvailablePortHelper`
   in the child VM does not honor the range of ports allocated to the child
   VM.
   
   If such tests run in parallel outside of Docker, the
   `createServerCache()` method in each test may assign the same port. If
   the servers in multiple tests attempt to bind to that port at the same
   time, all but one server will fail.
   
   GENERAL SOLUTION
   
   Make tests assign ports only in the test JVM. The test JVM always
   includes the latest implementations of `AvailablePort` and
   `AvailablePortHelper`, and so the tests  will honor any port allocation
   scheme defined in the latest implementation.
   
   THIS COMMIT
   
   - Add a `port` parameter to `createServerCache()`.
   - Change `ClientServerMiscDUnitTestBase` and
     `ClientServerMiscBCDUnitTest` to assign server ports in methods called
     only in the test JVM.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [geode] demery-pivotal closed pull request #6512: GEODE-8772: ClientServer test port assignment

Posted by GitBox <gi...@apache.org>.
demery-pivotal closed pull request #6512:
URL: https://github.com/apache/geode/pull/6512


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org