This is an automated email from the ASF dual-hosted git repository.

jensdeppe pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/geode.git


The following commit(s) were added to refs/heads/develop by this push:
     new bd45232  GEODE-6268: Reduce the number of iterations for unique port 
ranges in AvailablePortHelperIntegrationTest (#3092)
bd45232 is described below

commit bd45232c82e9651a85074fe939540ca115918f4b
Author: Jens Deppe <[email protected]>
AuthorDate: Fri Jan 18 15:20:23 2019 -0800

    GEODE-6268: Reduce the number of iterations for unique port ranges in 
AvailablePortHelperIntegrationTest (#3092)
    
    - This test was failing fairly consistently on Windows. An initial 
assumption
      was that the given port range would be completely free. This is typically
      true in a Linux/Docker environment but is not the case on Windows.
    - The logic of these modified tests is somewhat extreme as in actual use, 
there
      would never be a need for 1000 ranges.
    
    Signed-off-by: Aditya Anchuri <[email protected]>
---
 .../org/apache/geode/internal/AvailablePortHelperIntegrationTest.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git 
a/geode-core/src/integrationTest/java/org/apache/geode/internal/AvailablePortHelperIntegrationTest.java
 
b/geode-core/src/integrationTest/java/org/apache/geode/internal/AvailablePortHelperIntegrationTest.java
index b6adc70..0d68ae6 100644
--- 
a/geode-core/src/integrationTest/java/org/apache/geode/internal/AvailablePortHelperIntegrationTest.java
+++ 
b/geode-core/src/integrationTest/java/org/apache/geode/internal/AvailablePortHelperIntegrationTest.java
@@ -266,7 +266,7 @@ public class AvailablePortHelperIntegrationTest {
   @Parameters({"true", "false"})
   public void initializeUniquePortRange_willReturnSamePortsForSameRange(
       final boolean useMembershipPortRange) {
-    for (int i = 0; i < 1000; ++i) {
+    for (int i = 0; i < 100; ++i) {
       initializeUniquePortRange(i);
       int[] testPorts = getRandomAvailableTCPPorts(3, useMembershipPortRange);
       initializeUniquePortRange(i);
@@ -280,7 +280,7 @@ public class AvailablePortHelperIntegrationTest {
       final boolean useMembershipPortRange) {
     Set<Integer> ports = new HashSet<>();
 
-    for (int i = 0; i < 1000; ++i) {
+    for (int i = 0; i < 100; ++i) {
       initializeUniquePortRange(i);
       int[] testPorts = getRandomAvailableTCPPorts(5, useMembershipPortRange);
       for (int testPort : testPorts) {

Reply via email to