geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kl...@apache.org
Subject [56/57] [abbrv] geode git commit: GEODE-2497 surprise member not removed during startup
Date Wed, 22 Feb 2017 17:28:09 GMT
GEODE-2497 surprise member not removed during startup

addressing Galen's comments on the pull request


Project: http://git-wip-us.apache.org/repos/asf/geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/geode/commit/3474fa7a
Tree: http://git-wip-us.apache.org/repos/asf/geode/tree/3474fa7a
Diff: http://git-wip-us.apache.org/repos/asf/geode/diff/3474fa7a

Branch: refs/heads/feature/GEODE-2460
Commit: 3474fa7ab4bccbe7a08f70e251ac778eebd6c453
Parents: 135bd77
Author: Bruce Schuchardt <bschuchardt@pivotal.io>
Authored: Tue Feb 21 16:36:39 2017 -0800
Committer: Bruce Schuchardt <bschuchardt@pivotal.io>
Committed: Tue Feb 21 16:36:39 2017 -0800

----------------------------------------------------------------------
 .../membership/gms/mgr/GMSMembershipManager.java      |  6 +++---
 .../internal/DistributionManagerDUnitTest.java        | 14 ++++++--------
 2 files changed, 9 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/geode/blob/3474fa7a/geode-core/src/main/java/org/apache/geode/distributed/internal/membership/gms/mgr/GMSMembershipManager.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/distributed/internal/membership/gms/mgr/GMSMembershipManager.java
b/geode-core/src/main/java/org/apache/geode/distributed/internal/membership/gms/mgr/GMSMembershipManager.java
index 050e201..d0a0cbe 100644
--- a/geode-core/src/main/java/org/apache/geode/distributed/internal/membership/gms/mgr/GMSMembershipManager.java
+++ b/geode-core/src/main/java/org/apache/geode/distributed/internal/membership/gms/mgr/GMSMembershipManager.java
@@ -576,7 +576,7 @@ public class GMSMembershipManager implements MembershipManager, Manager
{
       // expire surprise members, add others to view
       long oldestAllowed = System.currentTimeMillis() - this.surpriseMemberTimeout;
       for (Iterator<Map.Entry<InternalDistributedMember, Long>> it =
-           surpriseMembers.entrySet().iterator(); it.hasNext();) {
+          surpriseMembers.entrySet().iterator(); it.hasNext();) {
         Map.Entry<InternalDistributedMember, Long> entry = it.next();
         Long birthtime = entry.getValue();
         if (birthtime.longValue() < oldestAllowed) {
@@ -1150,7 +1150,7 @@ public class GMSMembershipManager implements MembershipManager, Manager
{
 
   @Override
   public void memberSuspected(InternalDistributedMember initiator,
-                              InternalDistributedMember suspect, String reason) {
+      InternalDistributedMember suspect, String reason) {
     SuspectMember s = new SuspectMember(initiator, suspect, reason);
     handleOrDeferSuspect(s);
   }
@@ -1803,7 +1803,7 @@ public class GMSMembershipManager implements MembershipManager, Manager
{
   }
 
   public Set<InternalDistributedMember> send(InternalDistributedMember[] destinations,
-                                             DistributionMessage msg, DMStats theStats) throws
NotSerializableException {
+      DistributionMessage msg, DMStats theStats) throws NotSerializableException {
     Set<InternalDistributedMember> result;
     boolean allDestinations = msg.forAll();
 

http://git-wip-us.apache.org/repos/asf/geode/blob/3474fa7a/geode-core/src/test/java/org/apache/geode/distributed/internal/DistributionManagerDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/org/apache/geode/distributed/internal/DistributionManagerDUnitTest.java
b/geode-core/src/test/java/org/apache/geode/distributed/internal/DistributionManagerDUnitTest.java
index 5e3cf3e..08e3b87 100644
--- a/geode-core/src/test/java/org/apache/geode/distributed/internal/DistributionManagerDUnitTest.java
+++ b/geode-core/src/test/java/org/apache/geode/distributed/internal/DistributionManagerDUnitTest.java
@@ -77,7 +77,8 @@ public class DistributionManagerDUnitTest extends JUnit4DistributedTestCase
{
   public static DistributedSystem ds;
 
   @Rule
-  public DistributedRestoreSystemProperties restoreSystemProperties = new DistributedRestoreSystemProperties();
+  public DistributedRestoreSystemProperties restoreSystemProperties =
+      new DistributedRestoreSystemProperties();
 
   /**
    * Clears the exceptionInThread flag in the given distribution manager.
@@ -174,8 +175,7 @@ public class DistributionManagerDUnitTest extends JUnit4DistributedTestCase
{
 
       // if the view number isn't being recorded correctly the test will pass but the
       // functionality is broken
-      Assert.assertTrue("expected view ID to be greater than zero",
-          mgr.getView().getViewId() > 0);
+      Assert.assertTrue("expected view ID to be greater than zero", mgr.getView().getViewId()
> 0);
 
       int oldViewId = mbr.getVmViewId();
       mbr.setVmViewId((int) mgr.getView().getViewId() - 1);
@@ -200,11 +200,9 @@ public class DistributionManagerDUnitTest extends JUnit4DistributedTestCase
{
       MembershipManagerHelper.addSurpriseMember(sys, mbr, birthTime);
       assertTrue("Member was not a surprise member", mgr.isSurpriseMember(mbr));
 
-      if (birthTime < (System.currentTimeMillis() - timeout)) {
-        return; // machine is too busy and we didn't get enough CPU to perform more assertions
-      }
-      assertTrue("Member was incorrectly removed from surprise member set",
-          mgr.isSurpriseMember(mbr));
+//      if (birthTime < (System.currentTimeMillis() - timeout)) {
+//        return; // machine is too busy and we didn't get enough CPU to perform more assertions
+//      }
 
       Awaitility.await("waiting for member to be removed")
           .atMost((timeout / 3) + gracePeriod, TimeUnit.MILLISECONDS)


Mime
View raw message