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

bschuchardt pushed a commit to branch feature/GEODE-6724
in repository https://gitbox.apache.org/repos/asf/geode.git


The following commit(s) were added to refs/heads/feature/GEODE-6724 by this 
push:
     new bd90364  fixing unit test failures
bd90364 is described below

commit bd9036402d74b11aba85348769d3556ef5add713
Author: Bruce Schuchardt <[email protected]>
AuthorDate: Tue Apr 30 16:38:40 2019 -0700

    fixing unit test failures
---
 .../geode/distributed/internal/membership/gms/GMSUtil.java     |  3 +++
 .../internal/membership/gms/membership/GMSJoinLeave.java       | 10 +++++-----
 2 files changed, 8 insertions(+), 5 deletions(-)

diff --git 
a/geode-core/src/main/java/org/apache/geode/distributed/internal/membership/gms/GMSUtil.java
 
b/geode-core/src/main/java/org/apache/geode/distributed/internal/membership/gms/GMSUtil.java
index 0e14918..0ccc8dc 100644
--- 
a/geode-core/src/main/java/org/apache/geode/distributed/internal/membership/gms/GMSUtil.java
+++ 
b/geode-core/src/main/java/org/apache/geode/distributed/internal/membership/gms/GMSUtil.java
@@ -86,6 +86,9 @@ public class GMSUtil {
         int startIdx = str.indexOf('[') + 1;
         int endIdx = str.indexOf(']');
         port = Integer.parseInt(str.substring(startIdx, endIdx));
+        if (port <= 0) {
+          continue;
+        }
         InetSocketAddress isa = new InetSocketAddress(host, port);
 
         if (checkLoopback) {
diff --git 
a/geode-core/src/main/java/org/apache/geode/distributed/internal/membership/gms/membership/GMSJoinLeave.java
 
b/geode-core/src/main/java/org/apache/geode/distributed/internal/membership/gms/membership/GMSJoinLeave.java
index d7712c1..a791053 100644
--- 
a/geode-core/src/main/java/org/apache/geode/distributed/internal/membership/gms/membership/GMSJoinLeave.java
+++ 
b/geode-core/src/main/java/org/apache/geode/distributed/internal/membership/gms/membership/GMSJoinLeave.java
@@ -380,11 +380,11 @@ public class GMSJoinLeave implements JoinLeave, 
MessageHandler {
               logger.debug("sleeping for {} before making another attempt to 
find the coordinator",
                   retrySleep);
               Thread.sleep(retrySleep);
-            } /* else { */
-            // since we were given a coordinator that couldn't be used we 
should keep trying
-            tries = 0;
-            giveupTime = System.currentTimeMillis() + timeout;
-            // }
+            } else {
+              // since we were given a coordinator that couldn't be used we 
should keep trying
+              tries = 0;
+              giveupTime = System.currentTimeMillis() + timeout;
+            }
           }
         } catch (InterruptedException e) {
           logger.debug("retry sleep interrupted - giving up on joining the 
distributed system");

Reply via email to