geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kl...@apache.org
Subject [10/19] incubator-geode git commit: GEODE-870: Amending code as per code review Adding wait on CqQueryUsingPoolDUnitTest to make test pass
Date Mon, 29 Feb 2016 20:50:18 GMT
GEODE-870: Amending code as per code review
Adding wait on CqQueryUsingPoolDUnitTest to make test pass


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

Branch: refs/heads/feature/GEODE-953
Commit: 8b24a4fcf86e913d50d5949fb69d1e8c7cb9e125
Parents: 1bf1503
Author: Udo Kohlmeyer <ukohlmeyer@pivotal.io>
Authored: Mon Feb 15 10:05:41 2016 +1100
Committer: Udo Kohlmeyer <ukohlmeyer@pivotal.io>
Committed: Mon Feb 29 16:36:08 2016 +1100

----------------------------------------------------------------------
 .../gms/membership/GMSJoinLeaveHelper.java      | 60 -----------------
 .../gms/membership/GMSJoinLeaveTestHelper.java  | 67 ++++++++++++++++++
 .../internal/membership/NetView.java            |  3 -
 .../membership/gms/membership/GMSJoinLeave.java | 25 ++++---
 .../gemfire/distributed/LocatorDUnitTest.java   | 30 ++++-----
 .../gms/membership/GMSJoinLeaveJUnitTest.java   | 71 ++++++++++----------
 .../sanctionedDataSerializables.txt             |  4 +-
 .../cq/dunit/CqQueryUsingPoolDUnitTest.java     |  4 +-
 8 files changed, 135 insertions(+), 129 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8b24a4fc/gemfire-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/membership/GMSJoinLeaveHelper.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/membership/GMSJoinLeaveHelper.java
b/gemfire-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/membership/GMSJoinLeaveHelper.java
deleted file mode 100644
index b8311bc..0000000
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/membership/GMSJoinLeaveHelper.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.gemstone.gemfire.distributed.internal.membership.gms.membership;
-
-import com.gemstone.gemfire.distributed.Locator;
-import com.gemstone.gemfire.distributed.internal.DM;
-import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
-import com.gemstone.gemfire.distributed.internal.membership.gms.Services;
-import com.gemstone.gemfire.distributed.internal.membership.gms.mgr.GMSMembershipManager;
-
-public class GMSJoinLeaveHelper {
-  public static boolean isViewCreator() {
-    GMSJoinLeave gmsJoinLeave = getGmsJoinLeave();
-    if (gmsJoinLeave != null) {
-      GMSJoinLeave.ViewCreator viewCreator = gmsJoinLeave.getViewCreator();
-      if (viewCreator != null && !viewCreator.isShutdown()) {
-        return true;
-      } else {
-        return false;
-      }
-    }
-    throw new RuntimeException("This should not have happened. There should be a JoinLeave
for every DS");
-  }
-
-  private static GMSJoinLeave getGmsJoinLeave() {
-    InternalDistributedSystem distributedSystem = getInternalDistributedSystem();
-    DM dm = distributedSystem.getDM();
-    GMSMembershipManager membershipManager = (GMSMembershipManager) dm.getMembershipManager();
-    Services services = membershipManager.getServices();
-    return (GMSJoinLeave) services.getJoinLeave();
-  }
-
-  public static Integer getViewId() {
-    return getGmsJoinLeave().getView().getViewId();
-  }
-
-  private static InternalDistributedSystem getInternalDistributedSystem() {
-    InternalDistributedSystem distributedSystem = InternalDistributedSystem.getAnyInstance();
-    if (distributedSystem == null) {
-      Locator locator = Locator.getLocator();
-      return (InternalDistributedSystem) locator.getDistributedSystem();
-    } else {
-      return distributedSystem;
-    }
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8b24a4fc/gemfire-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/membership/GMSJoinLeaveTestHelper.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/membership/GMSJoinLeaveTestHelper.java
b/gemfire-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/membership/GMSJoinLeaveTestHelper.java
new file mode 100644
index 0000000..493c625
--- /dev/null
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/membership/GMSJoinLeaveTestHelper.java
@@ -0,0 +1,67 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.gemstone.gemfire.distributed.internal.membership.gms.membership;
+
+import com.gemstone.gemfire.distributed.Locator;
+import com.gemstone.gemfire.distributed.internal.DM;
+import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
+import com.gemstone.gemfire.distributed.internal.membership.gms.Services;
+import com.gemstone.gemfire.distributed.internal.membership.gms.mgr.GMSMembershipManager;
+
+public class GMSJoinLeaveTestHelper {
+
+  public static void becomeCoordinatorForTest(GMSJoinLeave gmsJoinLeave) {
+    synchronized (gmsJoinLeave.getViewInstallationLock()) {
+      gmsJoinLeave.becomeCoordinator();
+    }
+  }
+
+  public static boolean isViewCreator() {
+    GMSJoinLeave gmsJoinLeave = getGmsJoinLeave();
+    if (gmsJoinLeave != null) {
+      GMSJoinLeave.ViewCreator viewCreator = gmsJoinLeave.getViewCreator();
+      if (viewCreator != null && !viewCreator.isShutdown()) {
+        return true;
+      } else {
+        return false;
+      }
+    }
+    throw new RuntimeException("This should not have happened. There should be a JoinLeave
for every DS");
+  }
+
+  private static GMSJoinLeave getGmsJoinLeave() {
+    InternalDistributedSystem distributedSystem = getInternalDistributedSystem();
+    DM dm = distributedSystem.getDM();
+    GMSMembershipManager membershipManager = (GMSMembershipManager) dm.getMembershipManager();
+    Services services = membershipManager.getServices();
+    return (GMSJoinLeave) services.getJoinLeave();
+  }
+
+  public static Integer getViewId() {
+    return getGmsJoinLeave().getView().getViewId();
+  }
+
+  private static InternalDistributedSystem getInternalDistributedSystem() {
+    InternalDistributedSystem distributedSystem = InternalDistributedSystem.getAnyInstance();
+    if (distributedSystem == null) {
+      Locator locator = Locator.getLocator();
+      return (InternalDistributedSystem) locator.getDistributedSystem();
+    } else {
+      return distributedSystem;
+    }
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8b24a4fc/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/NetView.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/NetView.java
b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/NetView.java
index af05f82..af4aec3 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/NetView.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/NetView.java
@@ -48,9 +48,6 @@ import com.gemstone.gemfire.internal.Version;
  */
 public class NetView implements DataSerializableFixedID {
 
-  private static final Logger logger = LogService.getLogger();
-
-
   private int viewId;
   private List<InternalDistributedMember> members;
   private int[] failureDetectionPorts = new int[10];

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8b24a4fc/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/membership/GMSJoinLeave.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/membership/GMSJoinLeave.java
b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/membership/GMSJoinLeave.java
index 56b644c..8ba4952 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/membership/GMSJoinLeave.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/membership/GMSJoinLeave.java
@@ -152,6 +152,9 @@ public class GMSJoinLeave implements JoinLeave, MessageHandler {
   /** the view where quorum was most recently lost */
   NetView quorumLostView;
 
+  /** a flag to mark a coordinator's viewCreator for shutdown */
+  private boolean markViewCreatorForShutdown = false;
+
   static class SearchState {
     Set<InternalDistributedMember> alreadyTried = new HashSet<>();
     Set<InternalDistributedMember> registrants = new HashSet<>();
@@ -172,6 +175,10 @@ public class GMSJoinLeave implements JoinLeave, MessageHandler {
     }
   }
 
+  Object getViewInstallationLock() {
+    return viewInstallationLock;
+  }
+
   /**
    * attempt to join the distributed system
    * loop
@@ -581,12 +588,6 @@ public class GMSJoinLeave implements JoinLeave, MessageHandler {
     becomeCoordinator(null);
   }
 
-  public void becomeCoordinatorForTest() {
-    synchronized (viewInstallationLock) {
-      becomeCoordinator();
-    }
-  }
-
   /**
    * Test hook for delaying the creation of new views.
    * This should be invoked before this member becomes coordinator
@@ -640,6 +641,7 @@ public class GMSJoinLeave implements JoinLeave, MessageHandler {
         viewCreator.setInitialView(newView, newView.getNewMembers(), newView.getShutdownMembers(),
newView.getCrashedMembers());
       }
       viewCreator.setDaemon(true);
+      logger.info("ViewCreator starting on:" + localAddress);
       viewCreator.start();
     }
   }
@@ -715,9 +717,9 @@ public class GMSJoinLeave implements JoinLeave, MessageHandler {
     } else {
       //Added a check in the view processor to turn off the ViewCreator
       //if another server is the coordinator - GEODE-870
-      if(!localAddress.equals(view.getCoordinator()) && getViewCreator() != null)
-      {
-        stopCoordinatorServices();
+      if (isCoordinator && !localAddress.equals(view.getCoordinator()) &&
getViewCreator() != null) {
+        markViewCreatorForShutdown = true;
+        this.isCoordinator = false;
       }
       installView(view);
     }
@@ -2077,7 +2079,6 @@ public class GMSJoinLeave implements JoinLeave, MessageHandler {
         }
 
         logger.debug("unresponsive members that could not be reached: {}", unresponsive);
-
         List<InternalDistributedMember> failures = new ArrayList<>(currentView.getCrashedMembers().size()
+ unresponsive.size());
 
         if (conflictingView != null && !conflictingView.getCreator().equals(localAddress)
&& conflictingView.getViewId() > newView.getViewId()
@@ -2150,6 +2151,10 @@ public class GMSJoinLeave implements JoinLeave, MessageHandler {
 
       sendView(newView, joinReqs);
 
+      if (markViewCreatorForShutdown && getViewCreator() != null) {
+        shutdown = true;
+      }
+
       // after sending a final view we need to stop this thread if
       // the GMS is shutting down
       if (isStopping()) {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8b24a4fc/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorDUnitTest.java
b/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorDUnitTest.java
index eb3cc62..5969c51 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorDUnitTest.java
@@ -39,14 +39,13 @@ import com.gemstone.gemfire.distributed.internal.membership.MembershipManager;
 import com.gemstone.gemfire.distributed.internal.membership.MembershipTestHook;
 import com.gemstone.gemfire.distributed.internal.membership.NetView;
 import com.gemstone.gemfire.distributed.internal.membership.gms.MembershipManagerHelper;
-import com.gemstone.gemfire.distributed.internal.membership.gms.membership.GMSJoinLeaveHelper;
+import com.gemstone.gemfire.distributed.internal.membership.gms.membership.GMSJoinLeaveTestHelper;
 import com.gemstone.gemfire.internal.Assert;
 import com.gemstone.gemfire.internal.AvailablePort;
 import com.gemstone.gemfire.internal.AvailablePortHelper;
 import com.gemstone.gemfire.internal.logging.InternalLogWriter;
 import com.gemstone.gemfire.internal.logging.LocalLogWriter;
 import com.gemstone.gemfire.internal.tcp.Connection;
-import com.gemstone.gemfire.test.dunit.*;
 
 import java.io.File;
 import java.io.IOException;
@@ -1325,7 +1324,6 @@ public class LocatorDUnitTest extends DistributedTestCase {
     dsProps.setProperty("locators", locators);
     dsProps.setProperty("mcast-port", "0");
     dsProps.setProperty(DistributionConfig.ENABLE_CLUSTER_CONFIGURATION_NAME, "false");
-    final String uniqueName = getUniqueName();
 
     vm0.invoke(new SerializableRunnable("Start locator on " + port1) {
       public void run() {
@@ -1443,7 +1441,7 @@ public class LocatorDUnitTest extends DistributedTestCase {
     final Properties dsProps = new Properties();
     dsProps.setProperty("locators", locators);
     dsProps.setProperty("mcast-port", "0");
-    dsProps.setProperty("log-level", "FINE");
+    dsProps.setProperty("log-level", LogWriterUtils.getDUnitLogLevel());
     dsProps.setProperty("enable-network-partition-detection", "true");
     dsProps.setProperty(DistributionConfig.ENABLE_CLUSTER_CONFIGURATION_NAME, "false");
 
@@ -1459,7 +1457,7 @@ public class LocatorDUnitTest extends DistributedTestCase {
                 Properties props = new Properties();
                 props.setProperty("mcast-port", "0");
                 props.setProperty("locators", locators);
-                props.setProperty("log-level", "FINE");
+                props.setProperty("log-level", LogWriterUtils.getDUnitLogLevel());
                 props.setProperty("enable-network-partition-detection", "true");
                 DistributedSystem.connect(props);
               }
@@ -1518,9 +1516,9 @@ public class LocatorDUnitTest extends DistributedTestCase {
             host0 + "[" + port3 + "]";
         dsProps.setProperty("locators", newLocators);
 
-        assertTrue(vm3.invoke(() -> GMSJoinLeaveHelper.isViewCreator()));
+        assertTrue(vm3.invoke(() -> GMSJoinLeaveTestHelper.isViewCreator()));
         //Given the start up order of servers, this server is the elder server
-        assertTrue(vm3.invoke(() -> GMSJoinLeaveHelper.isViewCreator()));
+        assertTrue(vm3.invoke(() -> GMSJoinLeaveTestHelper.isViewCreator()));
 
         startLocatorAsync(vm1, new Object[] { port2, dsProps });
         startLocatorAsync(vm2, new Object[] { port3, dsProps });
@@ -1542,17 +1540,17 @@ public class LocatorDUnitTest extends DistributedTestCase {
         };
         Wait.waitForCriterion(waitCriterion, 10 * 1000, 200, true);
 
-        int netviewId = vm1.invoke(() -> GMSJoinLeaveHelper.getViewId());
-        assertEquals(netviewId, (int) vm2.invoke(() -> GMSJoinLeaveHelper.getViewId()));
-        assertEquals(netviewId, (int) vm3.invoke(() -> GMSJoinLeaveHelper.getViewId()));
-        assertEquals(netviewId, (int) vm4.invoke(() -> GMSJoinLeaveHelper.getViewId()));
-        assertFalse(vm4.invoke(() -> GMSJoinLeaveHelper.isViewCreator()));
+        int netviewId = vm1.invoke(() -> GMSJoinLeaveTestHelper.getViewId());
+        assertEquals(netviewId, (int) vm2.invoke(() -> GMSJoinLeaveTestHelper.getViewId()));
+        assertEquals(netviewId, (int) vm3.invoke(() -> GMSJoinLeaveTestHelper.getViewId()));
+        assertEquals(netviewId, (int) vm4.invoke(() -> GMSJoinLeaveTestHelper.getViewId()));
+        assertFalse(vm4.invoke(() -> GMSJoinLeaveTestHelper.isViewCreator()));
         //Given the start up order of servers, this server is the elder server
-        assertFalse(vm3.invoke(() -> GMSJoinLeaveHelper.isViewCreator()));
-        if (vm1.invoke(() -> GMSJoinLeaveHelper.isViewCreator())) {
-          assertFalse(vm2.invoke(() -> GMSJoinLeaveHelper.isViewCreator()));
+        assertFalse(vm3.invoke(() -> GMSJoinLeaveTestHelper.isViewCreator()));
+        if (vm1.invoke(() -> GMSJoinLeaveTestHelper.isViewCreator())) {
+          assertFalse(vm2.invoke(() -> GMSJoinLeaveTestHelper.isViewCreator()));
         } else {
-          assertTrue(vm2.invoke(() -> GMSJoinLeaveHelper.isViewCreator()));
+          assertTrue(vm2.invoke(() -> GMSJoinLeaveTestHelper.isViewCreator()));
         }
 
       } finally {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8b24a4fc/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/membership/GMSJoinLeaveJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/membership/GMSJoinLeaveJUnitTest.java
b/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/membership/GMSJoinLeaveJUnitTest.java
index 79aa02a..202888c 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/membership/GMSJoinLeaveJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/membership/GMSJoinLeaveJUnitTest.java
@@ -214,7 +214,7 @@ public class GMSJoinLeaveJUnitTest {
   @Test
   public void testViewWithoutMemberInitiatesForcedDisconnect() throws Exception {
     initMocks();
-    gmsJoinLeave.becomeCoordinatorForTest();
+    GMSJoinLeaveTestHelper.becomeCoordinatorForTest(gmsJoinLeave);
     List<InternalDistributedMember> members = Arrays.asList(mockMembers);
     NetView v = new NetView(mockMembers[0], 2, members);
     InstallViewMessage message = new InstallViewMessage(v, null);
@@ -329,7 +329,7 @@ public class GMSJoinLeaveJUnitTest {
         any(String.class), any(Boolean.class))).thenReturn(true);
     
     gmsJoinLeave.delayViewCreationForTest(5000); // ensures multiple requests are queued
for a view change
-    gmsJoinLeave.becomeCoordinatorForTest();
+    GMSJoinLeaveTestHelper.becomeCoordinatorForTest(gmsJoinLeave);
 
     NetView oldView = null;
     long giveup = System.currentTimeMillis() + viewInstallationTime;
@@ -422,9 +422,8 @@ public class GMSJoinLeaveJUnitTest {
     String reason = "testing";
     initMocks();
     gmsJoinLeave.unitTesting.add("noRandomViewChange");
-    prepareAndInstallView(mockMembers[0], createMemberList(mockMembers[0], gmsJoinLeaveMemberId));
-    gmsJoinLeave.getView().add(gmsJoinLeaveMemberId);
-    gmsJoinLeave.becomeCoordinatorForTest();
+    prepareAndInstallView(gmsJoinLeaveMemberId, createMemberList(gmsJoinLeaveMemberId,mockMembers[0]));
+    GMSJoinLeaveTestHelper.becomeCoordinatorForTest(gmsJoinLeave);
 
     LeaveRequestMessage msg = new LeaveRequestMessage(gmsJoinLeave.getMemberID(), mockMembers[0],
reason);
     msg.setSender(mockMembers[0]);
@@ -446,11 +445,10 @@ public class GMSJoinLeaveJUnitTest {
   public void testDuplicateRemoveRequestDoesNotCauseNewView() throws Exception {
     String reason = "testing";
     initMocks();
-    prepareAndInstallView(mockMembers[0], createMemberList(mockMembers[0], gmsJoinLeaveMemberId));
-    gmsJoinLeave.getView().add(gmsJoinLeaveMemberId);
+    prepareAndInstallView(gmsJoinLeaveMemberId, createMemberList(gmsJoinLeaveMemberId,mockMembers[0]));
     gmsJoinLeave.getView().add(mockMembers[1]);
     gmsJoinLeave.unitTesting.add("noRandomViewChange");
-    gmsJoinLeave.becomeCoordinatorForTest();
+    GMSJoinLeaveTestHelper.becomeCoordinatorForTest(gmsJoinLeave);
     RemoveMemberMessage msg = new RemoveMemberMessage(gmsJoinLeave.getMemberID(), mockMembers[0],
reason);
     msg.setSender(mockMembers[0]);
     gmsJoinLeave.processMessage(msg);
@@ -474,10 +472,9 @@ public class GMSJoinLeaveJUnitTest {
     when(healthMonitor.checkIfAvailable(any(InternalDistributedMember.class),
         any(String.class), any(Boolean.class))).thenReturn(true);
     gmsJoinLeave.unitTesting.add("noRandomViewChange");
-    prepareAndInstallView(mockMembers[0], createMemberList(mockMembers[0], gmsJoinLeaveMemberId));
-    gmsJoinLeave.getView().add(gmsJoinLeaveMemberId);
+    prepareAndInstallView(gmsJoinLeaveMemberId, createMemberList(gmsJoinLeaveMemberId,mockMembers[0]));
     gmsJoinLeave.getView().add(mockMembers[1]);
-    gmsJoinLeave.becomeCoordinatorForTest();
+    GMSJoinLeaveTestHelper.becomeCoordinatorForTest(gmsJoinLeave);
     JoinRequestMessage msg = new JoinRequestMessage(gmsJoinLeaveMemberId, mockMembers[2],
null, -1);
     msg.setSender(mockMembers[2]);
     gmsJoinLeave.processMessage(msg);
@@ -522,7 +519,7 @@ public class GMSJoinLeaveJUnitTest {
   public void testRemoveCausesForcedDisconnect() throws Exception {
     String reason = "testing";
     initMocks();
-    prepareAndInstallView(mockMembers[0], createMemberList(mockMembers[0], gmsJoinLeaveMemberId));

+    prepareAndInstallView(mockMembers[0], createMemberList(mockMembers[0], gmsJoinLeaveMemberId));
     gmsJoinLeave.getView().add(mockMembers[1]);
     RemoveMemberMessage msg = new RemoveMemberMessage(mockMembers[0], gmsJoinLeave.getMemberID(),
reason);
     msg.setSender(mockMembers[1]);
@@ -534,8 +531,7 @@ public class GMSJoinLeaveJUnitTest {
   public void testLeaveCausesForcedDisconnect() throws Exception {
     String reason = "testing";
     initMocks();
-    prepareAndInstallView(mockMembers[0], createMemberList(mockMembers[0], gmsJoinLeaveMemberId));
-    gmsJoinLeave.getView().add(gmsJoinLeaveMemberId);
+    prepareAndInstallView(gmsJoinLeaveMemberId, createMemberList(gmsJoinLeaveMemberId,mockMembers[0]));
     gmsJoinLeave.getView().add(mockMembers[1]);
     LeaveRequestMessage msg = new LeaveRequestMessage(gmsJoinLeave.getMemberID(), gmsJoinLeave.getMemberID(),
reason);
     msg.setSender(mockMembers[1]);
@@ -558,7 +554,7 @@ public class GMSJoinLeaveJUnitTest {
   @Test
   public void testBecomeCoordinatorOnStartup() throws Exception {
     initMocks();
-    gmsJoinLeave.becomeCoordinatorForTest();
+    GMSJoinLeaveTestHelper.becomeCoordinatorForTest(gmsJoinLeave);
     long giveup = System.currentTimeMillis() + 20000;
     while (System.currentTimeMillis() < giveup && !gmsJoinLeave.isCoordinator())
{
       Thread.sleep(1000);
@@ -616,7 +612,7 @@ public class GMSJoinLeaveJUnitTest {
     NetView oldView = gmsJoinLeave.getView();
     oldView.add(gmsJoinLeaveMemberId);
     InternalDistributedMember creator = oldView.getCreator();
-    gmsJoinLeave.becomeCoordinatorForTest();
+    GMSJoinLeaveTestHelper.becomeCoordinatorForTest(gmsJoinLeave);
     NetView view = new NetView(2, gmsJoinLeave.getView().getViewId()+1);
     view.setCreator(creator);
     view.add(creator);
@@ -665,7 +661,7 @@ public class GMSJoinLeaveJUnitTest {
   @Test
   public void testNetworkPartitionMessageReceived() throws Exception {
     initMocks();
-    gmsJoinLeave.becomeCoordinatorForTest();
+    GMSJoinLeaveTestHelper.becomeCoordinatorForTest(gmsJoinLeave);
     NetworkPartitionMessage message = new NetworkPartitionMessage();
     gmsJoinLeave.processMessage(message);
     verify(manager).forceDisconnect(any(String.class));
@@ -838,7 +834,7 @@ public class GMSJoinLeaveJUnitTest {
     gmsJoinLeaveMemberId.setVmViewId(1);
     members.add(gmsJoinLeaveMemberId);
     prepareAndInstallView(gmsJoinLeaveMemberId, members);
-    gmsJoinLeave.becomeCoordinatorForTest();
+    GMSJoinLeaveTestHelper.becomeCoordinatorForTest(gmsJoinLeave);
     GMSJoinLeave.ViewBroadcaster b = gmsJoinLeave.new ViewBroadcaster();
     b.run();
     verify(messenger).sendUnreliably(isA(InstallViewMessage.class));
@@ -945,20 +941,22 @@ public class GMSJoinLeaveJUnitTest {
         System.getProperties().remove(GMSJoinLeave.BYPASS_DISCOVERY_PROPERTY);
       }
   }
-  
-  @Test
-  public void testJoinResponseMsgWithBecomeCoordinator() throws Exception {
-    initMocks(false);
-    gmsJoinLeaveMemberId.getNetMember().setPreferredForCoordinator(false);
-    JoinRequestMessage reqMsg = new JoinRequestMessage(gmsJoinLeaveMemberId, mockMembers[0],
null, 56734);
-    InternalDistributedMember ids = new InternalDistributedMember("localhost", 97898);
-    ids.getNetMember().setPreferredForCoordinator(true);
-    gmsJoinLeave.processMessage(reqMsg);
-    ArgumentCaptor<JoinResponseMessage> ac = ArgumentCaptor.forClass(JoinResponseMessage.class);
-    verify(messenger).send(ac.capture());
-    
-    assertTrue("Should have asked for becoming a coordinator", ac.getValue().getBecomeCoordinator());
-  }
+
+//  With the removal of the JoinResponse message from GMSJoinLeave.processJoinRequest (GEODE-870)
+//  This test now seems to be invalid
+//  @Test
+//  public void testJoinResponseMsgWithBecomeCoordinator() throws Exception {
+//    initMocks(false);
+//    gmsJoinLeaveMemberId.getNetMember().setPreferredForCoordinator(false);
+//    JoinRequestMessage reqMsg = new JoinRequestMessage(gmsJoinLeaveMemberId, mockMembers[0],
null, 56734);
+//    InternalDistributedMember ids = new InternalDistributedMember("localhost", 97898);
+//    ids.getNetMember().setPreferredForCoordinator(true);
+//    gmsJoinLeave.processMessage(reqMsg);
+//    ArgumentCaptor<JoinResponseMessage> ac = ArgumentCaptor.forClass(JoinResponseMessage.class);
+//    verify(messenger).send(ac.capture());
+//
+//    assertTrue("Should have asked for becoming a coordinator", ac.getValue().getBecomeCoordinator());
+//  }
   
   @Test
   public void testNetworkPartionMessage() throws Exception {
@@ -1004,8 +1002,7 @@ public class GMSJoinLeaveJUnitTest {
   @Test
   public void testPreparedViewFoundDuringBecomeCoordinator() throws Exception {
     initMocks(false);
-    prepareAndInstallView(mockMembers[0], createMemberList(mockMembers[0], gmsJoinLeaveMemberId));
-    
+    prepareAndInstallView(gmsJoinLeaveMemberId, createMemberList(gmsJoinLeaveMemberId,mockMembers[0]));
     // a new member is joining
     NetView preparedView = new NetView(gmsJoinLeave.getView(), gmsJoinLeave.getView().getViewId()+5);
     mockMembers[1].setVmViewId(preparedView.getViewId());
@@ -1014,7 +1011,7 @@ public class GMSJoinLeaveJUnitTest {
     InstallViewMessage msg = new InstallViewMessage(preparedView, null, true);
     gmsJoinLeave.processMessage(msg);
     
-    gmsJoinLeave.becomeCoordinatorForTest();
+    GMSJoinLeaveTestHelper.becomeCoordinatorForTest(gmsJoinLeave);
 
     Thread.sleep(2000);
     ViewCreator vc = gmsJoinLeave.getViewCreator();
@@ -1152,7 +1149,7 @@ public class GMSJoinLeaveJUnitTest {
   public void testRemoveRequestWhileWaitingForFinalResponse() throws Exception {
     initMocks(true, true);
     
-    gmsJoinLeave.becomeCoordinatorForTest();
+    GMSJoinLeaveTestHelper.becomeCoordinatorForTest(gmsJoinLeave);
     
     installView();
     
@@ -1174,7 +1171,7 @@ public class GMSJoinLeaveJUnitTest {
   public void testLeaveRequestWhileWaitingForFinalResponse() throws Exception {
     initMocks(true, true);
     
-    gmsJoinLeave.becomeCoordinatorForTest();
+    GMSJoinLeaveTestHelper.becomeCoordinatorForTest(gmsJoinLeave);
     
     installView();
     

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8b24a4fc/geode-core/src/test/resources/com/gemstone/gemfire/codeAnalysis/sanctionedDataSerializables.txt
----------------------------------------------------------------------
diff --git a/geode-core/src/test/resources/com/gemstone/gemfire/codeAnalysis/sanctionedDataSerializables.txt
b/geode-core/src/test/resources/com/gemstone/gemfire/codeAnalysis/sanctionedDataSerializables.txt
index 472d821..dd48df4 100644
--- a/geode-core/src/test/resources/com/gemstone/gemfire/codeAnalysis/sanctionedDataSerializables.txt
+++ b/geode-core/src/test/resources/com/gemstone/gemfire/codeAnalysis/sanctionedDataSerializables.txt
@@ -365,8 +365,8 @@ fromData,22,2a2bb900130100b500022a2bb80014c00015b50003b1
 toData,19,2b2ab40002b9001102002ab400032bb80012b1
 
 com/gemstone/gemfire/distributed/internal/membership/gms/messages/InstallViewMessage,2
-fromData,39,2a2bb700102ab800112bb90012010032b500042a2bb80013c00014b500022a2bb80013b50005b1
-toData,35,2a2bb7000c2b2ab40004b6000db9000e02002ab400022bb8000f2ab400052bb8000fb1
+fromData,49,2a2bb700122a2bb900130100b500072ab800142bb90013010032b500042a2bb80015c00016b500022a2bb80015b50005b1
+toData,45,2a2bb7000e2b2ab40007b9000f02002b2ab40004b60010b9000f02002ab400022bb800112ab400052bb80011b1
 
 com/gemstone/gemfire/distributed/internal/membership/gms/messages/JoinRequestMessage,2
 fromData,38,2a2bb80019c0001ab500042a2bb80019b500052a2bb8001bb500022a2bb9001c0100b6001db1

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8b24a4fc/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/dunit/CqQueryUsingPoolDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/dunit/CqQueryUsingPoolDUnitTest.java
b/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/dunit/CqQueryUsingPoolDUnitTest.java
index 680112b..f333b77 100644
--- a/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/dunit/CqQueryUsingPoolDUnitTest.java
+++ b/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/dunit/CqQueryUsingPoolDUnitTest.java
@@ -2807,7 +2807,9 @@ public class CqQueryUsingPoolDUnitTest extends CacheTestCase {
     VM server2 = host.getVM(1);
     VM client1 = host.getVM(2);
     VM client2 = host.getVM(3);
-    
+
+    Wait.pause(3 * 1000);
+
     createServer(server1);
     
     final int port1 = server1.invoke(() -> CqQueryUsingPoolDUnitTest.getCacheServerPort());


Mime
View raw message