geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sai_boorlaga...@apache.org
Subject [08/90] [abbrv] [partial] incubator-geode git commit: GEODE-837: update tests from JUnit3 to JUnit4
Date Tue, 14 Jun 2016 19:10:18 GMT
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/b914df23/geode-core/src/test/java/com/gemstone/gemfire/management/UniversalMembershipListenerAdapterDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/UniversalMembershipListenerAdapterDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/UniversalMembershipListenerAdapterDUnitTest.java
index 05c9119..c0978b7 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/UniversalMembershipListenerAdapterDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/UniversalMembershipListenerAdapterDUnitTest.java
@@ -16,6 +16,20 @@
  */
 package com.gemstone.gemfire.management;
 
+import static com.gemstone.gemfire.distributed.DistributedSystemConfigProperties.*;
+import static com.gemstone.gemfire.test.dunit.Assert.*;
+import static com.gemstone.gemfire.test.dunit.LogWriterUtils.*;
+
+import java.io.IOException;
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Properties;
+import java.util.Set;
+
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
 import com.gemstone.gemfire.InternalGemFireException;
 import com.gemstone.gemfire.LogWriter;
 import com.gemstone.gemfire.cache.AttributesFactory;
@@ -33,22 +47,30 @@ import com.gemstone.gemfire.internal.cache.tier.InternalClientMembership;
 import com.gemstone.gemfire.internal.cache.tier.sockets.ServerConnection;
 import com.gemstone.gemfire.internal.logging.InternalLogWriter;
 import com.gemstone.gemfire.internal.logging.LocalLogWriter;
-import com.gemstone.gemfire.management.membership.*;
-import com.gemstone.gemfire.test.dunit.*;
+import com.gemstone.gemfire.management.membership.ClientMembership;
+import com.gemstone.gemfire.management.membership.ClientMembershipEvent;
+import com.gemstone.gemfire.management.membership.ClientMembershipListener;
+import com.gemstone.gemfire.management.membership.MembershipEvent;
+import com.gemstone.gemfire.management.membership.MembershipListener;
+import com.gemstone.gemfire.management.membership.UniversalMembershipListenerAdapter;
+import com.gemstone.gemfire.test.dunit.Host;
+import com.gemstone.gemfire.test.dunit.IgnoredException;
+import com.gemstone.gemfire.test.dunit.NetworkUtils;
+import com.gemstone.gemfire.test.dunit.SerializableCallable;
+import com.gemstone.gemfire.test.dunit.SerializableRunnable;
+import com.gemstone.gemfire.test.dunit.VM;
+import com.gemstone.gemfire.test.dunit.Wait;
+import com.gemstone.gemfire.test.junit.categories.DistributedTest;
 import com.gemstone.gemfire.test.junit.categories.FlakyTest;
-import org.junit.experimental.categories.Category;
-
-import java.io.IOException;
-import java.util.*;
-
-import static com.gemstone.gemfire.distributed.DistributedSystemConfigProperties.*;
 
 /**
  * Tests the UniversalMembershipListenerAdapter.
  *
  * @since GemFire 4.2.1
  */
+@Category(DistributedTest.class)
 public class UniversalMembershipListenerAdapterDUnitTest extends ClientServerTestCase {
+
   protected static final boolean CLIENT = true;
   protected static final boolean SERVER = false;
   
@@ -70,10 +92,6 @@ public class UniversalMembershipListenerAdapterDUnitTest extends ClientServerTes
   /** Millis to wait for all three event listeners to be notified */
   private static final int ASYNC_EVENT_WAIT_MILLIS = 120000; // use Integer.MAX_VALUE for debugging
     
-  public UniversalMembershipListenerAdapterDUnitTest(String name) {
-    super(name);
-  }
-
   @Override
   public final void postTearDownCacheTestCase() throws Exception {
     InternalClientMembership.unregisterAllListeners();
@@ -82,6 +100,7 @@ public class UniversalMembershipListenerAdapterDUnitTest extends ClientServerTes
   /**
    * Tests wrapping of BridgeMembershipEvent fired as MembershipEvent.
    */
+  @Test
   public void testAdaptedBridgeEvents() throws Exception {
     getSystem();
     
@@ -124,6 +143,7 @@ public class UniversalMembershipListenerAdapterDUnitTest extends ClientServerTes
   /**
    * Tests use of history to prevent duplicate events.
    */
+  @Test
   public void testNoDuplicates() throws Exception {
     getSystem();
     
@@ -224,14 +244,16 @@ public class UniversalMembershipListenerAdapterDUnitTest extends ClientServerTes
   /**
    * Tests notification of events for loner bridge clients in server process.
    */
+  @Test
   public void testLonerClientEventsInServer() throws Exception {
-     try {
-       doTestLonerClientEventsInServer();
-     }
-     finally {
-       disconnectAllFromDS();
-     }
+    try {
+      doTestLonerClientEventsInServer();
+    }
+    finally {
+      disconnectAllFromDS();
+    }
   }
+
   private void doTestLonerClientEventsInServer() throws Exception {
     final boolean[] firedSystem = new boolean[3];
     final DistributedMember[] memberSystem = new DistributedMember[3];
@@ -249,6 +271,7 @@ public class UniversalMembershipListenerAdapterDUnitTest extends ClientServerTes
     final boolean[] isClientBridge = new boolean[3];
 
     MembershipListener systemListener = new MembershipListener() {
+      @Override
       public synchronized void memberJoined(MembershipEvent event) {
         assertFalse(firedSystem[JOINED]);
         assertNull(memberSystem[JOINED]);
@@ -258,6 +281,7 @@ public class UniversalMembershipListenerAdapterDUnitTest extends ClientServerTes
         memberIdSystem[JOINED] = event.getMemberId();
         notify();
       }
+      @Override
       public synchronized void memberLeft(MembershipEvent event) {
         assertFalse(firedSystem[LEFT]);
         assertNull(memberSystem[LEFT]);
@@ -267,6 +291,7 @@ public class UniversalMembershipListenerAdapterDUnitTest extends ClientServerTes
         memberIdSystem[LEFT] = event.getMemberId();
         notify();
       }
+      @Override
       public synchronized void memberCrashed(MembershipEvent event) {
         assertFalse(firedSystem[CRASHED]);
         assertNull(memberSystem[CRASHED]);
@@ -322,6 +347,7 @@ public class UniversalMembershipListenerAdapterDUnitTest extends ClientServerTes
     };
 
     ClientMembershipListener bridgeListener = new ClientMembershipListener() {
+      @Override
       public synchronized void memberJoined(ClientMembershipEvent event) {
         assertFalse(firedBridge[JOINED]);
         assertNull(memberBridge[JOINED]);
@@ -333,6 +359,7 @@ public class UniversalMembershipListenerAdapterDUnitTest extends ClientServerTes
         isClientBridge[JOINED] = event.isClient();
         notify();
       }
+      @Override
       public synchronized void memberLeft(ClientMembershipEvent event) {
         assertFalse(firedBridge[LEFT]);
         assertNull(memberBridge[LEFT]);
@@ -344,6 +371,7 @@ public class UniversalMembershipListenerAdapterDUnitTest extends ClientServerTes
         isClientBridge[LEFT] = event.isClient();
         notify();
       }
+      @Override
       public synchronized void memberCrashed(ClientMembershipEvent event) {
         assertFalse(firedBridge[CRASHED]);
         assertNull(memberBridge[CRASHED]);
@@ -363,7 +391,7 @@ public class UniversalMembershipListenerAdapterDUnitTest extends ClientServerTes
     final int[] ports = new int[1];
 
     // create BridgeServer in controller vm...
-    com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[testLonerClientEventsInServer] Create BridgeServer");
+    getLogWriter().info("[testLonerClientEventsInServer] Create BridgeServer");
     getSystem();
     AttributesFactory factory = new AttributesFactory();
     factory.setScope(Scope.LOCAL);
@@ -377,9 +405,9 @@ public class UniversalMembershipListenerAdapterDUnitTest extends ClientServerTes
     final String serverMemberId = serverMember.toString();
     final Properties serverProperties = getSystem().getProperties();
 
-    com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[testLonerClientEventsInServer] ports[0]=" + ports[0]);
-    com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[testLonerClientEventsInServer] serverMemberId=" + serverMemberId);
-    com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[testLonerClientEventsInServer] serverMember=" + serverMember);
+    getLogWriter().info("[testLonerClientEventsInServer] ports[0]=" + ports[0]);
+    getLogWriter().info("[testLonerClientEventsInServer] serverMemberId=" + serverMemberId);
+    getLogWriter().info("[testLonerClientEventsInServer] serverMember=" + serverMember);
 
     // register the bridge listener
     ClientMembership.registerClientMembershipListener(bridgeListener);
@@ -398,7 +426,7 @@ public class UniversalMembershipListenerAdapterDUnitTest extends ClientServerTes
     new SerializableCallable("Create bridge client") {
       @Override
       public Object call() {
-        com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[testLonerClientEventsInServer] create bridge client");
+        getLogWriter().info("[testLonerClientEventsInServer] create bridge client");
         Properties config = new Properties();
         config.setProperty(MCAST_PORT, "0");
         config.setProperty(LOCATORS, "");
@@ -429,7 +457,7 @@ public class UniversalMembershipListenerAdapterDUnitTest extends ClientServerTes
       }
     }
     
-    com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[testLonerClientEventsInServer] assert server detected client join");
+    getLogWriter().info("[testLonerClientEventsInServer] assert server detected client join");
     assertTrue(firedBridge[JOINED]);
     assertEquals(clientMember, memberBridge[JOINED]);
     //as of 6.1 the id can change when a bridge is created or a connection pool is created
@@ -475,7 +503,7 @@ public class UniversalMembershipListenerAdapterDUnitTest extends ClientServerTes
 
     vm0.invoke(new SerializableRunnable("Wait for client to fully connect") {
       public void run() {
-        com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[testLonerClientEventsInServer] wait for client to fully connect");
+        getLogWriter().info("[testLonerClientEventsInServer] wait for client to fully connect");
         final String pl =
           getRootRegion().getSubregion(name).getAttributes().getPoolName();
         PoolImpl pi = (PoolImpl)PoolManager.find(pl);
@@ -485,7 +513,7 @@ public class UniversalMembershipListenerAdapterDUnitTest extends ClientServerTes
     
     vm0.invoke(new SerializableRunnable("Close bridge client region") {
       public void run() {
-        com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[testLonerClientEventsInServer] close bridge client region");
+        getLogWriter().info("[testLonerClientEventsInServer] close bridge client region");
         getRootRegion().getSubregion(name).close();
         PoolManager.close();
       }
@@ -502,7 +530,7 @@ public class UniversalMembershipListenerAdapterDUnitTest extends ClientServerTes
       }
     }
     
-    com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[testLonerClientEventsInServer] assert server detected client left");
+    getLogWriter().info("[testLonerClientEventsInServer] assert server detected client left");
 
     assertFalse(firedBridge[JOINED]);
     assertNull(memberIdBridge[JOINED]);
@@ -561,7 +589,7 @@ public class UniversalMembershipListenerAdapterDUnitTest extends ClientServerTes
       }
     }
     
-    com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[testLonerClientEventsInServer] assert server detected client re-join");
+    getLogWriter().info("[testLonerClientEventsInServer] assert server detected client re-join");
     assertTrue(firedBridge[JOINED]);
     assertEquals(clientMember, memberBridge[JOINED]);
     assertEquals(clientMemberId, memberIdBridge[JOINED]);
@@ -606,7 +634,7 @@ public class UniversalMembershipListenerAdapterDUnitTest extends ClientServerTes
     
     vm0.invoke(new SerializableRunnable("Wait for client to fully connect") {
       public void run() {
-        com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[testLonerClientEventsInServer] wait for client to fully connect");
+        getLogWriter().info("[testLonerClientEventsInServer] wait for client to fully connect");
         final String pl =
           getRootRegion().getSubregion(name).getAttributes().getPoolName();
         PoolImpl pi = (PoolImpl)PoolManager.find(pl);
@@ -618,7 +646,7 @@ public class UniversalMembershipListenerAdapterDUnitTest extends ClientServerTes
     try {
       vm0.invoke(new SerializableRunnable("Stop bridge client") {
         public void run() {
-          com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[testLonerClientEventsInServer] Stop bridge client");
+          getLogWriter().info("[testLonerClientEventsInServer] Stop bridge client");
           getRootRegion().getSubregion(name).close();
           PoolManager.close();
         }
@@ -635,7 +663,7 @@ public class UniversalMembershipListenerAdapterDUnitTest extends ClientServerTes
         }
       }
       
-    com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[testLonerClientEventsInServer] assert server detected client crashed");
+    getLogWriter().info("[testLonerClientEventsInServer] assert server detected client crashed");
     assertFalse(firedBridge[JOINED]);
     assertNull(memberIdBridge[JOINED]);
     assertNull(memberBridge[JOINED]);
@@ -687,14 +715,16 @@ public class UniversalMembershipListenerAdapterDUnitTest extends ClientServerTes
    * Tests notification of events for loner bridge clients in server process.
    */
   @Category(FlakyTest.class) // GEODE-1174: random port, async behavior, condition await loops
+  @Test
   public void testSystemClientEventsInServer() throws Exception {
-     try {
-       doTestSystemClientEventsInServer();
-     }
-     finally {
-       disconnectAllFromDS();
-     }
+    try {
+      doTestSystemClientEventsInServer();
+    }
+    finally {
+      disconnectAllFromDS();
+    }
   }
+
   private void doTestSystemClientEventsInServer() throws Exception {
     final boolean[] firedSystem = new boolean[3];
     final DistributedMember[] memberSystem = new DistributedMember[3];
@@ -743,7 +773,7 @@ public class UniversalMembershipListenerAdapterDUnitTest extends ClientServerTes
       new UniversalMembershipListenerAdapter() {
       @Override
       public synchronized void memberJoined(MembershipEvent event) {
-        com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[doTestSystemClientEventsInServer] memberJoined >" + event.getMemberId() + "<");
+        getLogWriter().info("[doTestSystemClientEventsInServer] memberJoined >" + event.getMemberId() + "<");
         firedAdapterDuplicate[JOINED] = firedAdapter[JOINED];
         firedAdapter[JOINED] = true;
         memberAdapter[JOINED] = event.getDistributedMember();
@@ -756,7 +786,7 @@ public class UniversalMembershipListenerAdapterDUnitTest extends ClientServerTes
       }
       @Override
       public synchronized void memberLeft(MembershipEvent event) {
-        com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[doTestSystemClientEventsInServer] memberLeft >" + event.getMemberId() + "<");
+        getLogWriter().info("[doTestSystemClientEventsInServer] memberLeft >" + event.getMemberId() + "<");
         firedAdapterDuplicate[LEFT] = firedAdapter[LEFT];
         firedAdapter[LEFT] = true;
         memberAdapter[LEFT] = event.getDistributedMember();
@@ -769,7 +799,7 @@ public class UniversalMembershipListenerAdapterDUnitTest extends ClientServerTes
       }
       @Override
       public synchronized void memberCrashed(MembershipEvent event) {
-        com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[doTestSystemClientEventsInServer] memberCrashed >" + event.getMemberId() + "<");
+        getLogWriter().info("[doTestSystemClientEventsInServer] memberCrashed >" + event.getMemberId() + "<");
         firedAdapterDuplicate[CRASHED] = firedAdapter[CRASHED];
         firedAdapter[CRASHED] = true;
         memberAdapter[CRASHED] = event.getDistributedMember();
@@ -815,7 +845,7 @@ public class UniversalMembershipListenerAdapterDUnitTest extends ClientServerTes
     final int[] ports = new int[1];
 
     // create BridgeServer in controller vm...
-    com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[doTestSystemClientEventsInServer] Create BridgeServer");
+    getLogWriter().info("[doTestSystemClientEventsInServer] Create BridgeServer");
     getSystem();
     AttributesFactory factory = new AttributesFactory();
     factory.setScope(Scope.LOCAL);
@@ -835,9 +865,9 @@ public class UniversalMembershipListenerAdapterDUnitTest extends ClientServerTes
     serverProperties.remove(SSL_PROTOCOLS);
     serverProperties.remove(SSL_REQUIRE_AUTHENTICATION);
 
-    com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[doTestSystemClientEventsInServer] ports[0]=" + ports[0]);
-    com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[doTestSystemClientEventsInServer] serverMemberId=" + serverMemberId);
-    com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[doTestSystemClientEventsInServer] serverMember=" + serverMember);
+    getLogWriter().info("[doTestSystemClientEventsInServer] ports[0]=" + ports[0]);
+    getLogWriter().info("[doTestSystemClientEventsInServer] serverMemberId=" + serverMemberId);
+    getLogWriter().info("[doTestSystemClientEventsInServer] serverMember=" + serverMember);
 
     // register the bridge listener
     ClientMembership.registerClientMembershipListener(bridgeListener);
@@ -856,7 +886,7 @@ public class UniversalMembershipListenerAdapterDUnitTest extends ClientServerTes
     new SerializableCallable("Create bridge client") {
       @Override
       public Object call() {
-        com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[doTestSystemClientEventsInServer] create system bridge client");
+        getLogWriter().info("[doTestSystemClientEventsInServer] create system bridge client");
         assertTrue(getSystem(serverProperties).isConnected());
         assertFalse(getCache().isClosed());
         AttributesFactory factory = new AttributesFactory();
@@ -889,10 +919,10 @@ public class UniversalMembershipListenerAdapterDUnitTest extends ClientServerTes
       }
     }
     
-    com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[doTestSystemClientEventsInServer] assert server detected client join");
-    assertFalse(firedSystemDuplicate);
-    assertFalse(firedAdapterDuplicate);
-    assertFalse(firedBridgeDuplicate);
+    getLogWriter().info("[doTestSystemClientEventsInServer] assert server detected client join");
+    assertArrayFalse(firedSystemDuplicate);
+    assertArrayFalse(firedAdapterDuplicate);
+    assertArrayFalse(firedBridgeDuplicate);
 
     assertTrue(firedBridge[JOINED]);
     assertEquals(clientMember, memberBridge[JOINED]);
@@ -938,7 +968,7 @@ public class UniversalMembershipListenerAdapterDUnitTest extends ClientServerTes
 
     vm0.invoke(new SerializableRunnable("Wait for client to fully connect") {
       public void run() {
-        com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[doTestSystemClientEventsInServer] wait for client to fully connect");
+        getLogWriter().info("[doTestSystemClientEventsInServer] wait for client to fully connect");
         final String pl =
           getRootRegion().getSubregion(name).getAttributes().getPoolName();
         PoolImpl pi = (PoolImpl)PoolManager.find(pl);
@@ -949,7 +979,7 @@ public class UniversalMembershipListenerAdapterDUnitTest extends ClientServerTes
     // close bridge client region
     vm0.invoke(new SerializableRunnable("Close bridge client region") {
       public void run() {
-        com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[doTestSystemClientEventsInServer] close bridge client region");
+        getLogWriter().info("[doTestSystemClientEventsInServer] close bridge client region");
         getRootRegion().getSubregion(name).close();
         PoolManager.close();
       }
@@ -966,10 +996,10 @@ public class UniversalMembershipListenerAdapterDUnitTest extends ClientServerTes
       }
     }
     
-    com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[doTestSystemClientEventsInServer] assert server detected client left");
-    assertFalse(firedSystemDuplicate);
-    assertFalse(firedAdapterDuplicate);
-    assertFalse(firedBridgeDuplicate);
+    getLogWriter().info("[doTestSystemClientEventsInServer] assert server detected client left");
+    assertArrayFalse(firedSystemDuplicate);
+    assertArrayFalse(firedAdapterDuplicate);
+    assertArrayFalse(firedBridgeDuplicate);
     
     assertFalse(firedBridge[JOINED]);
     assertNull(memberIdBridge[JOINED]);
@@ -1028,10 +1058,10 @@ public class UniversalMembershipListenerAdapterDUnitTest extends ClientServerTes
       }
     }
     
-    com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[doTestSystemClientEventsInServer] assert server detected client re-join");
-    assertFalse(firedSystemDuplicate);
-    assertFalse(firedAdapterDuplicate);
-    assertFalse(firedBridgeDuplicate);
+    getLogWriter().info("[doTestSystemClientEventsInServer] assert server detected client re-join");
+    assertArrayFalse(firedSystemDuplicate);
+    assertArrayFalse(firedAdapterDuplicate);
+    assertArrayFalse(firedBridgeDuplicate);
 
     assertTrue(firedBridge[JOINED]);
     assertEquals(clientMember, memberBridge[JOINED]);
@@ -1077,7 +1107,7 @@ public class UniversalMembershipListenerAdapterDUnitTest extends ClientServerTes
     
     vm0.invoke(new SerializableRunnable("Wait for client to fully connect") {
       public void run() {
-        com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[doTestSystemClientEventsInServer] wait for client to fully connect");
+        getLogWriter().info("[doTestSystemClientEventsInServer] wait for client to fully connect");
         final String pl =
           getRootRegion().getSubregion(name).getAttributes().getPoolName();
         PoolImpl pi = (PoolImpl)PoolManager.find(pl);
@@ -1088,7 +1118,7 @@ public class UniversalMembershipListenerAdapterDUnitTest extends ClientServerTes
     // have bridge client disconnect from system
     vm0.invoke(new SerializableRunnable("Disconnect bridge client") {
       public void run() {
-        com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[doTestSystemClientEventsInServer] disconnect bridge client");
+        getLogWriter().info("[doTestSystemClientEventsInServer] disconnect bridge client");
         closeCache();
         disconnectFromDS();
       }
@@ -1110,10 +1140,10 @@ public class UniversalMembershipListenerAdapterDUnitTest extends ClientServerTes
       }
     }
     
-    com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[doTestSystemClientEventsInServer] assert server detected client left");
-    assertFalse(firedSystemDuplicate);
-    assertFalse(firedAdapterDuplicate);
-    assertFalse(firedBridgeDuplicate);
+    getLogWriter().info("[doTestSystemClientEventsInServer] assert server detected client left");
+    assertArrayFalse(firedSystemDuplicate);
+    assertArrayFalse(firedAdapterDuplicate);
+    assertArrayFalse(firedBridgeDuplicate);
 
     assertFalse(firedBridge[JOINED]);
     assertNull(memberBridge[JOINED]);
@@ -1177,10 +1207,10 @@ public class UniversalMembershipListenerAdapterDUnitTest extends ClientServerTes
       }
     }
     
-    com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[doTestSystemClientEventsInServer] assert server detected client re-join");
-    assertFalse(firedSystemDuplicate);
-    assertFalse(firedAdapterDuplicate);
-    assertFalse(firedBridgeDuplicate);
+    getLogWriter().info("[doTestSystemClientEventsInServer] assert server detected client re-join");
+    assertArrayFalse(firedSystemDuplicate);
+    assertArrayFalse(firedAdapterDuplicate);
+    assertArrayFalse(firedBridgeDuplicate);
 
     assertTrue(firedBridge[JOINED]);
     assertEquals(clientMember, memberBridge[JOINED]);
@@ -1226,7 +1256,7 @@ public class UniversalMembershipListenerAdapterDUnitTest extends ClientServerTes
     
     vm0.invoke(new SerializableRunnable("Wait for client to fully connect") {
       public void run() {
-        com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[doTestSystemClientEventsInServer] wait for client to fully connect");
+        getLogWriter().info("[doTestSystemClientEventsInServer] wait for client to fully connect");
         final String pl =
           getRootRegion().getSubregion(name).getAttributes().getPoolName();
         PoolImpl pi = (PoolImpl)PoolManager.find(pl);
@@ -1239,7 +1269,7 @@ public class UniversalMembershipListenerAdapterDUnitTest extends ClientServerTes
     try {
       vm0.invoke(new SerializableRunnable("Close bridge client region") {
         public void run() {
-          com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[doTestSystemClientEventsInServer] close bridge client region");
+          getLogWriter().info("[doTestSystemClientEventsInServer] close bridge client region");
           getRootRegion().getSubregion(name).close();
           PoolManager.close();
         }
@@ -1256,10 +1286,10 @@ public class UniversalMembershipListenerAdapterDUnitTest extends ClientServerTes
         }
       }
       
-    com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[doTestSystemClientEventsInServer] assert server detected client crashed");
-    assertFalse(firedSystemDuplicate);
-    assertFalse(firedAdapterDuplicate);
-    assertFalse(firedBridgeDuplicate);
+    getLogWriter().info("[doTestSystemClientEventsInServer] assert server detected client crashed");
+      assertArrayFalse(firedSystemDuplicate);
+      assertArrayFalse(firedAdapterDuplicate);
+      assertArrayFalse(firedBridgeDuplicate);
 
     assertFalse(firedBridge[JOINED]);
     assertNull(memberBridge[JOINED]);
@@ -1310,7 +1340,7 @@ public class UniversalMembershipListenerAdapterDUnitTest extends ClientServerTes
    * Note: This probably won't work if the pool has more than one Endpoint.
    */
   protected void waitForClientToFullyConnect(final PoolImpl pool) {
-    com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[waitForClientToFullyConnect]");
+    getLogWriter().info("[waitForClientToFullyConnect]");
     final long failMillis = System.currentTimeMillis() + JOIN_FAIL_MILLIS;
     boolean fullyConnected = false;
     while (!fullyConnected) {
@@ -1323,7 +1353,7 @@ public class UniversalMembershipListenerAdapterDUnitTest extends ClientServerTes
                  + " connections were created.",
                  System.currentTimeMillis() < failMillis);
     }
-    com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[waitForClientToFullyConnect] fullyConnected=" + fullyConnected);
+    getLogWriter().info("[waitForClientToFullyConnect] fullyConnected=" + fullyConnected);
   }
   
   /**
@@ -1345,10 +1375,10 @@ public class UniversalMembershipListenerAdapterDUnitTest extends ClientServerTes
   /**
    * Asserts all elements in the array are false.
    */
-  private void assertFalse(boolean[] array) {
-    assertFalse(null, array);
+  private void assertArrayFalse(boolean[] array) {
+    assertArrayFalse(null, array);
   }
-  private void assertFalse(String msg, boolean[] array) {
+  private void assertArrayFalse(String msg, boolean[] array) {
     for (int i = 0; i < array.length; i++) {
       if (msg == null) {
         assertFalse(array[i]);
@@ -1357,10 +1387,10 @@ public class UniversalMembershipListenerAdapterDUnitTest extends ClientServerTes
       }
     }    
   }
-  private void assertTrue(boolean[] array) {
-    assertTrue(null, array);
+  private void assertArrayTrue(boolean[] array) {
+    assertArrayTrue(null, array);
   }
-  private void assertTrue(String msg, boolean[] array) {
+  private void assertArrayTrue(String msg, boolean[] array) {
     for (int i = 0; i < array.length; i++) {
       if (msg == null) {
         assertTrue(array[i]);
@@ -1374,17 +1404,21 @@ public class UniversalMembershipListenerAdapterDUnitTest extends ClientServerTes
    * Tests notification of events for bridge server in system bridge client
    * process.
    */
+  @Test
   public void testServerEventsInPeerSystem() throws Exception {
-       try {
-         doTestServerEventsInPeerSystem();       
-       }finally {
-         disconnectAllFromDS();
-       }
+    try {
+      doTestServerEventsInPeerSystem();
+    }finally {
+     disconnectAllFromDS();
+    }
   }
+
   protected static int testServerEventsInSystemClient_port;
+
   private static int getTestServerEventsInSystemClient_port() {
     return testServerEventsInSystemClient_port;
   }
+
   private void doTestServerEventsInPeerSystem() throws Exception {
     // KIRK: this test fails intermittently with bug 37482
     final boolean[] firedSystem = new boolean[3];
@@ -1434,7 +1468,7 @@ public class UniversalMembershipListenerAdapterDUnitTest extends ClientServerTes
       new UniversalMembershipListenerAdapter() {
       @Override
       public synchronized void memberJoined(MembershipEvent event) {
-        com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[testServerEventsInSystemClient] memberJoined >" + event.getMemberId() + "<");
+        getLogWriter().info("[testServerEventsInSystemClient] memberJoined >" + event.getMemberId() + "<");
         firedAdapterDuplicate[JOINED] = firedAdapter[JOINED];
         firedAdapter[JOINED] = true;
         memberAdapter[JOINED] = event.getDistributedMember();
@@ -1447,7 +1481,7 @@ public class UniversalMembershipListenerAdapterDUnitTest extends ClientServerTes
       }
       @Override
       public synchronized void memberLeft(MembershipEvent event) {
-        com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[testServerEventsInSystemClient] memberLeft >" + event.getMemberId() + "<");
+        getLogWriter().info("[testServerEventsInSystemClient] memberLeft >" + event.getMemberId() + "<");
         firedAdapterDuplicate[LEFT] = firedAdapter[LEFT];
         firedAdapter[LEFT] = true;
         memberAdapter[LEFT] = event.getDistributedMember();
@@ -1460,7 +1494,7 @@ public class UniversalMembershipListenerAdapterDUnitTest extends ClientServerTes
       }
       @Override
       public synchronized void memberCrashed(MembershipEvent event) {
-        com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[testServerEventsInSystemClient] memberCrashed >" + event.getMemberId() + "<");
+        getLogWriter().info("[testServerEventsInSystemClient] memberCrashed >" + event.getMemberId() + "<");
         firedAdapterDuplicate[CRASHED] = firedAdapter[CRASHED];
         firedAdapter[CRASHED] = true;
         memberAdapter[CRASHED] = event.getDistributedMember();
@@ -1508,7 +1542,7 @@ public class UniversalMembershipListenerAdapterDUnitTest extends ClientServerTes
     assertTrue(ports[0] != 0);
         
  // create BridgeServer in controller vm...
-    com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[doTestSystemClientEventsInServer] Create BridgeServer");
+    getLogWriter().info("[doTestSystemClientEventsInServer] Create BridgeServer");
     getSystem();
     AttributesFactory factory = new AttributesFactory();
     factory.setScope(Scope.LOCAL);
@@ -1527,9 +1561,9 @@ public class UniversalMembershipListenerAdapterDUnitTest extends ClientServerTes
     serverProperties.remove(SSL_PROTOCOLS);
     serverProperties.remove(SSL_REQUIRE_AUTHENTICATION);
     
-    com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[testServerEventsInPeerSystem] ports[0]=" + ports[0]);
-    com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[testServerEventsInPeerSystem] serverMemberId=" + serverMemberId);
-    com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[testServerEventsInPeerSystem] serverMember=" + serverMember);
+    getLogWriter().info("[testServerEventsInPeerSystem] ports[0]=" + ports[0]);
+    getLogWriter().info("[testServerEventsInPeerSystem] serverMemberId=" + serverMemberId);
+    getLogWriter().info("[testServerEventsInPeerSystem] serverMember=" + serverMember);
     
     GemFireCacheImpl cache = GemFireCacheImpl.getExisting();
     assertNotNull(cache);
@@ -1545,7 +1579,7 @@ public class UniversalMembershipListenerAdapterDUnitTest extends ClientServerTes
     new SerializableCallable("Create Peer Cache") {
       @Override
       public Object call() {
-        com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[testServerEventsInPeerSystem] Create Peer cache");
+        getLogWriter().info("[testServerEventsInPeerSystem] Create Peer cache");
         getSystem(serverProperties);
         AttributesFactory factory = new AttributesFactory();
         factory.setScope(Scope.LOCAL);
@@ -1559,8 +1593,8 @@ public class UniversalMembershipListenerAdapterDUnitTest extends ClientServerTes
     DistributedMember peerMember = (DistributedMember)vm0.invoke(createPeerCache);
     String peerMemberId = peerMember.toString();
 
-    com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[testServerEventsInPeerSystem] peerMemberId=" + peerMemberId);
-    com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[testServerEventsInPeerSystem] peerMember=" + peerMember);
+    getLogWriter().info("[testServerEventsInPeerSystem] peerMemberId=" + peerMemberId);
+    getLogWriter().info("[testServerEventsInPeerSystem] peerMember=" + peerMember);
 
     
 
@@ -1575,8 +1609,8 @@ public class UniversalMembershipListenerAdapterDUnitTest extends ClientServerTes
       }
     }
     
-    com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[testServerEventsInPeerSystem] assert server detected peer join");
-    assertFalse(firedSystemDuplicate);
+    getLogWriter().info("[testServerEventsInPeerSystem] assert server detected peer join");
+    assertArrayFalse(firedSystemDuplicate);
     // TODO: sometimes get adapter duplicate since memberId isn't endpoint
     // initial impl uses Endpoint.toString() for memberId of server; final
     // impl should have server send its real memberId to client via HandShake
@@ -1623,7 +1657,7 @@ public class UniversalMembershipListenerAdapterDUnitTest extends ClientServerTes
     try {
       vm0.invoke(new SerializableRunnable("Disconnect Peer server") {
         public void run() {
-          com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[testServerEventsInPeerSystem] disconnect peer server");
+          getLogWriter().info("[testServerEventsInPeerSystem] disconnect peer server");
           closeCache();
           disconnectFromDS();
         }
@@ -1646,14 +1680,14 @@ public class UniversalMembershipListenerAdapterDUnitTest extends ClientServerTes
       ex.remove();
     }
 
-    com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[testServerEventsInPeerSystem] assert server detected peer crashed");
-    assertFalse(firedSystemDuplicate);
+    getLogWriter().info("[testServerEventsInPeerSystem] assert server detected peer crashed");
+    assertArrayFalse(firedSystemDuplicate);
     // TODO: sometimes get adapter duplicate since memberId isn't endpoint
     // initial impl uses Endpoint.toString() for memberId of server; final
     // impl should have server send its real memberId to client via HandShake
     //assertFalse("Please update testBridgeMembershipEventsInClient to use BridgeServer memberId.",
     //           firedAdapterDuplicate);
-    assertFalse(firedAdapterDuplicate);
+    assertArrayFalse(firedAdapterDuplicate);
       
     assertFalse(firedSystem[JOINED]);
     assertNull(memberSystem[JOINED]);
@@ -1697,18 +1731,22 @@ public class UniversalMembershipListenerAdapterDUnitTest extends ClientServerTes
    * Tests notification of events for bridge server in system bridge client
    * process.
    */
+  @Test
   public void testServerEventsInLonerClient() throws Exception {
-     try {
-       doTestServerEventsInLonerClient();
-     }
-     finally {
-       disconnectAllFromDS();
-     }
+    try {
+      doTestServerEventsInLonerClient();
+    }
+    finally {
+      disconnectAllFromDS();
+    }
   }
+
   protected static int testServerEventsInLonerClient_port;
+
   private static int getTestServerEventsInLonerClient_port() {
     return testServerEventsInLonerClient_port;
   }
+
   private void doTestServerEventsInLonerClient() throws Exception {
     final boolean[] firedAdapter = new boolean[3];
     final DistributedMember[] memberAdapter = new DistributedMember[3];
@@ -1727,7 +1765,7 @@ public class UniversalMembershipListenerAdapterDUnitTest extends ClientServerTes
       new UniversalMembershipListenerAdapter() {
       @Override
       public synchronized void memberJoined(MembershipEvent event) {
-        com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[testServerEventsInLonerClient] memberJoined >" + event.getMemberId() + "<");
+        getLogWriter().info("[testServerEventsInLonerClient] memberJoined >" + event.getMemberId() + "<");
         firedAdapterDuplicate[JOINED] = firedAdapter[JOINED];
         firedAdapter[JOINED] = true;
         memberAdapter[JOINED] = event.getDistributedMember();
@@ -1740,7 +1778,7 @@ public class UniversalMembershipListenerAdapterDUnitTest extends ClientServerTes
       }
       @Override
       public synchronized void memberLeft(MembershipEvent event) {
-        com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[testServerEventsInLonerClient] memberLeft >" + event.getMemberId() + "<");
+        getLogWriter().info("[testServerEventsInLonerClient] memberLeft >" + event.getMemberId() + "<");
         firedAdapterDuplicate[LEFT] = firedAdapter[LEFT];
         firedAdapter[LEFT] = true;
         memberAdapter[LEFT] = event.getDistributedMember();
@@ -1753,7 +1791,7 @@ public class UniversalMembershipListenerAdapterDUnitTest extends ClientServerTes
       }
       @Override
       public synchronized void memberCrashed(MembershipEvent event) {
-        com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[testServerEventsInLonerClient] memberCrashed >" + event.getMemberId() + "<");
+        getLogWriter().info("[testServerEventsInLonerClient] memberCrashed >" + event.getMemberId() + "<");
         firedAdapterDuplicate[CRASHED] = firedAdapter[CRASHED];
         firedAdapter[CRASHED] = true;
         memberAdapter[CRASHED] = event.getDistributedMember();
@@ -1800,13 +1838,13 @@ public class UniversalMembershipListenerAdapterDUnitTest extends ClientServerTes
       { AvailablePort.getRandomAvailablePort(AvailablePort.SOCKET) };
     assertTrue(ports[0] != 0);
 
-    com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[testServerEventsInLonerClient] create loner bridge client");
+    getLogWriter().info("[testServerEventsInLonerClient] create loner bridge client");
     Properties config = new Properties();
     config.setProperty(MCAST_PORT, "0");
     config.setProperty(LOCATORS, "");
     getSystem(config);
         
-    com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[testServerEventsInLonerClient] create system bridge client");
+    getLogWriter().info("[testServerEventsInLonerClient] create system bridge client");
     getSystem();
 
     // register the bridge listener
@@ -1822,7 +1860,7 @@ public class UniversalMembershipListenerAdapterDUnitTest extends ClientServerTes
     new SerializableCallable("Create BridgeServer") {
       @Override
       public Object call() {
-        com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[testServerEventsInLonerClient] Create BridgeServer");
+        getLogWriter().info("[testServerEventsInLonerClient] Create BridgeServer");
         getSystem();
         AttributesFactory factory = new AttributesFactory();
         factory.setScope(Scope.LOCAL);
@@ -1833,7 +1871,7 @@ public class UniversalMembershipListenerAdapterDUnitTest extends ClientServerTes
           testServerEventsInLonerClient_port = startBridgeServer(ports[0]);
         }
         catch (IOException e) {
-          com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().error(e);
+          getLogWriter().error(e);
           fail(e.getMessage());
         }
         return basicGetSystem().getDistributedMember();
@@ -1847,9 +1885,9 @@ public class UniversalMembershipListenerAdapterDUnitTest extends ClientServerTes
     assertEquals(ports[0],
                  (int) vm0.invoke(() -> UniversalMembershipListenerAdapterDUnitTest.getTestServerEventsInLonerClient_port()));
 
-    com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[testServerEventsInLonerClient] ports[0]=" + ports[0]);
-    com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[testServerEventsInLonerClient] serverMemberId=" + serverMemberId);
-    com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[testServerEventsInLonerClient] serverMember=" + serverMember);
+    getLogWriter().info("[testServerEventsInLonerClient] ports[0]=" + ports[0]);
+    getLogWriter().info("[testServerEventsInLonerClient] serverMemberId=" + serverMemberId);
+    getLogWriter().info("[testServerEventsInLonerClient] serverMember=" + serverMember);
 
     // create region which connects to bridge server
     AttributesFactory factory = new AttributesFactory();
@@ -1869,14 +1907,14 @@ public class UniversalMembershipListenerAdapterDUnitTest extends ClientServerTes
       }
     }
     
-    com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[testServerEventsInLonerClient] assert client detected server join");
+    getLogWriter().info("[testServerEventsInLonerClient] assert client detected server join");
     // TODO: sometimes get adapter duplicate since memberId isn't endpoint KIRK
     // initial impl uses Endpoint.toString() for memberId of server; final
     // impl should have server send its real memberId to client via HandShake
     //assertFalse("Please update testBridgeMembershipEventsInClient to use BridgeServer memberId.",
     //           firedAdapterDuplicate);
-    assertFalse(firedAdapterDuplicate);
-    assertFalse(firedBridgeDuplicate);
+    assertArrayFalse(firedAdapterDuplicate);
+    assertArrayFalse(firedBridgeDuplicate);
 
     assertTrue(firedBridge[JOINED]);
     assertEquals(serverMember, memberBridge[JOINED]);
@@ -1909,7 +1947,7 @@ public class UniversalMembershipListenerAdapterDUnitTest extends ClientServerTes
     assertFalse(isClientAdapter[CRASHED]);
     resetArraysForTesting(firedAdapter, memberAdapter, memberIdAdapter, isClientAdapter);
 
-    com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[testServerEventsInLonerClient] wait for client to fully connect");
+    getLogWriter().info("[testServerEventsInLonerClient] wait for client to fully connect");
     final String pl =
       getRootRegion().getSubregion(name).getAttributes().getPoolName();
     PoolImpl pi = (PoolImpl)PoolManager.find(pl);
@@ -1938,7 +1976,7 @@ public class UniversalMembershipListenerAdapterDUnitTest extends ClientServerTes
     try {
       vm0.invoke(new SerializableRunnable("Disconnect bridge server") {
         public void run() {
-          com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[testServerEventsInLonerClient] disconnect bridge server");
+          getLogWriter().info("[testServerEventsInLonerClient] disconnect bridge server");
           closeCache();
         }
       });
@@ -1962,14 +2000,14 @@ public class UniversalMembershipListenerAdapterDUnitTest extends ClientServerTes
       lw.info(removeExpected2);
     }
     
-    com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[testServerEventsInLonerClient] assert client detected server crashed");
+    getLogWriter().info("[testServerEventsInLonerClient] assert client detected server crashed");
     // TODO: sometimes get adapter duplicate since memberId isn't endpoint KIRK
     // initial impl uses Endpoint.toString() for memberId of server; final
     // impl should have server send its real memberId to client via HandShake
     //assertFalse("Please update testBridgeMembershipEventsInClient to use BridgeServer memberId.",
     //           firedAdapterDuplicate);
-    assertFalse(firedAdapterDuplicate);
-    assertFalse(firedBridgeDuplicate);
+    assertArrayFalse(firedAdapterDuplicate);
+    assertArrayFalse(firedBridgeDuplicate);
 
     assertFalse(firedBridge[JOINED]);
     assertNull(memberIdBridge[JOINED]);
@@ -2015,9 +2053,9 @@ public class UniversalMembershipListenerAdapterDUnitTest extends ClientServerTes
         (int) vm0.invoke(() -> UniversalMembershipListenerAdapterDUnitTest.getTestServerEventsInLonerClient_port()));
     serverMember = (DistributedMember) vm0.invoke(() -> UniversalMembershipListenerAdapterDUnitTest.getDistributedMember());
 
-    com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[testServerEventsInLonerClient] ports[0]=" + ports[0]);
-    com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[testServerEventsInLonerClient] serverMemberId=" + serverMemberId);
-    com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[testServerEventsInLonerClient] serverMember=" + serverMember);
+    getLogWriter().info("[testServerEventsInLonerClient] ports[0]=" + ports[0]);
+    getLogWriter().info("[testServerEventsInLonerClient] serverMemberId=" + serverMemberId);
+    getLogWriter().info("[testServerEventsInLonerClient] serverMember=" + serverMember);
                                                 
     synchronized(adapter) {
       if (!firedAdapter[JOINED]) {
@@ -2030,14 +2068,14 @@ public class UniversalMembershipListenerAdapterDUnitTest extends ClientServerTes
       }
     }
     
-    com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[testServerEventsInLonerClient] assert client detected server re-join");
+    getLogWriter().info("[testServerEventsInLonerClient] assert client detected server re-join");
     // TODO: sometimes get adapter duplicate since memberId isn't endpoint KIRK
     // initial impl uses Endpoint.toString() for memberId of server; final
     // impl should have server send its real memberId to client via HandShake
     //assertFalse("Please update testBridgeMembershipEventsInClient to use BridgeServer memberId.",
     //           firedAdapterDuplicate);
-    assertFalse(firedAdapterDuplicate);
-    assertFalse(firedBridgeDuplicate);
+    assertArrayFalse(firedAdapterDuplicate);
+    assertArrayFalse(firedBridgeDuplicate);
 
     assertTrue(firedBridge[JOINED]);
     assertNotNull(memberBridge[JOINED]);

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/b914df23/geode-core/src/test/java/com/gemstone/gemfire/management/bean/stats/DistributedSystemStatsDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/bean/stats/DistributedSystemStatsDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/bean/stats/DistributedSystemStatsDUnitTest.java
index 7558295..33c760d 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/bean/stats/DistributedSystemStatsDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/bean/stats/DistributedSystemStatsDUnitTest.java
@@ -16,6 +16,15 @@
  */
 package com.gemstone.gemfire.management.bean.stats;
 
+import org.junit.experimental.categories.Category;
+import org.junit.Test;
+
+import static org.junit.Assert.*;
+
+import com.gemstone.gemfire.test.dunit.cache.internal.JUnit4CacheTestCase;
+import com.gemstone.gemfire.test.dunit.internal.JUnit4DistributedTestCase;
+import com.gemstone.gemfire.test.junit.categories.DistributedTest;
+
 import java.util.Set;
 
 import javax.management.ObjectName;
@@ -35,14 +44,16 @@ import com.gemstone.gemfire.test.dunit.VM;
 
 /**
  */
+@Category(DistributedTest.class)
 public class DistributedSystemStatsDUnitTest extends ManagementTestBase{
   
   private static final long serialVersionUID = 1L;
 
-  public DistributedSystemStatsDUnitTest(String name) {
-    super(name);
+  public DistributedSystemStatsDUnitTest() {
+    super();
   }
 
+  @Test
   public void testDistributedSystemStats() throws Exception {
     initManagement(true);
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/b914df23/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/CliUtilDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/CliUtilDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/CliUtilDUnitTest.java
index 01acabf..a7c2ce4 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/CliUtilDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/CliUtilDUnitTest.java
@@ -16,30 +16,47 @@
  */
 package com.gemstone.gemfire.management.internal.cli;
 
-import com.gemstone.gemfire.cache.*;
-import com.gemstone.gemfire.cache.execute.*;
-import com.gemstone.gemfire.cache30.CacheTestCase;
+import static com.gemstone.gemfire.distributed.DistributedSystemConfigProperties.*;
+import static org.junit.Assert.*;
+
+import java.util.Properties;
+import java.util.Set;
+
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
+import com.gemstone.gemfire.cache.Cache;
+import com.gemstone.gemfire.cache.CacheFactory;
+import com.gemstone.gemfire.cache.Region;
+import com.gemstone.gemfire.cache.RegionFactory;
+import com.gemstone.gemfire.cache.RegionShortcut;
+import com.gemstone.gemfire.cache.execute.Function;
+import com.gemstone.gemfire.cache.execute.FunctionAdapter;
+import com.gemstone.gemfire.cache.execute.FunctionContext;
+import com.gemstone.gemfire.cache.execute.FunctionService;
+import com.gemstone.gemfire.cache.execute.ResultCollector;
 import com.gemstone.gemfire.distributed.DistributedMember;
 import com.gemstone.gemfire.internal.AvailablePortHelper;
 import com.gemstone.gemfire.management.DistributedRegionMXBean;
 import com.gemstone.gemfire.management.ManagementService;
 import com.gemstone.gemfire.management.RegionMXBean;
 import com.gemstone.gemfire.management.internal.cli.result.CommandResultException;
-import com.gemstone.gemfire.test.dunit.*;
+import com.gemstone.gemfire.test.dunit.Assert;
+import com.gemstone.gemfire.test.dunit.Host;
+import com.gemstone.gemfire.test.dunit.LogWriterUtils;
+import com.gemstone.gemfire.test.dunit.SerializableCallable;
+import com.gemstone.gemfire.test.dunit.SerializableRunnable;
+import com.gemstone.gemfire.test.dunit.VM;
+import com.gemstone.gemfire.test.dunit.Wait;
+import com.gemstone.gemfire.test.dunit.WaitCriterion;
+import com.gemstone.gemfire.test.dunit.cache.internal.JUnit4CacheTestCase;
+import com.gemstone.gemfire.test.junit.categories.DistributedTest;
 
-import java.util.Properties;
-import java.util.Set;
-
-import static com.gemstone.gemfire.distributed.DistributedSystemConfigProperties.*;
-
-/**
- * 
- *
- */
-public class CliUtilDUnitTest extends CacheTestCase {
+@Category(DistributedTest.class)
+public class CliUtilDUnitTest extends JUnit4CacheTestCase {
 
-  public CliUtilDUnitTest(String name) {
-    super(name);    
+  public CliUtilDUnitTest() {
+    super();    
   }
 
   public static final String COMMON_REGION="region1";
@@ -216,6 +233,7 @@ public class CliUtilDUnitTest extends CacheTestCase {
     assertNotNull(service.getMemberMXBean());
   }
   
+  @Test
   public void testFileToBytes(){
     
     //CliUtil.filesToBytes(fileNames)
@@ -223,6 +241,7 @@ public class CliUtilDUnitTest extends CacheTestCase {
   }
   
   @SuppressWarnings("serial")
+  @Test
   public void testCliUtilMethods() {
     setupMembersWithIdsAndGroups();
     

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/b914df23/geode-core/src/test/java/com/gemstone/gemfire/management/internal/pulse/TestClientIdsDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/pulse/TestClientIdsDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/pulse/TestClientIdsDUnitTest.java
index 1ad2efd..5cbf715 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/pulse/TestClientIdsDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/pulse/TestClientIdsDUnitTest.java
@@ -16,7 +16,21 @@
  */
 package com.gemstone.gemfire.management.internal.pulse;
 
-import com.gemstone.gemfire.cache.*;
+import static com.gemstone.gemfire.distributed.DistributedSystemConfigProperties.*;
+import static org.junit.Assert.*;
+
+import java.util.Properties;
+
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
+import com.gemstone.gemfire.cache.AttributesFactory;
+import com.gemstone.gemfire.cache.Cache;
+import com.gemstone.gemfire.cache.CacheFactory;
+import com.gemstone.gemfire.cache.DataPolicy;
+import com.gemstone.gemfire.cache.Region;
+import com.gemstone.gemfire.cache.RegionAttributes;
+import com.gemstone.gemfire.cache.Scope;
 import com.gemstone.gemfire.cache.client.PoolManager;
 import com.gemstone.gemfire.cache.client.internal.PoolImpl;
 import com.gemstone.gemfire.cache.server.CacheServer;
@@ -28,19 +42,23 @@ import com.gemstone.gemfire.management.CacheServerMXBean;
 import com.gemstone.gemfire.management.MBeanUtil;
 import com.gemstone.gemfire.management.ManagementTestBase;
 import com.gemstone.gemfire.management.internal.cli.CliUtil;
-import com.gemstone.gemfire.test.dunit.*;
-
-import java.util.Properties;
-
-import static com.gemstone.gemfire.distributed.DistributedSystemConfigProperties.LOCATORS;
-import static com.gemstone.gemfire.distributed.DistributedSystemConfigProperties.MCAST_PORT;
+import com.gemstone.gemfire.test.dunit.Assert;
+import com.gemstone.gemfire.test.dunit.Host;
+import com.gemstone.gemfire.test.dunit.LogWriterUtils;
+import com.gemstone.gemfire.test.dunit.NetworkUtils;
+import com.gemstone.gemfire.test.dunit.SerializableCallable;
+import com.gemstone.gemfire.test.dunit.SerializableRunnable;
+import com.gemstone.gemfire.test.dunit.VM;
+import com.gemstone.gemfire.test.dunit.Wait;
+import com.gemstone.gemfire.test.dunit.WaitCriterion;
+import com.gemstone.gemfire.test.dunit.internal.JUnit4DistributedTestCase;
+import com.gemstone.gemfire.test.junit.categories.DistributedTest;
 
 /**
  * This is for testing client IDs
- * 
  */
-
-public class TestClientIdsDUnitTest extends DistributedTestCase {
+@Category(DistributedTest.class)
+public class TestClientIdsDUnitTest extends JUnit4DistributedTestCase {
 
   private static final String k1 = "k1";
   private static final String k2 = "k2";
@@ -62,9 +80,9 @@ public class TestClientIdsDUnitTest extends DistributedTestCase {
 
   private ManagementTestBase helper;
 
-  public TestClientIdsDUnitTest(String name) {
-    super(name);
-    this.helper = new ManagementTestBase(name);
+  @Override
+  public final void preSetUp() throws Exception {
+    this.helper = new ManagementTestBase(){};
   }
 
   @Override
@@ -86,8 +104,7 @@ public class TestClientIdsDUnitTest extends DistributedTestCase {
     disconnectFromDS();
   }
 
-  private static final long serialVersionUID = 1L;
-
+  @Test
   public void testClientIds() throws Exception {
     helper.createManagementCache(managingNode);
     helper.startManagingNode(managingNode);

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/b914df23/geode-core/src/test/java/com/gemstone/gemfire/management/internal/pulse/TestFunctionsDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/pulse/TestFunctionsDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/pulse/TestFunctionsDUnitTest.java
index 5420542..1ce8ed1 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/pulse/TestFunctionsDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/pulse/TestFunctionsDUnitTest.java
@@ -16,6 +16,15 @@
  */
 package com.gemstone.gemfire.management.internal.pulse;
 
+import org.junit.experimental.categories.Category;
+import org.junit.Test;
+
+import static org.junit.Assert.*;
+
+import com.gemstone.gemfire.test.dunit.cache.internal.JUnit4CacheTestCase;
+import com.gemstone.gemfire.test.dunit.internal.JUnit4DistributedTestCase;
+import com.gemstone.gemfire.test.junit.categories.DistributedTest;
+
 import com.gemstone.gemfire.cache.Cache;
 import com.gemstone.gemfire.cache.execute.Execution;
 import com.gemstone.gemfire.cache.execute.Function;
@@ -35,12 +44,13 @@ import com.gemstone.gemfire.test.dunit.WaitCriterion;
  * 
  * 
  */
+@Category(DistributedTest.class)
 public class TestFunctionsDUnitTest extends ManagementTestBase {
 
   private static final long serialVersionUID = 1L;
 
-  public TestFunctionsDUnitTest(String name) {
-    super(name);
+  public TestFunctionsDUnitTest() {
+    super();
   }
 
   public static Integer getNumOfRunningFunction() {
@@ -74,6 +84,7 @@ public class TestFunctionsDUnitTest extends ManagementTestBase {
     return Integer.valueOf(bean.getNumRunningFunctions());
   }
 
+  @Test
   public void testNumOfRunningFunctions() throws Exception {
     initManagement(false);
     VM client = managedNodeList.get(2);    

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/b914df23/geode-core/src/test/java/com/gemstone/gemfire/management/internal/pulse/TestHeapDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/pulse/TestHeapDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/pulse/TestHeapDUnitTest.java
index 5cba6dd..d9fcea9 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/pulse/TestHeapDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/pulse/TestHeapDUnitTest.java
@@ -16,6 +16,15 @@
  */
 package com.gemstone.gemfire.management.internal.pulse;
 
+import org.junit.experimental.categories.Category;
+import org.junit.Test;
+
+import static org.junit.Assert.*;
+
+import com.gemstone.gemfire.test.dunit.cache.internal.JUnit4CacheTestCase;
+import com.gemstone.gemfire.test.dunit.internal.JUnit4DistributedTestCase;
+import com.gemstone.gemfire.test.junit.categories.DistributedTest;
+
 import com.gemstone.gemfire.management.DistributedSystemMXBean;
 import com.gemstone.gemfire.management.ManagementService;
 import com.gemstone.gemfire.management.ManagementTestBase;
@@ -29,12 +38,13 @@ import com.gemstone.gemfire.test.dunit.WaitCriterion;
  * 
  */
 
+@Category(DistributedTest.class)
 public class TestHeapDUnitTest extends ManagementTestBase {
 
   private static final long serialVersionUID = 1L;
 
-  public TestHeapDUnitTest(String name) {
-    super(name);
+  public TestHeapDUnitTest() {
+    super();
   }
 
   public static long getHeapSizeOfClient() {
@@ -68,6 +78,7 @@ public class TestHeapDUnitTest extends ManagementTestBase {
     return bean.getTotalHeapSize() * 1000;
   }
 
+  @Test
   public void testTotalHeapSize() throws Exception {
     initManagement(false);
     long totalHeapSizeOnAll = 0;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/b914df23/geode-core/src/test/java/com/gemstone/gemfire/management/internal/pulse/TestLocatorsDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/pulse/TestLocatorsDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/pulse/TestLocatorsDUnitTest.java
index 3d6a6b8..38f73cb 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/pulse/TestLocatorsDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/pulse/TestLocatorsDUnitTest.java
@@ -16,6 +16,15 @@
  */
 package com.gemstone.gemfire.management.internal.pulse;
 
+import org.junit.experimental.categories.Category;
+import org.junit.Test;
+
+import static org.junit.Assert.*;
+
+import com.gemstone.gemfire.test.dunit.cache.internal.JUnit4CacheTestCase;
+import com.gemstone.gemfire.test.dunit.internal.JUnit4DistributedTestCase;
+import com.gemstone.gemfire.test.junit.categories.DistributedTest;
+
 import com.gemstone.gemfire.management.DistributedSystemMXBean;
 import com.gemstone.gemfire.management.ManagementService;
 import com.gemstone.gemfire.management.ManagementTestBase;
@@ -28,12 +37,13 @@ import com.gemstone.gemfire.test.dunit.WaitCriterion;
  * 
  */
 
+@Category(DistributedTest.class)
 public class TestLocatorsDUnitTest extends ManagementTestBase {
 
   private static final long serialVersionUID = 1L;
 
-  public TestLocatorsDUnitTest(String name) {
-    super(name);
+  public TestLocatorsDUnitTest() {
+    super();
   }
 
   public static int getNumOfLocatorFromMBean() {
@@ -62,6 +72,7 @@ public class TestLocatorsDUnitTest extends ManagementTestBase {
     return bean.getLocatorCount();
   }
 
+  @Test
   public void testLocatorsDUnitTest() throws Exception {
     initManagement(false);
     int locatorCount = ((Number) managingNode.invoke(() -> TestLocatorsDUnitTest.getNumOfLocatorFromMBean())).intValue();

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/b914df23/geode-core/src/test/java/com/gemstone/gemfire/management/internal/pulse/TestSubscriptionsDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/pulse/TestSubscriptionsDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/pulse/TestSubscriptionsDUnitTest.java
index 9b79b67..f483cef 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/pulse/TestSubscriptionsDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/pulse/TestSubscriptionsDUnitTest.java
@@ -16,7 +16,21 @@
  */
 package com.gemstone.gemfire.management.internal.pulse;
 
-import com.gemstone.gemfire.cache.*;
+import static com.gemstone.gemfire.distributed.DistributedSystemConfigProperties.*;
+import static org.junit.Assert.*;
+
+import java.util.Properties;
+
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
+import com.gemstone.gemfire.cache.AttributesFactory;
+import com.gemstone.gemfire.cache.Cache;
+import com.gemstone.gemfire.cache.CacheFactory;
+import com.gemstone.gemfire.cache.DataPolicy;
+import com.gemstone.gemfire.cache.Region;
+import com.gemstone.gemfire.cache.RegionAttributes;
+import com.gemstone.gemfire.cache.Scope;
 import com.gemstone.gemfire.cache.client.PoolManager;
 import com.gemstone.gemfire.cache.client.internal.PoolImpl;
 import com.gemstone.gemfire.cache.server.CacheServer;
@@ -27,36 +41,39 @@ import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
 import com.gemstone.gemfire.management.DistributedSystemMXBean;
 import com.gemstone.gemfire.management.ManagementService;
 import com.gemstone.gemfire.management.ManagementTestBase;
-import com.gemstone.gemfire.test.dunit.*;
-
-import java.util.Properties;
-
-import static com.gemstone.gemfire.distributed.DistributedSystemConfigProperties.LOCATORS;
-import static com.gemstone.gemfire.distributed.DistributedSystemConfigProperties.MCAST_PORT;
+import com.gemstone.gemfire.test.dunit.Assert;
+import com.gemstone.gemfire.test.dunit.Host;
+import com.gemstone.gemfire.test.dunit.LogWriterUtils;
+import com.gemstone.gemfire.test.dunit.NetworkUtils;
+import com.gemstone.gemfire.test.dunit.SerializableCallable;
+import com.gemstone.gemfire.test.dunit.SerializableRunnable;
+import com.gemstone.gemfire.test.dunit.VM;
+import com.gemstone.gemfire.test.dunit.Wait;
+import com.gemstone.gemfire.test.dunit.WaitCriterion;
+import com.gemstone.gemfire.test.dunit.internal.JUnit4DistributedTestCase;
+import com.gemstone.gemfire.test.junit.categories.DistributedTest;
 
 /**
  * This is for testing subscriptions
- * 
- * 
  */
+@Category(DistributedTest.class)
+public class TestSubscriptionsDUnitTest extends JUnit4DistributedTestCase {
 
-public class TestSubscriptionsDUnitTest extends DistributedTestCase {
   private static final String k1 = "k1";
   private static final String k2 = "k2";
   private static final String client_k1 = "client-k1";
 
   private static final String client_k2 = "client-k2";
-  /** name of the test region */
-  private static final String REGION_NAME = "TestSubscriptionsDUnitTest_Region";
+  private static final String REGION_NAME = TestSubscriptionsDUnitTest.class.getSimpleName() + "_Region";
   private static VM server = null;
   private static VM client = null;
   private static VM client2 = null;
   private static VM managingNode = null;
   private ManagementTestBase helper;
 
-  public TestSubscriptionsDUnitTest(String name) {
-    super(name);
-    this.helper = new ManagementTestBase(name);
+  @Override
+  public final void preSetUp() throws Exception {
+    this.helper = new ManagementTestBase(){};
   }
 
   @Override
@@ -77,8 +94,7 @@ public class TestSubscriptionsDUnitTest extends DistributedTestCase {
     disconnectFromDS();
   }
 
-  private static final long serialVersionUID = 1L;
-
+  @Test
   public void testNoOfSubscription() throws Exception {
 
     helper.createManagementCache(managingNode);

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/b914df23/geode-core/src/test/java/com/gemstone/gemfire/memcached/DomainObjectsAsValuesJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/memcached/DomainObjectsAsValuesJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/memcached/DomainObjectsAsValuesJUnitTest.java
index 98aa90d..b55a5a7 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/memcached/DomainObjectsAsValuesJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/memcached/DomainObjectsAsValuesJUnitTest.java
@@ -16,28 +16,27 @@
  */
 package com.gemstone.gemfire.memcached;
 
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
-import com.gemstone.gemfire.internal.AvailablePortHelper;
-import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
-import net.spy.memcached.MemcachedClient;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
+import static com.gemstone.gemfire.distributed.DistributedSystemConfigProperties.*;
+import static org.junit.Assert.*;
 
 import java.net.InetAddress;
 import java.net.InetSocketAddress;
 import java.util.concurrent.Future;
 import java.util.logging.Logger;
 
-import static com.gemstone.gemfire.distributed.DistributedSystemConfigProperties.MCAST_PORT;
-import static org.junit.Assert.*;
+import net.spy.memcached.MemcachedClient;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
+import com.gemstone.gemfire.internal.AvailablePortHelper;
+import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
 
 @Category(IntegrationTest.class)
 public class DomainObjectsAsValuesJUnitTest {
 
-  private static final Logger logger = Logger.getLogger(DomainObjectsAsValuesJUnitTest.class.getCanonicalName());
-  
   private int PORT;
   
   private GemFireMemcachedServer server;
@@ -56,7 +55,7 @@ public class DomainObjectsAsValuesJUnitTest {
     System.getProperties().remove(DistributionConfig.GEMFIRE_PREFIX + MCAST_PORT);
   }
 
-  public static class Customer implements java.io.Serializable {
+  private static class Customer implements java.io.Serializable {
     private static final long serialVersionUID = 4238572216598708877L;
     private String name;
     private String address;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/b914df23/geode-core/src/test/java/com/gemstone/gemfire/memcached/IntegrationJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/memcached/IntegrationJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/memcached/IntegrationJUnitTest.java
index 63e7b3f..b6931d6 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/memcached/IntegrationJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/memcached/IntegrationJUnitTest.java
@@ -16,25 +16,23 @@
  */
 package com.gemstone.gemfire.memcached;
 
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.internal.AvailablePortHelper;
-import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
-import net.spy.memcached.MemcachedClient;
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
+import static com.gemstone.gemfire.distributed.DistributedSystemConfigProperties.*;
+import static org.junit.Assert.*;
 
 import java.net.InetAddress;
 import java.net.InetSocketAddress;
 import java.util.Properties;
 import java.util.concurrent.Future;
 
-import static com.gemstone.gemfire.distributed.DistributedSystemConfigProperties.*;
-import static org.junit.Assert.*;
+import net.spy.memcached.MemcachedClient;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
+import com.gemstone.gemfire.cache.Cache;
+import com.gemstone.gemfire.cache.CacheFactory;
+import com.gemstone.gemfire.internal.AvailablePortHelper;
+import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
 
-/**
- * 
- */
 @Category(IntegrationTest.class)
 public class IntegrationJUnitTest {
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/b914df23/geode-core/src/test/java/com/gemstone/gemfire/pdx/AutoSerializableJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/pdx/AutoSerializableJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/pdx/AutoSerializableJUnitTest.java
index fccfbcf..b4527e4 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/pdx/AutoSerializableJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/pdx/AutoSerializableJUnitTest.java
@@ -48,15 +48,6 @@ import static org.junit.Assert.*;
 
 /**
  * TODO: fails (on Windows 7?)
- * 
-com.gemstone.gemfire.pdx.AutoSerializableJUnitTest > testMultipleClassLoaders FAILED
-    junit.framework.AssertionFailedError
-        at junit.framework.Fail(Assert.java:55)
-        at junit.framework.Assert.assertTrue(Assert.java:22)
-        at junit.framework.Assert.assertFalse(Assert.java:39)
-        at junit.framework.Assert.assertFalse(Assert.java:47)
-        at junit.framework.TestCase.assertFalse(TestCase.java:219)
-        at com.gemstone.gemfire.pdx.AutoSerializableJUnitTest.testMultipleClassLoaders(AutoSerializableJUnitTest.java:1218)
  */
 @Category(IntegrationTest.class)
 public class AutoSerializableJUnitTest {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/b914df23/geode-core/src/test/java/com/gemstone/gemfire/pdx/ClientsWithVersioningRetryDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/pdx/ClientsWithVersioningRetryDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/pdx/ClientsWithVersioningRetryDUnitTest.java
index 90f51d9..e536ca6 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/pdx/ClientsWithVersioningRetryDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/pdx/ClientsWithVersioningRetryDUnitTest.java
@@ -16,41 +16,68 @@
  */
 package com.gemstone.gemfire.pdx;
 
-import com.gemstone.gemfire.cache.*;
+import static com.gemstone.gemfire.distributed.DistributedSystemConfigProperties.*;
+import static org.junit.Assert.*;
+
+import java.util.HashMap;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
+import java.util.Properties;
+
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
+import com.gemstone.gemfire.cache.AttributesFactory;
+import com.gemstone.gemfire.cache.Cache;
+import com.gemstone.gemfire.cache.CacheFactory;
+import com.gemstone.gemfire.cache.DataPolicy;
+import com.gemstone.gemfire.cache.Operation;
+import com.gemstone.gemfire.cache.PartitionAttributesFactory;
+import com.gemstone.gemfire.cache.Region;
+import com.gemstone.gemfire.cache.RegionFactory;
+import com.gemstone.gemfire.cache.RegionShortcut;
+import com.gemstone.gemfire.cache.Scope;
 import com.gemstone.gemfire.cache.client.ClientCache;
 import com.gemstone.gemfire.cache.client.ClientCacheFactory;
 import com.gemstone.gemfire.cache.client.ClientRegionShortcut;
 import com.gemstone.gemfire.cache.server.CacheServer;
-import com.gemstone.gemfire.cache30.CacheTestCase;
 import com.gemstone.gemfire.distributed.DistributedMember;
 import com.gemstone.gemfire.distributed.internal.DistributionConfig;
 import com.gemstone.gemfire.distributed.internal.DistributionManager;
 import com.gemstone.gemfire.distributed.internal.DistributionMessage;
 import com.gemstone.gemfire.distributed.internal.DistributionMessageObserver;
 import com.gemstone.gemfire.internal.AvailablePortHelper;
-import com.gemstone.gemfire.internal.cache.*;
+import com.gemstone.gemfire.internal.cache.DistributedPutAllOperation;
+import com.gemstone.gemfire.internal.cache.DistributedRegion;
+import com.gemstone.gemfire.internal.cache.EntryEventImpl;
+import com.gemstone.gemfire.internal.cache.EventID;
+import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
+import com.gemstone.gemfire.internal.cache.LocalRegion;
+import com.gemstone.gemfire.internal.cache.RegionEntry;
 import com.gemstone.gemfire.internal.cache.tier.sockets.BaseCommand;
 import com.gemstone.gemfire.internal.cache.tier.sockets.ClientProxyMembershipID;
 import com.gemstone.gemfire.internal.cache.tier.sockets.command.Put70;
 import com.gemstone.gemfire.internal.cache.versions.VMVersionTag;
 import com.gemstone.gemfire.internal.cache.versions.VersionTag;
-import com.gemstone.gemfire.test.dunit.*;
-
-import java.util.*;
+import com.gemstone.gemfire.test.dunit.Host;
+import com.gemstone.gemfire.test.dunit.IgnoredException;
+import com.gemstone.gemfire.test.dunit.Invoke;
+import com.gemstone.gemfire.test.dunit.LogWriterUtils;
+import com.gemstone.gemfire.test.dunit.NetworkUtils;
+import com.gemstone.gemfire.test.dunit.SerializableCallable;
+import com.gemstone.gemfire.test.dunit.SerializableRunnable;
+import com.gemstone.gemfire.test.dunit.VM;
+import com.gemstone.gemfire.test.dunit.Wait;
+import com.gemstone.gemfire.test.dunit.cache.internal.JUnit4CacheTestCase;
+import com.gemstone.gemfire.test.junit.categories.DistributedTest;
 
-import static com.gemstone.gemfire.distributed.DistributedSystemConfigProperties.*;
+@Category(DistributedTest.class)
+public class ClientsWithVersioningRetryDUnitTest extends JUnit4CacheTestCase {
 
-/**
- *
- */
-public class ClientsWithVersioningRetryDUnitTest extends CacheTestCase {
   // list of expected exceptions to remove in tearDown2()
   static List<IgnoredException> expectedExceptions = new LinkedList<IgnoredException>();
 
-  public ClientsWithVersioningRetryDUnitTest(String name) {
-    super(name);
-  }
-  
   @Override
   public final void postSetUp() throws Exception {
     Invoke.invokeInEveryVM(new SerializableRunnable() {
@@ -82,6 +109,7 @@ public class ClientsWithVersioningRetryDUnitTest extends CacheTestCase {
    * the version information.
    * second failure in bug 44951
    */
+  @Test
   public void testRetryPut() {
     Host host = Host.getHost(0);
     final VM vm0 = host.getVM(0);
@@ -159,6 +187,7 @@ public class ClientsWithVersioningRetryDUnitTest extends CacheTestCase {
    * the version information.
    * bug #45059
    */
+  @Test
   public void testRetryPutAll() {
     Host host = Host.getHost(0);
     final VM vm0 = host.getVM(0);
@@ -247,6 +276,7 @@ public class ClientsWithVersioningRetryDUnitTest extends CacheTestCase {
    * and get the version information.
    * bug #48205
    */
+  @Test
   public void testRetryPutAllInAccessor() {
     Host host = Host.getHost(0);
     final VM vm0 = host.getVM(0);

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/b914df23/geode-core/src/test/java/com/gemstone/gemfire/pdx/DistributedSystemIdDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/pdx/DistributedSystemIdDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/pdx/DistributedSystemIdDUnitTest.java
index f1adbce..85e12cf 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/pdx/DistributedSystemIdDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/pdx/DistributedSystemIdDUnitTest.java
@@ -16,26 +16,33 @@
  */
 package com.gemstone.gemfire.pdx;
 
-import com.gemstone.gemfire.distributed.internal.DistributionManager;
-import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
-import com.gemstone.gemfire.internal.AvailablePortHelper;
-import com.gemstone.gemfire.test.dunit.*;
+import static com.gemstone.gemfire.distributed.DistributedSystemConfigProperties.*;
+import static org.junit.Assert.*;
 
 import java.util.Properties;
 
-import static com.gemstone.gemfire.distributed.DistributedSystemConfigProperties.*;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
 
-public class DistributedSystemIdDUnitTest extends DistributedTestCase {
-  
-  public DistributedSystemIdDUnitTest(String name) {
-    super(name);
-  }
+import com.gemstone.gemfire.distributed.internal.DistributionManager;
+import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
+import com.gemstone.gemfire.internal.AvailablePortHelper;
+import com.gemstone.gemfire.test.dunit.Host;
+import com.gemstone.gemfire.test.dunit.IgnoredException;
+import com.gemstone.gemfire.test.dunit.SerializableCallable;
+import com.gemstone.gemfire.test.dunit.VM;
+import com.gemstone.gemfire.test.dunit.internal.JUnit4DistributedTestCase;
+import com.gemstone.gemfire.test.junit.categories.DistributedTest;
 
+@Category(DistributedTest.class)
+public class DistributedSystemIdDUnitTest extends JUnit4DistributedTestCase {
+  
   @Override
   public void preSetUp() {
     disconnectAllFromDS(); // GEODE-558 test fails due to infection from another test
   }
 
+  @Test
   public void testMatchingIds() {
     Host host = Host.getHost(0);
     VM vm0 = host.getVM(0);
@@ -49,9 +56,9 @@ public class DistributedSystemIdDUnitTest extends DistributedTestCase {
     checkId(vm0, 1);
     checkId(vm1, 1);
     checkId(vm2, 1);
-    
   }
   
+  @Test
   public void testInfectiousId() {
     Host host = Host.getHost(0);
     VM vm0 = host.getVM(0);
@@ -63,6 +70,7 @@ public class DistributedSystemIdDUnitTest extends DistributedTestCase {
     checkId(vm1, 1);
   }
   
+  @Test
   public void testMismatch() {
     IgnoredException.addIgnoredException("Rejected new system node");
     Host host = Host.getHost(0);
@@ -81,6 +89,7 @@ public class DistributedSystemIdDUnitTest extends DistributedTestCase {
     checkId(vm0, 1);
   }
   
+  @Test
   public void testInvalid() {
     Host host = Host.getHost(0);
     VM vm0 = host.getVM(0);
@@ -90,19 +99,17 @@ public class DistributedSystemIdDUnitTest extends DistributedTestCase {
       createLocator(vm0, "256");
       fail("Should have gotten an exception");
     } catch(Exception expected) {
-
     }
+
     try {
       createLocator(vm0, "aardvark");
       fail("Should have gotten an exception");
     } catch(Exception expected) {
-      
     }
   }
 
   private void createSystem(VM vm, final String dsId, final int locatorPort) {
-    
-    
+
     SerializableCallable createSystem = new SerializableCallable() {
       public Object call() throws Exception {
         Properties props = new Properties();
@@ -125,8 +132,6 @@ public class DistributedSystemIdDUnitTest extends DistributedTestCase {
         props.setProperty(LOCATORS, "localhost[" + port + "]");
         props.setProperty(START_LOCATOR, "localhost[" + port + "]");
         getSystem(props);
-//        Locator locator = Locator.startLocatorAndDS(port, File.createTempFile("locator", ""), props);
-//        system = (InternalDistributedSystem) locator.getDistributedSystem();
         return port;
       }
     };
@@ -135,7 +140,6 @@ public class DistributedSystemIdDUnitTest extends DistributedTestCase {
   
   private void checkId(VM vm, final int dsId) {
     
-    
     SerializableCallable createSystem = new SerializableCallable() {
       public Object call() throws Exception {
         DistributionManager dm = (DistributionManager) InternalDistributedSystem.getAnyInstance().getDistributionManager();
@@ -145,7 +149,4 @@ public class DistributedSystemIdDUnitTest extends DistributedTestCase {
     };
     vm.invoke(createSystem);
   }
-  
-  
-
 }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/b914df23/geode-core/src/test/java/com/gemstone/gemfire/pdx/JSONFormatterJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/pdx/JSONFormatterJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/pdx/JSONFormatterJUnitTest.java
index 40a1071..6fbc9de 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/pdx/JSONFormatterJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/pdx/JSONFormatterJUnitTest.java
@@ -16,14 +16,14 @@
  */
 package com.gemstone.gemfire.pdx;
 
+import static com.gemstone.gemfire.distributed.DistributedSystemConfigProperties.*;
+import static org.junit.Assert.*;
+
+import java.text.SimpleDateFormat;
+
 import com.fasterxml.jackson.core.JsonProcessingException;
 import com.fasterxml.jackson.databind.DeserializationFeature;
 import com.fasterxml.jackson.databind.ObjectMapper;
-import com.gemstone.gemfire.cache.*;
-import com.gemstone.gemfire.cache.server.CacheServer;
-import com.gemstone.gemfire.internal.Assert;
-import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
-import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
 import org.json.JSONException;
 import org.json.JSONObject;
 import org.junit.After;
@@ -31,10 +31,16 @@ import org.junit.Before;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
 
-import java.text.SimpleDateFormat;
-
-import static com.gemstone.gemfire.distributed.DistributedSystemConfigProperties.MCAST_PORT;
-import static org.junit.Assert.fail;
+import com.gemstone.gemfire.cache.AttributesFactory;
+import com.gemstone.gemfire.cache.Cache;
+import com.gemstone.gemfire.cache.CacheFactory;
+import com.gemstone.gemfire.cache.DataPolicy;
+import com.gemstone.gemfire.cache.Region;
+import com.gemstone.gemfire.cache.RegionAttributes;
+import com.gemstone.gemfire.cache.server.CacheServer;
+import com.gemstone.gemfire.internal.Assert;
+import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
+import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
 
 @Category(IntegrationTest.class)
 public class JSONFormatterJUnitTest {
@@ -42,10 +48,6 @@ public class JSONFormatterJUnitTest {
   private GemFireCacheImpl c;
   private final String PRIMITIVE_KV_STORE_REGION = "primitiveKVStore";
     
-  public JSONFormatterJUnitTest() {
-    super();
-  }
-
   @Before
   public void setUp() throws Exception {
     this.c = (GemFireCacheImpl) new CacheFactory().set(MCAST_PORT, "0").setPdxReadSerialized(true).create();
@@ -148,48 +150,48 @@ public class JSONFormatterJUnitTest {
 
       //Testcase-1: Validate json string against the pdxInstance.
       //validation for primitive types
-      junit.framework.Assert.assertEquals("VerifyPdxInstanceToJson: Int type values are not matched",
+      assertEquals("VerifyPdxInstanceToJson: Int type values are not matched",
           testObject.getP_int(), jsonObject.getInt(testObject.getP_intFN()));
-      junit.framework.Assert.assertEquals("VerifyPdxInstanceToJson: long type values are not matched",
+      assertEquals("VerifyPdxInstanceToJson: long type values are not matched",
           testObject.getP_long(), jsonObject.getLong(testObject.getP_longFN()));
 
       //validation for wrapper types
-      junit.framework.Assert.assertEquals("VerifyPdxInstanceToJson: Boolean type values are not matched",
+      assertEquals("VerifyPdxInstanceToJson: Boolean type values are not matched",
           testObject.getW_bool().booleanValue(), jsonObject.getBoolean(testObject.getW_boolFN()));
-      junit.framework.Assert.assertEquals("VerifyPdxInstanceToJson: Float type values are not matched",
-          testObject.getW_double().doubleValue(), jsonObject.getDouble(testObject.getW_doubleFN()));
-      junit.framework.Assert.assertEquals("VerifyPdxInstanceToJson: bigDec type values are not matched",
+      assertEquals("VerifyPdxInstanceToJson: Float type values are not matched",
+          testObject.getW_double().doubleValue(), jsonObject.getDouble(testObject.getW_doubleFN()), 0);
+      assertEquals("VerifyPdxInstanceToJson: bigDec type values are not matched",
           testObject.getW_bigDec().longValue(), jsonObject.getLong(testObject.getW_bigDecFN()));
 
       //vlidation for array types
-      junit.framework.Assert.assertEquals("VerifyPdxInstanceToJson: Byte[] type values are not matched",
+      assertEquals("VerifyPdxInstanceToJson: Byte[] type values are not matched",
           (int)testObject.getW_byteArray()[1], jsonObject.getJSONArray(testObject.getW_byteArrayFN()).getInt(1));
-      junit.framework.Assert.assertEquals("VerifyPdxInstanceToJson: Double[] type values are not matched",
-          testObject.getW_doubleArray()[0], jsonObject.getJSONArray(testObject.getW_doubleArrayFN()).getDouble(0));
-      junit.framework.Assert.assertEquals("VerifyPdxInstanceToJson: String[] type values are not matched",
+      assertEquals("VerifyPdxInstanceToJson: Double[] type values are not matched",
+          testObject.getW_doubleArray()[0], jsonObject.getJSONArray(testObject.getW_doubleArrayFN()).getDouble(0), 0);
+      assertEquals("VerifyPdxInstanceToJson: String[] type values are not matched",
           testObject.getW_strArray()[2], jsonObject.getJSONArray(testObject.getW_strArrayFN()).getString(2));
 
       //validation for collection types
-      junit.framework.Assert.assertEquals("VerifyPdxInstanceToJson: list type values are not matched",
+      assertEquals("VerifyPdxInstanceToJson: list type values are not matched",
           testObject.getC_list().get(0),
           jsonObject.getJSONArray(testObject.getC_listFN()).getString(0));
 
-      junit.framework.Assert.assertEquals("VerifyPdxInstanceToJson: stack type values are not matched",
+      assertEquals("VerifyPdxInstanceToJson: stack type values are not matched",
           testObject.getC_stack().get(2),
           jsonObject.getJSONArray(testObject.getC_stackFN()).getString(2));
 
       //validation for Map
-      junit.framework.Assert.assertEquals("VerifyPdxInstanceToJson: Map type values are not matched",
+      assertEquals("VerifyPdxInstanceToJson: Map type values are not matched",
           testObject.getM_empByCity().get("Ahmedabad").get(0).getFname(),
           jsonObject.getJSONObject(testObject.getM_empByCityFN()).getJSONArray("Ahmedabad").getJSONObject(0).getString("fname"));
 
       //validation Enum
-      junit.framework.Assert.assertEquals("VerifyPdxInstanceToJson: Enum type values are not matched",
+      assertEquals("VerifyPdxInstanceToJson: Enum type values are not matched",
           testObject.getDay().toString(),
           jsonObject.getString(testObject.getDayFN()));
 
     } catch (JSONException e) {
-      fail("Error in VerifyPdxInstanceToJson, Malformed json, can not create JSONArray from it");
+      throw new AssertionError("Error in VerifyPdxInstanceToJson, Malformed json, can not create JSONArray from it", e);
     }
   }
 



Mime
View raw message