geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kl...@apache.org
Subject [17/51] [partial] incubator-geode git commit: GEODE-773: Extract static methods from DistributedTestCase
Date Tue, 09 Feb 2016 18:44:27 GMT
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/820cfd63/gemfire-core/src/test/java/com/gemstone/gemfire/management/UniversalMembershipListenerAdapterDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/management/UniversalMembershipListenerAdapterDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/management/UniversalMembershipListenerAdapterDUnitTest.java
index ba642a1..c25a1db 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/management/UniversalMembershipListenerAdapterDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/management/UniversalMembershipListenerAdapterDUnitTest.java
@@ -49,9 +49,12 @@ 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.IgnoredException;
+import com.gemstone.gemfire.test.dunit.NetworkUtils;
 import com.gemstone.gemfire.test.dunit.Host;
 import com.gemstone.gemfire.test.dunit.SerializableRunnable;
 import com.gemstone.gemfire.test.dunit.VM;
+import com.gemstone.gemfire.test.dunit.Wait;
 
 /**
  * Tests the UniversalMembershipListenerAdapter.
@@ -87,8 +90,7 @@ public class UniversalMembershipListenerAdapterDUnitTest extends ClientServerTes
   }
 
   @Override
-  public void tearDown2() throws Exception {
-    super.tearDown2();
+  protected final void postTearDownCacheTestCase() throws Exception {
     InternalClientMembership.unregisterAllListeners();
   }
   
@@ -196,7 +198,7 @@ public class UniversalMembershipListenerAdapterDUnitTest extends ClientServerTes
 
     // duplicate join
     InternalClientMembership.notifyJoined(memberA, true);
-    pause(BRIEF_PAUSE_MILLIS);
+    Wait.pause(BRIEF_PAUSE_MILLIS);
     assertFalse(fired[JOINED]);
     assertNull(member[JOINED]);
     assertNull(memberId[JOINED]);
@@ -217,7 +219,7 @@ public class UniversalMembershipListenerAdapterDUnitTest extends ClientServerTes
 
     // duplicate left
     InternalClientMembership.notifyLeft(memberA, true);
-    pause(BRIEF_PAUSE_MILLIS);
+    Wait.pause(BRIEF_PAUSE_MILLIS);
     assertFalse(fired[LEFT]);
     assertNull(member[LEFT]);
     assertNull(memberId[LEFT]);
@@ -376,7 +378,7 @@ public class UniversalMembershipListenerAdapterDUnitTest extends ClientServerTes
     final int[] ports = new int[1];
 
     // create BridgeServer in controller vm...
-    getLogWriter().info("[testLonerClientEventsInServer] Create BridgeServer");
+    com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[testLonerClientEventsInServer] Create BridgeServer");
     getSystem();
     AttributesFactory factory = new AttributesFactory();
     factory.setScope(Scope.LOCAL);
@@ -390,9 +392,9 @@ public class UniversalMembershipListenerAdapterDUnitTest extends ClientServerTes
     final DistributedMember serverMember = getDistributedMember();
     final Properties serverProperties = getSystem().getProperties();
 
-    getLogWriter().info("[testLonerClientEventsInServer] ports[0]=" + ports[0]);
-    getLogWriter().info("[testLonerClientEventsInServer] serverMemberId=" + serverMemberId);
-    getLogWriter().info("[testLonerClientEventsInServer] serverMember=" + serverMember);
+    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);
 
     // register the bridge listener
     ClientMembership.registerClientMembershipListener(bridgeListener);
@@ -411,14 +413,14 @@ public class UniversalMembershipListenerAdapterDUnitTest extends ClientServerTes
     new CacheSerializableRunnable("Create bridge client") {
       @Override
       public void run2() throws CacheException {
-        getLogWriter().info("[testLonerClientEventsInServer] create bridge client");
+        com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[testLonerClientEventsInServer] create bridge client");
         Properties config = new Properties();
         config.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
         config.setProperty(DistributionConfig.LOCATORS_NAME, "");
         getSystem(config);
         AttributesFactory factory = new AttributesFactory();
         factory.setScope(Scope.LOCAL);
-        ClientServerTestCase.configureConnectionPool(factory, getServerHostName(host), ports, false, -1, -1, null);
+        ClientServerTestCase.configureConnectionPool(factory, NetworkUtils.getServerHostName(host), ports, false, -1, -1, null);
         createRegion(name, factory.create());
         assertNotNull(getRootRegion().getSubregion(name));
       }
@@ -444,7 +446,7 @@ public class UniversalMembershipListenerAdapterDUnitTest extends ClientServerTes
       }
     }
     
-    getLogWriter().info("[testLonerClientEventsInServer] assert server detected client join");
+    com.gemstone.gemfire.test.dunit.LogWriterUtils.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
@@ -490,7 +492,7 @@ public class UniversalMembershipListenerAdapterDUnitTest extends ClientServerTes
 
     vm0.invoke(new SerializableRunnable("Wait for client to fully connect") {
       public void run() {
-        getLogWriter().info("[testLonerClientEventsInServer] wait for client to fully connect");
+        com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[testLonerClientEventsInServer] wait for client to fully connect");
         final String pl =
           getRootRegion().getSubregion(name).getAttributes().getPoolName();
         PoolImpl pi = (PoolImpl)PoolManager.find(pl);
@@ -500,7 +502,7 @@ public class UniversalMembershipListenerAdapterDUnitTest extends ClientServerTes
     
     vm0.invoke(new SerializableRunnable("Close bridge client region") {
       public void run() {
-        getLogWriter().info("[testLonerClientEventsInServer] close bridge client region");
+        com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[testLonerClientEventsInServer] close bridge client region");
         getRootRegion().getSubregion(name).close();
         PoolManager.close();
       }
@@ -517,7 +519,7 @@ public class UniversalMembershipListenerAdapterDUnitTest extends ClientServerTes
       }
     }
     
-    getLogWriter().info("[testLonerClientEventsInServer] assert server detected client left");
+    com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[testLonerClientEventsInServer] assert server detected client left");
 
     assertFalse(firedBridge[JOINED]);
     assertNull(memberIdBridge[JOINED]);
@@ -579,7 +581,7 @@ public class UniversalMembershipListenerAdapterDUnitTest extends ClientServerTes
       }
     }
     
-    getLogWriter().info("[testLonerClientEventsInServer] assert server detected client re-join");
+    com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[testLonerClientEventsInServer] assert server detected client re-join");
     assertTrue(firedBridge[JOINED]);
     assertEquals(clientMember, memberBridge[JOINED]);
     assertEquals(clientMemberId, memberIdBridge[JOINED]);
@@ -624,7 +626,7 @@ public class UniversalMembershipListenerAdapterDUnitTest extends ClientServerTes
     
     vm0.invoke(new SerializableRunnable("Wait for client to fully connect") {
       public void run() {
-        getLogWriter().info("[testLonerClientEventsInServer] wait for client to fully connect");
+        com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[testLonerClientEventsInServer] wait for client to fully connect");
         final String pl =
           getRootRegion().getSubregion(name).getAttributes().getPoolName();
         PoolImpl pi = (PoolImpl)PoolManager.find(pl);
@@ -636,7 +638,7 @@ public class UniversalMembershipListenerAdapterDUnitTest extends ClientServerTes
     try {
       vm0.invoke(new SerializableRunnable("Stop bridge client") {
         public void run() {
-          getLogWriter().info("[testLonerClientEventsInServer] Stop bridge client");
+          com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[testLonerClientEventsInServer] Stop bridge client");
           getRootRegion().getSubregion(name).close();
           PoolManager.close();
         }
@@ -653,7 +655,7 @@ public class UniversalMembershipListenerAdapterDUnitTest extends ClientServerTes
         }
       }
       
-    getLogWriter().info("[testLonerClientEventsInServer] assert server detected client crashed");
+    com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[testLonerClientEventsInServer] assert server detected client crashed");
     assertFalse(firedBridge[JOINED]);
     assertNull(memberIdBridge[JOINED]);
     assertNull(memberBridge[JOINED]);
@@ -760,7 +762,7 @@ public class UniversalMembershipListenerAdapterDUnitTest extends ClientServerTes
       new UniversalMembershipListenerAdapter() {
       @Override
       public synchronized void memberJoined(MembershipEvent event) {
-        getLogWriter().info("[doTestSystemClientEventsInServer] memberJoined >" + event.getMemberId() + "<");
+        com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[doTestSystemClientEventsInServer] memberJoined >" + event.getMemberId() + "<");
         firedAdapterDuplicate[JOINED] = firedAdapter[JOINED];
         firedAdapter[JOINED] = true;
         memberAdapter[JOINED] = event.getDistributedMember();
@@ -773,7 +775,7 @@ public class UniversalMembershipListenerAdapterDUnitTest extends ClientServerTes
       }
       @Override
       public synchronized void memberLeft(MembershipEvent event) {
-        getLogWriter().info("[doTestSystemClientEventsInServer] memberLeft >" + event.getMemberId() + "<");
+        com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[doTestSystemClientEventsInServer] memberLeft >" + event.getMemberId() + "<");
         firedAdapterDuplicate[LEFT] = firedAdapter[LEFT];
         firedAdapter[LEFT] = true;
         memberAdapter[LEFT] = event.getDistributedMember();
@@ -786,7 +788,7 @@ public class UniversalMembershipListenerAdapterDUnitTest extends ClientServerTes
       }
       @Override
       public synchronized void memberCrashed(MembershipEvent event) {
-        getLogWriter().info("[doTestSystemClientEventsInServer] memberCrashed >" + event.getMemberId() + "<");
+        com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[doTestSystemClientEventsInServer] memberCrashed >" + event.getMemberId() + "<");
         firedAdapterDuplicate[CRASHED] = firedAdapter[CRASHED];
         firedAdapter[CRASHED] = true;
         memberAdapter[CRASHED] = event.getDistributedMember();
@@ -832,7 +834,7 @@ public class UniversalMembershipListenerAdapterDUnitTest extends ClientServerTes
     final int[] ports = new int[1];
 
     // create BridgeServer in controller vm...
-    getLogWriter().info("[doTestSystemClientEventsInServer] Create BridgeServer");
+    com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[doTestSystemClientEventsInServer] Create BridgeServer");
     getSystem();
     AttributesFactory factory = new AttributesFactory();
     factory.setScope(Scope.LOCAL);
@@ -852,9 +854,9 @@ public class UniversalMembershipListenerAdapterDUnitTest extends ClientServerTes
     serverProperties.remove(DistributionConfig.SSL_PROTOCOLS_NAME);
     serverProperties.remove(DistributionConfig.SSL_REQUIRE_AUTHENTICATION_NAME);
 
-    getLogWriter().info("[doTestSystemClientEventsInServer] ports[0]=" + ports[0]);
-    getLogWriter().info("[doTestSystemClientEventsInServer] serverMemberId=" + serverMemberId);
-    getLogWriter().info("[doTestSystemClientEventsInServer] serverMember=" + serverMember);
+    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);
 
     // register the bridge listener
     ClientMembership.registerClientMembershipListener(bridgeListener);
@@ -873,12 +875,12 @@ public class UniversalMembershipListenerAdapterDUnitTest extends ClientServerTes
     new CacheSerializableRunnable("Create bridge client") {
       @Override
       public void run2() throws CacheException {
-        getLogWriter().info("[doTestSystemClientEventsInServer] create system bridge client");
+        com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[doTestSystemClientEventsInServer] create system bridge client");
         assertTrue(getSystem(serverProperties).isConnected());
         assertFalse(getCache().isClosed());
         AttributesFactory factory = new AttributesFactory();
         factory.setScope(Scope.LOCAL);
-        ClientServerTestCase.configureConnectionPool(factory, getServerHostName(host), ports, false, -1, -1, null);
+        ClientServerTestCase.configureConnectionPool(factory, NetworkUtils.getServerHostName(host), ports, false, -1, -1, null);
         createRegion(name, factory.create());
         assertNotNull(getRootRegion().getSubregion(name));
       }
@@ -908,7 +910,7 @@ public class UniversalMembershipListenerAdapterDUnitTest extends ClientServerTes
       }
     }
     
-    getLogWriter().info("[doTestSystemClientEventsInServer] assert server detected client join");
+    com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[doTestSystemClientEventsInServer] assert server detected client join");
     assertFalse(firedSystemDuplicate);
     assertFalse(firedAdapterDuplicate);
     assertFalse(firedBridgeDuplicate);
@@ -957,7 +959,7 @@ public class UniversalMembershipListenerAdapterDUnitTest extends ClientServerTes
 
     vm0.invoke(new SerializableRunnable("Wait for client to fully connect") {
       public void run() {
-        getLogWriter().info("[doTestSystemClientEventsInServer] wait for client to fully connect");
+        com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[doTestSystemClientEventsInServer] wait for client to fully connect");
         final String pl =
           getRootRegion().getSubregion(name).getAttributes().getPoolName();
         PoolImpl pi = (PoolImpl)PoolManager.find(pl);
@@ -968,7 +970,7 @@ public class UniversalMembershipListenerAdapterDUnitTest extends ClientServerTes
     // close bridge client region
     vm0.invoke(new SerializableRunnable("Close bridge client region") {
       public void run() {
-        getLogWriter().info("[doTestSystemClientEventsInServer] close bridge client region");
+        com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[doTestSystemClientEventsInServer] close bridge client region");
         getRootRegion().getSubregion(name).close();
         PoolManager.close();
       }
@@ -985,7 +987,7 @@ public class UniversalMembershipListenerAdapterDUnitTest extends ClientServerTes
       }
     }
     
-    getLogWriter().info("[doTestSystemClientEventsInServer] assert server detected client left");
+    com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[doTestSystemClientEventsInServer] assert server detected client left");
     assertFalse(firedSystemDuplicate);
     assertFalse(firedAdapterDuplicate);
     assertFalse(firedBridgeDuplicate);
@@ -1050,7 +1052,7 @@ public class UniversalMembershipListenerAdapterDUnitTest extends ClientServerTes
       }
     }
     
-    getLogWriter().info("[doTestSystemClientEventsInServer] assert server detected client re-join");
+    com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[doTestSystemClientEventsInServer] assert server detected client re-join");
     assertFalse(firedSystemDuplicate);
     assertFalse(firedAdapterDuplicate);
     assertFalse(firedBridgeDuplicate);
@@ -1099,7 +1101,7 @@ public class UniversalMembershipListenerAdapterDUnitTest extends ClientServerTes
     
     vm0.invoke(new SerializableRunnable("Wait for client to fully connect") {
       public void run() {
-        getLogWriter().info("[doTestSystemClientEventsInServer] wait for client to fully connect");
+        com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[doTestSystemClientEventsInServer] wait for client to fully connect");
         final String pl =
           getRootRegion().getSubregion(name).getAttributes().getPoolName();
         PoolImpl pi = (PoolImpl)PoolManager.find(pl);
@@ -1110,7 +1112,7 @@ public class UniversalMembershipListenerAdapterDUnitTest extends ClientServerTes
     // have bridge client disconnect from system
     vm0.invoke(new SerializableRunnable("Disconnect bridge client") {
       public void run() {
-        getLogWriter().info("[doTestSystemClientEventsInServer] disconnect bridge client");
+        com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[doTestSystemClientEventsInServer] disconnect bridge client");
         closeCache();
         disconnectFromDS();
       }
@@ -1132,7 +1134,7 @@ public class UniversalMembershipListenerAdapterDUnitTest extends ClientServerTes
       }
     }
     
-    getLogWriter().info("[doTestSystemClientEventsInServer] assert server detected client left");
+    com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[doTestSystemClientEventsInServer] assert server detected client left");
     assertFalse(firedSystemDuplicate);
     assertFalse(firedAdapterDuplicate);
     assertFalse(firedBridgeDuplicate);
@@ -1202,7 +1204,7 @@ public class UniversalMembershipListenerAdapterDUnitTest extends ClientServerTes
       }
     }
     
-    getLogWriter().info("[doTestSystemClientEventsInServer] assert server detected client re-join");
+    com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[doTestSystemClientEventsInServer] assert server detected client re-join");
     assertFalse(firedSystemDuplicate);
     assertFalse(firedAdapterDuplicate);
     assertFalse(firedBridgeDuplicate);
@@ -1251,7 +1253,7 @@ public class UniversalMembershipListenerAdapterDUnitTest extends ClientServerTes
     
     vm0.invoke(new SerializableRunnable("Wait for client to fully connect") {
       public void run() {
-        getLogWriter().info("[doTestSystemClientEventsInServer] wait for client to fully connect");
+        com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[doTestSystemClientEventsInServer] wait for client to fully connect");
         final String pl =
           getRootRegion().getSubregion(name).getAttributes().getPoolName();
         PoolImpl pi = (PoolImpl)PoolManager.find(pl);
@@ -1264,7 +1266,7 @@ public class UniversalMembershipListenerAdapterDUnitTest extends ClientServerTes
     try {
       vm0.invoke(new SerializableRunnable("Close bridge client region") {
         public void run() {
-          getLogWriter().info("[doTestSystemClientEventsInServer] close bridge client region");
+          com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[doTestSystemClientEventsInServer] close bridge client region");
           getRootRegion().getSubregion(name).close();
           PoolManager.close();
         }
@@ -1281,7 +1283,7 @@ public class UniversalMembershipListenerAdapterDUnitTest extends ClientServerTes
         }
       }
       
-    getLogWriter().info("[doTestSystemClientEventsInServer] assert server detected client crashed");
+    com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[doTestSystemClientEventsInServer] assert server detected client crashed");
     assertFalse(firedSystemDuplicate);
     assertFalse(firedAdapterDuplicate);
     assertFalse(firedBridgeDuplicate);
@@ -1335,11 +1337,11 @@ 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) {
-    getLogWriter().info("[waitForClientToFullyConnect]");
+    com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[waitForClientToFullyConnect]");
     final long failMillis = System.currentTimeMillis() + JOIN_FAIL_MILLIS;
     boolean fullyConnected = false;
     while (!fullyConnected) {
-      pause(100);
+      Wait.pause(100);
       fullyConnected = pool.getConnectionCount() >= pool.getMinConnections();
       assertTrue("Client failed to create "
                  + pool.getMinConnections()
@@ -1348,7 +1350,7 @@ public class UniversalMembershipListenerAdapterDUnitTest extends ClientServerTes
                  + " connections were created.",
                  System.currentTimeMillis() < failMillis);
     }
-    getLogWriter().info("[waitForClientToFullyConnect] fullyConnected=" + fullyConnected);
+    com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[waitForClientToFullyConnect] fullyConnected=" + fullyConnected);
   }
   
   /**
@@ -1459,7 +1461,7 @@ public class UniversalMembershipListenerAdapterDUnitTest extends ClientServerTes
       new UniversalMembershipListenerAdapter() {
       @Override
       public synchronized void memberJoined(MembershipEvent event) {
-        getLogWriter().info("[testServerEventsInSystemClient] memberJoined >" + event.getMemberId() + "<");
+        com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[testServerEventsInSystemClient] memberJoined >" + event.getMemberId() + "<");
         firedAdapterDuplicate[JOINED] = firedAdapter[JOINED];
         firedAdapter[JOINED] = true;
         memberAdapter[JOINED] = event.getDistributedMember();
@@ -1472,7 +1474,7 @@ public class UniversalMembershipListenerAdapterDUnitTest extends ClientServerTes
       }
       @Override
       public synchronized void memberLeft(MembershipEvent event) {
-        getLogWriter().info("[testServerEventsInSystemClient] memberLeft >" + event.getMemberId() + "<");
+        com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[testServerEventsInSystemClient] memberLeft >" + event.getMemberId() + "<");
         firedAdapterDuplicate[LEFT] = firedAdapter[LEFT];
         firedAdapter[LEFT] = true;
         memberAdapter[LEFT] = event.getDistributedMember();
@@ -1485,7 +1487,7 @@ public class UniversalMembershipListenerAdapterDUnitTest extends ClientServerTes
       }
       @Override
       public synchronized void memberCrashed(MembershipEvent event) {
-        getLogWriter().info("[testServerEventsInSystemClient] memberCrashed >" + event.getMemberId() + "<");
+        com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[testServerEventsInSystemClient] memberCrashed >" + event.getMemberId() + "<");
         firedAdapterDuplicate[CRASHED] = firedAdapter[CRASHED];
         firedAdapter[CRASHED] = true;
         memberAdapter[CRASHED] = event.getDistributedMember();
@@ -1533,7 +1535,7 @@ public class UniversalMembershipListenerAdapterDUnitTest extends ClientServerTes
     assertTrue(ports[0] != 0);
         
  // create BridgeServer in controller vm...
-    getLogWriter().info("[doTestSystemClientEventsInServer] Create BridgeServer");
+    com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[doTestSystemClientEventsInServer] Create BridgeServer");
     getSystem();
     AttributesFactory factory = new AttributesFactory();
     factory.setScope(Scope.LOCAL);
@@ -1552,9 +1554,9 @@ public class UniversalMembershipListenerAdapterDUnitTest extends ClientServerTes
     serverProperties.remove(DistributionConfig.SSL_PROTOCOLS_NAME);
     serverProperties.remove(DistributionConfig.SSL_REQUIRE_AUTHENTICATION_NAME);
     
-    getLogWriter().info("[testServerEventsInPeerSystem] ports[0]=" + ports[0]);
-    getLogWriter().info("[testServerEventsInPeerSystem] serverMemberId=" + serverMemberId);
-    getLogWriter().info("[testServerEventsInPeerSystem] serverMember=" + serverMember);
+    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);
     
     GemFireCacheImpl cache = GemFireCacheImpl.getExisting();
     assertNotNull(cache);
@@ -1570,7 +1572,7 @@ public class UniversalMembershipListenerAdapterDUnitTest extends ClientServerTes
     new CacheSerializableRunnable("Create Peer Cache") {
       @Override
       public void run2() throws CacheException {
-        getLogWriter().info("[testServerEventsInPeerSystem] Create Peer cache");
+        com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[testServerEventsInPeerSystem] Create Peer cache");
         getSystem(serverProperties);
         AttributesFactory factory = new AttributesFactory();
         factory.setScope(Scope.LOCAL);
@@ -1587,8 +1589,8 @@ public class UniversalMembershipListenerAdapterDUnitTest extends ClientServerTes
     DistributedMember peerMember = (DistributedMember) vm0.invoke(
       UniversalMembershipListenerAdapterDUnitTest.class, "getDistributedMember");
 
-    getLogWriter().info("[testServerEventsInPeerSystem] peerMemberId=" + peerMemberId);
-    getLogWriter().info("[testServerEventsInPeerSystem] peerMember=" + peerMember);
+    com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[testServerEventsInPeerSystem] peerMemberId=" + peerMemberId);
+    com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[testServerEventsInPeerSystem] peerMember=" + peerMember);
 
     
 
@@ -1603,7 +1605,7 @@ public class UniversalMembershipListenerAdapterDUnitTest extends ClientServerTes
       }
     }
     
-    getLogWriter().info("[testServerEventsInPeerSystem] assert server detected peer join");
+    com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[testServerEventsInPeerSystem] assert server detected peer join");
     assertFalse(firedSystemDuplicate);
     // TODO: sometimes get adapter duplicate since memberId isn't endpoint
     // initial impl uses Endpoint.toString() for memberId of server; final
@@ -1646,12 +1648,12 @@ public class UniversalMembershipListenerAdapterDUnitTest extends ClientServerTes
           new LocalLogWriter(InternalLogWriter.ALL_LEVEL, System.out);
     bgexecLogger.info("<ExpectedException action=add>" + 
         "java.io.IOException" + "</ExpectedException>");
-    final ExpectedException ex = addExpectedException(
+    final IgnoredException ex = IgnoredException.addIgnoredException(
         ServerConnectivityException.class.getName());
     try {
       vm0.invoke(new SerializableRunnable("Disconnect Peer server") {
         public void run() {
-          getLogWriter().info("[testServerEventsInPeerSystem] disconnect peer server");
+          com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[testServerEventsInPeerSystem] disconnect peer server");
           closeCache();
           disconnectFromDS();
         }
@@ -1674,7 +1676,7 @@ public class UniversalMembershipListenerAdapterDUnitTest extends ClientServerTes
       ex.remove();
     }
 
-    getLogWriter().info("[testServerEventsInPeerSystem] assert server detected peer crashed");
+    com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[testServerEventsInPeerSystem] assert server detected peer crashed");
     assertFalse(firedSystemDuplicate);
     // TODO: sometimes get adapter duplicate since memberId isn't endpoint
     // initial impl uses Endpoint.toString() for memberId of server; final
@@ -1755,7 +1757,7 @@ public class UniversalMembershipListenerAdapterDUnitTest extends ClientServerTes
       new UniversalMembershipListenerAdapter() {
       @Override
       public synchronized void memberJoined(MembershipEvent event) {
-        getLogWriter().info("[testServerEventsInLonerClient] memberJoined >" + event.getMemberId() + "<");
+        com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[testServerEventsInLonerClient] memberJoined >" + event.getMemberId() + "<");
         firedAdapterDuplicate[JOINED] = firedAdapter[JOINED];
         firedAdapter[JOINED] = true;
         memberAdapter[JOINED] = event.getDistributedMember();
@@ -1768,7 +1770,7 @@ public class UniversalMembershipListenerAdapterDUnitTest extends ClientServerTes
       }
       @Override
       public synchronized void memberLeft(MembershipEvent event) {
-        getLogWriter().info("[testServerEventsInLonerClient] memberLeft >" + event.getMemberId() + "<");
+        com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[testServerEventsInLonerClient] memberLeft >" + event.getMemberId() + "<");
         firedAdapterDuplicate[LEFT] = firedAdapter[LEFT];
         firedAdapter[LEFT] = true;
         memberAdapter[LEFT] = event.getDistributedMember();
@@ -1781,7 +1783,7 @@ public class UniversalMembershipListenerAdapterDUnitTest extends ClientServerTes
       }
       @Override
       public synchronized void memberCrashed(MembershipEvent event) {
-        getLogWriter().info("[testServerEventsInLonerClient] memberCrashed >" + event.getMemberId() + "<");
+        com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[testServerEventsInLonerClient] memberCrashed >" + event.getMemberId() + "<");
         firedAdapterDuplicate[CRASHED] = firedAdapter[CRASHED];
         firedAdapter[CRASHED] = true;
         memberAdapter[CRASHED] = event.getDistributedMember();
@@ -1828,13 +1830,13 @@ public class UniversalMembershipListenerAdapterDUnitTest extends ClientServerTes
       { AvailablePort.getRandomAvailablePort(AvailablePort.SOCKET) };
     assertTrue(ports[0] != 0);
 
-    getLogWriter().info("[testServerEventsInLonerClient] create loner bridge client");
+    com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[testServerEventsInLonerClient] create loner bridge client");
     Properties config = new Properties();
     config.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
     config.setProperty(DistributionConfig.LOCATORS_NAME, "");
     getSystem(config);
         
-    getLogWriter().info("[testServerEventsInLonerClient] create system bridge client");
+    com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[testServerEventsInLonerClient] create system bridge client");
     getSystem();
 
     // register the bridge listener
@@ -1850,7 +1852,7 @@ public class UniversalMembershipListenerAdapterDUnitTest extends ClientServerTes
     new CacheSerializableRunnable("Create BridgeServer") {
       @Override
       public void run2() throws CacheException {
-        getLogWriter().info("[testServerEventsInLonerClient] Create BridgeServer");
+        com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[testServerEventsInLonerClient] Create BridgeServer");
         getSystem();
         AttributesFactory factory = new AttributesFactory();
         factory.setScope(Scope.LOCAL);
@@ -1861,7 +1863,7 @@ public class UniversalMembershipListenerAdapterDUnitTest extends ClientServerTes
           testServerEventsInLonerClient_port = startBridgeServer(ports[0]);
         }
         catch (IOException e) {
-          getLogWriter().error(e);
+          com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().error(e);
           fail(e.getMessage());
         }
       }
@@ -1878,14 +1880,14 @@ public class UniversalMembershipListenerAdapterDUnitTest extends ClientServerTes
     DistributedMember serverMember = (DistributedMember) vm0.invoke(
       UniversalMembershipListenerAdapterDUnitTest.class, "getDistributedMember");
 
-    getLogWriter().info("[testServerEventsInLonerClient] ports[0]=" + ports[0]);
-    getLogWriter().info("[testServerEventsInLonerClient] serverMemberId=" + serverMemberId);
-    getLogWriter().info("[testServerEventsInLonerClient] serverMember=" + serverMember);
+    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);
 
     // create region which connects to bridge server
     AttributesFactory factory = new AttributesFactory();
     factory.setScope(Scope.LOCAL);
-    ClientServerTestCase.configureConnectionPool(factory, getServerHostName(host), ports, false, -1, -1, null);
+    ClientServerTestCase.configureConnectionPool(factory, NetworkUtils.getServerHostName(host), ports, false, -1, -1, null);
     createRegion(name, factory.create());
     assertNotNull(getRootRegion().getSubregion(name));
 
@@ -1900,7 +1902,7 @@ public class UniversalMembershipListenerAdapterDUnitTest extends ClientServerTes
       }
     }
     
-    getLogWriter().info("[testServerEventsInLonerClient] assert client detected server join");
+    com.gemstone.gemfire.test.dunit.LogWriterUtils.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
@@ -1940,7 +1942,7 @@ public class UniversalMembershipListenerAdapterDUnitTest extends ClientServerTes
     assertFalse(isClientAdapter[CRASHED]);
     resetArraysForTesting(firedAdapter, memberAdapter, memberIdAdapter, isClientAdapter);
 
-    getLogWriter().info("[testServerEventsInLonerClient] wait for client to fully connect");
+    com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[testServerEventsInLonerClient] wait for client to fully connect");
     final String pl =
       getRootRegion().getSubregion(name).getAttributes().getPoolName();
     PoolImpl pi = (PoolImpl)PoolManager.find(pl);
@@ -1969,7 +1971,7 @@ public class UniversalMembershipListenerAdapterDUnitTest extends ClientServerTes
     try {
       vm0.invoke(new SerializableRunnable("Disconnect bridge server") {
         public void run() {
-          getLogWriter().info("[testServerEventsInLonerClient] disconnect bridge server");
+          com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[testServerEventsInLonerClient] disconnect bridge server");
           closeCache();
         }
       });
@@ -1993,7 +1995,7 @@ public class UniversalMembershipListenerAdapterDUnitTest extends ClientServerTes
       lw.info(removeExpected2);
     }
     
-    getLogWriter().info("[testServerEventsInLonerClient] assert client detected server crashed");
+    com.gemstone.gemfire.test.dunit.LogWriterUtils.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
@@ -2049,9 +2051,9 @@ public class UniversalMembershipListenerAdapterDUnitTest extends ClientServerTes
     serverMember = (DistributedMember) vm0.invoke(
       UniversalMembershipListenerAdapterDUnitTest.class, "getDistributedMember");
 
-    getLogWriter().info("[testServerEventsInLonerClient] ports[0]=" + ports[0]);
-    getLogWriter().info("[testServerEventsInLonerClient] serverMemberId=" + serverMemberId);
-    getLogWriter().info("[testServerEventsInLonerClient] serverMember=" + serverMember);
+    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);
                                                 
     synchronized(adapter) {
       if (!firedAdapter[JOINED]) {
@@ -2064,7 +2066,7 @@ public class UniversalMembershipListenerAdapterDUnitTest extends ClientServerTes
       }
     }
     
-    getLogWriter().info("[testServerEventsInLonerClient] assert client detected server re-join");
+    com.gemstone.gemfire.test.dunit.LogWriterUtils.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

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/820cfd63/gemfire-core/src/test/java/com/gemstone/gemfire/management/bean/stats/DistributedSystemStatsDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/management/bean/stats/DistributedSystemStatsDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/management/bean/stats/DistributedSystemStatsDUnitTest.java
index b7b3a70..1de93ee 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/management/bean/stats/DistributedSystemStatsDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/management/bean/stats/DistributedSystemStatsDUnitTest.java
@@ -29,6 +29,7 @@ import com.gemstone.gemfire.management.MemberMXBean;
 import com.gemstone.gemfire.management.internal.SystemManagementService;
 import com.gemstone.gemfire.management.internal.beans.MemberMBean;
 import com.gemstone.gemfire.management.internal.beans.MemberMBeanBridge;
+import com.gemstone.gemfire.test.dunit.Assert;
 import com.gemstone.gemfire.test.dunit.SerializableRunnable;
 import com.gemstone.gemfire.test.dunit.VM;
 
@@ -47,10 +48,6 @@ public class DistributedSystemStatsDUnitTest extends ManagementTestBase{
     super.setUp();
   }
 
-  public void tearDown2() throws Exception {
-    super.tearDown2();
-  }
-  
   public void testDistributedSystemStats() throws Exception {
     initManagement(true);
 
@@ -99,9 +96,9 @@ public class DistributedSystemStatsDUnitTest extends ManagementTestBase{
             MemberMXBean memberBean = service.getMBeanProxy(memberMBeanName, MemberMXBean.class);
             waitForRefresh(2, memberMBeanName);
           } catch (NullPointerException e) {
-            fail("FAILED WITH EXCEPION", e);
+            Assert.fail("FAILED WITH EXCEPION", e);
           } catch (Exception e) {
-            fail("FAILED WITH EXCEPION", e);
+            Assert.fail("FAILED WITH EXCEPION", e);
           }
         }
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/820cfd63/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/cli/CliUtilDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/cli/CliUtilDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/cli/CliUtilDUnitTest.java
index 5c68915..192b458 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/cli/CliUtilDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/cli/CliUtilDUnitTest.java
@@ -37,11 +37,14 @@ 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.DistributedTestCase;
+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;
 
 /**
  * 
@@ -73,9 +76,9 @@ public class CliUtilDUnitTest extends CacheTestCase {
   
   private static final long serialVersionUID = 1L;
   
-  public void tearDown2() throws Exception {
+  @Override
+  protected final void preTearDownCacheTestCase() throws Exception {
     destroySetup();
-    super.tearDown2();
   }
   
   
@@ -162,22 +165,22 @@ public class CliUtilDUnitTest extends CacheTestCase {
             checkBean(REGION_MEMBER1_GROUP2,1) &&
             checkBean(REGION_MEMBER2_GROUP2,1) ;                    
         if(!flag){
-          getLogWriter().info("Still probing for mbeans");
+          LogWriterUtils.getLogWriter().info("Still probing for mbeans");
           return false; 
         }
         else{
-          getLogWriter().info("All distributed region mbeans are federated to manager.");
+          LogWriterUtils.getLogWriter().info("All distributed region mbeans are federated to manager.");
           return true;
         }
       }
       private boolean checkBean(String string, int memberCount) {
         DistributedRegionMXBean bean2 = service.getDistributedRegionMXBean(Region.SEPARATOR+string);        
-        getLogWriter().info("DistributedRegionMXBean for region=" + string + " is " + bean2);
+        LogWriterUtils.getLogWriter().info("DistributedRegionMXBean for region=" + string + " is " + bean2);
         if(bean2==null)
           return false;
         else{
           int members = bean2.getMemberCount();
-          getLogWriter().info("DistributedRegionMXBean for region=" + string + " is aggregated for " + memberCount + " expected count=" + memberCount);
+          LogWriterUtils.getLogWriter().info("DistributedRegionMXBean for region=" + string + " is aggregated for " + memberCount + " expected count=" + memberCount);
           if(members<memberCount){            
             return false;
           }
@@ -192,8 +195,8 @@ public class CliUtilDUnitTest extends CacheTestCase {
       }
     };
     
-    DistributedTestCase.waitForCriterion(waitForMaangerMBean, 120000, 2000, true);  
-    getLogWriter().info("Manager federation is complete");
+    Wait.waitForCriterion(waitForMaangerMBean, 120000, 2000, true);  
+    LogWriterUtils.getLogWriter().info("Manager federation is complete");
   }
   
   private void registerFunction() {    
@@ -209,7 +212,7 @@ public class CliUtilDUnitTest extends CacheTestCase {
     assertNotNull(service.getMemberMXBean());
     RegionMXBean bean = service.getLocalRegionMBean(Region.SEPARATOR+regionName); 
     assertNotNull(bean);
-    getLogWriter().info("Created region=" + regionName + " Bean=" + bean);
+    LogWriterUtils.getLogWriter().info("Created region=" + regionName + " Bean=" + bean);
     return region;
   }
   
@@ -221,7 +224,7 @@ public class CliUtilDUnitTest extends CacheTestCase {
     localProps.setProperty(DistributionConfig.JMX_MANAGER_START_NAME, "false");    
     int jmxPort = AvailablePortHelper.getRandomAvailableTCPPort();
     localProps.setProperty(DistributionConfig.JMX_MANAGER_PORT_NAME, ""+jmxPort);
-    getLogWriter().info("Set jmx-port="+ jmxPort);
+    LogWriterUtils.getLogWriter().info("Set jmx-port="+ jmxPort);
     getSystem(localProps);
     getCache();
     final ManagementService service = ManagementService.getManagementService(getCache());
@@ -240,7 +243,7 @@ public class CliUtilDUnitTest extends CacheTestCase {
     
     final VM vm1 = Host.getHost(0).getVM(0);
     
-    getLogWriter().info("testFor - findAllMatchingMembers");
+    LogWriterUtils.getLogWriter().info("testFor - findAllMatchingMembers");
     vm1.invoke(new SerializableRunnable() {      
       @Override
       public void run() {
@@ -256,7 +259,7 @@ public class CliUtilDUnitTest extends CacheTestCase {
       }
     });
     
-    getLogWriter().info("testFor - getDistributedMemberByNameOrId");
+    LogWriterUtils.getLogWriter().info("testFor - getDistributedMemberByNameOrId");
     vm1.invoke(new SerializableRunnable() {      
       @Override
       public void run() {
@@ -264,7 +267,7 @@ public class CliUtilDUnitTest extends CacheTestCase {
       }     
     });
     
-    getLogWriter().info("testFor - executeFunction");
+    LogWriterUtils.getLogWriter().info("testFor - executeFunction");
     vm1.invoke(new SerializableRunnable() {      
       @Override
       public void run() {
@@ -272,7 +275,7 @@ public class CliUtilDUnitTest extends CacheTestCase {
       }     
     });
     
-    getLogWriter().info("testFor - getRegionAssociatedMembers");
+    LogWriterUtils.getLogWriter().info("testFor - getRegionAssociatedMembers");
     vm1.invoke(new SerializableRunnable() {      
       @Override
       public void run() {
@@ -314,7 +317,7 @@ public class CliUtilDUnitTest extends CacheTestCase {
       assertEquals(true,containsMember(set,MEMBER_2_GROUP2));
       
     } catch (CommandResultException e) {     
-      fail("CliUtil failed with exception",e);
+      Assert.fail("CliUtil failed with exception",e);
     }
   }
   
@@ -355,7 +358,7 @@ public class CliUtilDUnitTest extends CacheTestCase {
       assertEquals("executeOnGroup", region1.get(MEMBER_1_GROUP1));
       assertEquals("executeOnGroup", region1.get(MEMBER_2_GROUP1));
     } catch (CommandResultException e) {
-      fail("Error during querying members",e);
+      Assert.fail("Error during querying members",e);
     }        
   }
   
@@ -418,7 +421,7 @@ public class CliUtilDUnitTest extends CacheTestCase {
       Region region = cache.getRegion(COMMON_REGION);
       String id = cache.getDistributedSystem().getDistributedMember().getName();
       region.put(id, object);
-      getLogWriter().info("Completed executeFunction on member : " + id);
+      LogWriterUtils.getLogWriter().info("Completed executeFunction on member : " + id);
       context.getResultSender().lastResult(true);
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/820cfd63/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/CliCommandTestBase.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/CliCommandTestBase.java b/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/CliCommandTestBase.java
index 4d8f8ff..664e7a6 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/CliCommandTestBase.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/CliCommandTestBase.java
@@ -29,6 +29,7 @@ import com.gemstone.gemfire.management.internal.cli.result.CommandResult;
 import com.gemstone.gemfire.management.internal.cli.shell.Gfsh;
 import com.gemstone.gemfire.management.internal.cli.util.CommandStringBuilder;
 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;
 
@@ -80,9 +81,12 @@ public class CliCommandTestBase extends CacheTestCase {
   }
 
   @Override
-  public void tearDown2() throws Exception {
+  protected final void preTearDownCacheTestCase() throws Exception {
+    preTearDownCliCommandTestBase();
     destroyDefaultSetup();
-    super.tearDown2();
+  }
+  
+  protected void preTearDownCliCommandTestBase() throws Exception {
   }
 
   /**
@@ -544,18 +548,18 @@ public class CliCommandTestBase extends CacheTestCase {
   }
 
   protected void info(String string) {
-    getLogWriter().info(string);
+    LogWriterUtils.getLogWriter().info(string);
   }
 
   protected void debug(String string) {
-    getLogWriter().fine(string);
+    LogWriterUtils.getLogWriter().fine(string);
   }
 
   protected void error(String string) {
-    getLogWriter().error(string);
+    LogWriterUtils.getLogWriter().error(string);
   }
 
   protected void error(String string, Throwable e) {
-    getLogWriter().error(string, e);
+    LogWriterUtils.getLogWriter().error(string, e);
   }
 }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/820cfd63/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ConfigCommandsDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ConfigCommandsDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ConfigCommandsDUnitTest.java
index 37f7520..dca0f78 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ConfigCommandsDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ConfigCommandsDUnitTest.java
@@ -35,11 +35,15 @@ import com.gemstone.gemfire.management.internal.cli.i18n.CliStrings;
 import com.gemstone.gemfire.management.internal.cli.remote.CommandProcessor;
 import com.gemstone.gemfire.management.internal.cli.result.CommandResult;
 import com.gemstone.gemfire.management.internal.cli.util.CommandStringBuilder;
-import com.gemstone.gemfire.test.dunit.DistributedTestCase;
+import com.gemstone.gemfire.test.dunit.Assert;
 import com.gemstone.gemfire.test.dunit.Host;
+import com.gemstone.gemfire.test.dunit.Invoke;
+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 org.apache.commons.io.FileUtils;
 
@@ -79,20 +83,20 @@ public class ConfigCommandsDUnitTest extends CliCommandTestBase {
     super(name);
   }
 
-  public void tearDown2() throws Exception {
+  @Override
+  protected void preTearDownCliCommandTestBase() throws Exception {
     deleteTestFiles();
-    invokeInEveryVM(new SerializableRunnable() {
+    Invoke.invokeInEveryVM(new SerializableRunnable() {
 
       @Override
       public void run() {
         try {
           deleteTestFiles();
         } catch (IOException e) {
-          fail("error", e);
+          Assert.fail("error", e);
         }
       }
     });
-    super.tearDown2();
   }
 
   public void testDescribeConfig() throws ClassNotFoundException, IOException {
@@ -121,10 +125,10 @@ public class ConfigCommandsDUnitTest extends CliCommandTestBase {
     RuntimeMXBean runtimeBean = ManagementFactory.getRuntimeMXBean();
     List<String> jvmArgs = runtimeBean.getInputArguments();
 
-    getLogWriter().info("#SB Actual JVM Args : ");
+    LogWriterUtils.getLogWriter().info("#SB Actual JVM Args : ");
 
     for (String jvmArg : jvmArgs) {
-      getLogWriter().info("#SB JVM " + jvmArg);
+      LogWriterUtils.getLogWriter().info("#SB JVM " + jvmArg);
     }
 
     InternalDistributedSystem system = (InternalDistributedSystem) cache.getDistributedSystem();
@@ -138,7 +142,7 @@ public class ConfigCommandsDUnitTest extends CliCommandTestBase {
     CommandResult cmdResult = executeCommand(command);
 
     String resultStr = commandResultToString(cmdResult);
-    getLogWriter().info("#SB Hiding the defaults\n" + resultStr);
+    LogWriterUtils.getLogWriter().info("#SB Hiding the defaults\n" + resultStr);
 
     assertEquals(true, cmdResult.getStatus().equals(Status.OK));
     assertEquals(true, resultStr.contains("G1"));
@@ -148,7 +152,7 @@ public class ConfigCommandsDUnitTest extends CliCommandTestBase {
 
     cmdResult = executeCommand(command + " --" + CliStrings.DESCRIBE_CONFIG__HIDE__DEFAULTS + "=false");
     resultStr = commandResultToString(cmdResult);
-    getLogWriter().info("#SB No hiding of defaults\n" + resultStr);
+    LogWriterUtils.getLogWriter().info("#SB No hiding of defaults\n" + resultStr);
 
     assertEquals(true, cmdResult.getStatus().equals(Status.OK));
     assertEquals(true, resultStr.contains("is-server"));
@@ -250,7 +254,7 @@ public class ConfigCommandsDUnitTest extends CliCommandTestBase {
       FileReader reader = new FileReader(shellConfigFile);
       reader.read(fileContents);
     } catch (Exception ex) {
-      fail("Unable to read file contents for comparison", ex);
+      Assert.fail("Unable to read file contents for comparison", ex);
     }
 
     assertEquals(configToMatch, new String(fileContents));
@@ -277,8 +281,8 @@ public class ConfigCommandsDUnitTest extends CliCommandTestBase {
     csb.addOption(CliStrings.ALTER_RUNTIME_CONFIG__LOG__DISK__SPACE__LIMIT, "10");
     CommandResult cmdResult = executeCommand(csb.getCommandString());
     String resultString = commandResultToString(cmdResult);
-    getLogWriter().info("Result\n");
-    getLogWriter().info(resultString);
+    LogWriterUtils.getLogWriter().info("Result\n");
+    LogWriterUtils.getLogWriter().info(resultString);
     assertEquals(true, cmdResult.getStatus().equals(Status.OK));
     assertEquals(LogWriterImpl.INFO_LEVEL, config.getLogLevel());
     assertEquals(50, config.getLogFileSizeLimit());
@@ -316,8 +320,8 @@ public class ConfigCommandsDUnitTest extends CliCommandTestBase {
     CommandStringBuilder csb = new CommandStringBuilder(CliStrings.ALTER_RUNTIME_CONFIG);
     CommandResult cmdResult = executeCommand(csb.getCommandString());
     String resultAsString = commandResultToString(cmdResult);
-    getLogWriter().info("#SB Result\n");
-    getLogWriter().info(resultAsString);
+    LogWriterUtils.getLogWriter().info("#SB Result\n");
+    LogWriterUtils.getLogWriter().info(resultAsString);
     assertEquals(true, cmdResult.getStatus().equals(Status.ERROR));
     assertTrue(resultAsString.contains(CliStrings.ALTER_RUNTIME_CONFIG__RELEVANT__OPTION__MESSAGE));
 
@@ -325,8 +329,8 @@ public class ConfigCommandsDUnitTest extends CliCommandTestBase {
     csb.addOption(CliStrings.ALTER_RUNTIME_CONFIG__LOG__DISK__SPACE__LIMIT, "2000000000");
     cmdResult = executeCommand(csb.getCommandString());
     resultAsString = commandResultToString(cmdResult);
-    getLogWriter().info("#SB Result\n");
-    getLogWriter().info(resultAsString);
+    LogWriterUtils.getLogWriter().info("#SB Result\n");
+    LogWriterUtils.getLogWriter().info(resultAsString);
     assertEquals(true, cmdResult.getStatus().equals(Status.ERROR));
 
   }
@@ -361,8 +365,8 @@ public class ConfigCommandsDUnitTest extends CliCommandTestBase {
     csb.addOption(CliStrings.ALTER_RUNTIME_CONFIG__LOG__DISK__SPACE__LIMIT, "10");
     CommandResult cmdResult = executeCommand(csb.getCommandString());
     String resultString = commandResultToString(cmdResult);
-    getLogWriter().info("#SB Result\n");
-    getLogWriter().info(resultString);
+    LogWriterUtils.getLogWriter().info("#SB Result\n");
+    LogWriterUtils.getLogWriter().info(resultString);
     assertEquals(true, cmdResult.getStatus().equals(Status.OK));
     assertEquals(LogWriterImpl.INFO_LEVEL, config.getLogLevel());
     assertEquals(50, config.getLogFileSizeLimit());
@@ -415,7 +419,7 @@ public class ConfigCommandsDUnitTest extends CliCommandTestBase {
           final InternalLocator locator = (InternalLocator) Locator.startLocatorAndDS(locatorPort, locatorLogFile, null,
               locatorProps);
 
-          DistributedTestCase.WaitCriterion wc = new DistributedTestCase.WaitCriterion() {
+          WaitCriterion wc = new WaitCriterion() {
             @Override
             public boolean done() {
               return locator.isSharedConfigurationRunning();
@@ -426,7 +430,7 @@ public class ConfigCommandsDUnitTest extends CliCommandTestBase {
               return "Waiting for shared configuration to be started";
             }
           };
-          DistributedTestCase.waitForCriterion(wc, 5000, 500, true);
+          Wait.waitForCriterion(wc, 5000, 500, true);
         } catch (IOException ioex) {
           fail("Unable to create a locator with a shared configuration");
         }
@@ -477,7 +481,7 @@ public class ConfigCommandsDUnitTest extends CliCommandTestBase {
           gemfireProperties = sharedConfig.getConfiguration(groupName).getGemfireProperties();
           assertEquals("fine", gemfireProperties.get(DistributionConfig.LOG_LEVEL_NAME));
         } catch (Exception e) {
-          fail("Error occurred in cluster configuration service", e);
+          Assert.fail("Error occurred in cluster configuration service", e);
         }
       }
     });

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/820cfd63/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/CreateAlterDestroyRegionCommandsDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/CreateAlterDestroyRegionCommandsDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/CreateAlterDestroyRegionCommandsDUnitTest.java
index 9c0fa21..9f6b141 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/CreateAlterDestroyRegionCommandsDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/CreateAlterDestroyRegionCommandsDUnitTest.java
@@ -40,11 +40,14 @@ import com.gemstone.gemfire.management.internal.ManagementConstants;
 import com.gemstone.gemfire.management.internal.cli.i18n.CliStrings;
 import com.gemstone.gemfire.management.internal.cli.result.CommandResult;
 import com.gemstone.gemfire.management.internal.cli.util.CommandStringBuilder;
-import com.gemstone.gemfire.test.dunit.DistributedTestCase;
+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 javax.management.MBeanServer;
 import javax.management.MalformedObjectNameException;
@@ -221,7 +224,7 @@ public class CreateAlterDestroyRegionCommandsDUnitTest extends CliCommandTestBas
     Host.getHost(0).getVM(0).invoke(new SerializableRunnable() {
       @Override
       public void run() {
-        DistributedTestCase.WaitCriterion wc = new DistributedTestCase.WaitCriterion() {
+        WaitCriterion wc = new WaitCriterion() {
           @Override
           public boolean done() {
             try {
@@ -231,7 +234,7 @@ public class CreateAlterDestroyRegionCommandsDUnitTest extends CliCommandTestBas
               ObjectName queryExpON = new ObjectName(queryExp);
               return !(mbeanServer.queryNames(null, queryExpON).isEmpty());
             } catch (MalformedObjectNameException mone) {
-              getLogWriter().error(mone);
+              LogWriterUtils.getLogWriter().error(mone);
               fail(mone.getMessage());
               return false;
             }
@@ -243,42 +246,42 @@ public class CreateAlterDestroyRegionCommandsDUnitTest extends CliCommandTestBas
           }
         };
 
-        DistributedTestCase.waitForCriterion(wc, 5000, 500, true);
+        Wait.waitForCriterion(wc, 5000, 500, true);
       }
     });
 
     // Test failure when region not found
     String command = "destroy region --name=DOESNOTEXIST";
-    getLogWriter().info("testDestroyRegion command=" + command);
+    LogWriterUtils.getLogWriter().info("testDestroyRegion command=" + command);
     CommandResult cmdResult = executeCommand(command);
     String strr = commandResultToString(cmdResult);
-    getLogWriter().info("testDestroyRegion strr=" + strr);
+    LogWriterUtils.getLogWriter().info("testDestroyRegion strr=" + strr);
     assertTrue(stringContainsLine(strr, "Could not find.*\"DOESNOTEXIST\".*"));
     assertEquals(Result.Status.ERROR, cmdResult.getStatus());
 
     // Test unable to destroy with co-location
     command = "destroy region --name=/Customer";
-    getLogWriter().info("testDestroyRegion command=" + command);
+    LogWriterUtils.getLogWriter().info("testDestroyRegion command=" + command);
     cmdResult = executeCommand(command);
     strr = commandResultToString(cmdResult);
-    getLogWriter().info("testDestroyRegion strr=" + strr);
+    LogWriterUtils.getLogWriter().info("testDestroyRegion strr=" + strr);
     assertEquals(Result.Status.ERROR, cmdResult.getStatus());
 
     // Test success
     command = "destroy region --name=/Order";
-    getLogWriter().info("testDestroyRegion command=" + command);
+    LogWriterUtils.getLogWriter().info("testDestroyRegion command=" + command);
     cmdResult = executeCommand(command);
     strr = commandResultToString(cmdResult);
     assertTrue(stringContainsLine(strr, ".*Order.*destroyed successfully.*"));
-    getLogWriter().info("testDestroyRegion strr=" + strr);
+    LogWriterUtils.getLogWriter().info("testDestroyRegion strr=" + strr);
     assertEquals(Result.Status.OK, cmdResult.getStatus());
 
     command = "destroy region --name=/Customer";
-    getLogWriter().info("testDestroyRegion command=" + command);
+    LogWriterUtils.getLogWriter().info("testDestroyRegion command=" + command);
     cmdResult = executeCommand(command);
     strr = commandResultToString(cmdResult);
     assertTrue(stringContainsLine(strr, ".*Customer.*destroyed successfully.*"));
-    getLogWriter().info("testDestroyRegion strr=" + strr);
+    LogWriterUtils.getLogWriter().info("testDestroyRegion strr=" + strr);
     assertEquals(Result.Status.OK, cmdResult.getStatus());
   }
 
@@ -287,19 +290,19 @@ public class CreateAlterDestroyRegionCommandsDUnitTest extends CliCommandTestBas
     createDefaultSetup(null);
     String command = CliStrings.CREATE_REGION + " --" + CliStrings.CREATE_REGION__REGION + "=" + this.region46391 + " --" + CliStrings.CREATE_REGION__REGIONSHORTCUT + "=REPLICATE";
 
-    getLogWriter().info("testCreateRegion46391 create region command=" + command);
+    LogWriterUtils.getLogWriter().info("testCreateRegion46391 create region command=" + command);
 
     CommandResult cmdResult = executeCommand(command);
     assertEquals(Result.Status.OK, cmdResult.getStatus());
 
     command = CliStrings.PUT + " --" + CliStrings.PUT__KEY + "=k1" + " --" + CliStrings.PUT__VALUE + "=k1" + " --" + CliStrings.PUT__REGIONNAME + "=" + this.region46391;
 
-    getLogWriter().info("testCreateRegion46391 put command=" + command);
+    LogWriterUtils.getLogWriter().info("testCreateRegion46391 put command=" + command);
 
     CommandResult cmdResult2 = executeCommand(command);
     assertEquals(Result.Status.OK, cmdResult2.getStatus());
 
-    getLogWriter().info("testCreateRegion46391  cmdResult2=" + commandResultToString(cmdResult2));
+    LogWriterUtils.getLogWriter().info("testCreateRegion46391  cmdResult2=" + commandResultToString(cmdResult2));
     String str1 = "Result      : true";
     String str2 = "Key         : k1";
     String str3 = "Key Class   : java.lang.String";
@@ -751,7 +754,7 @@ public class CreateAlterDestroyRegionCommandsDUnitTest extends CliCommandTestBas
           final InternalLocator locator = (InternalLocator) Locator.startLocatorAndDS(locatorPort, locatorLogFile, null,
               locatorProps);
 
-          DistributedTestCase.WaitCriterion wc = new DistributedTestCase.WaitCriterion() {
+          WaitCriterion wc = new WaitCriterion() {
             @Override
             public boolean done() {
               return locator.isSharedConfigurationRunning();
@@ -762,7 +765,7 @@ public class CreateAlterDestroyRegionCommandsDUnitTest extends CliCommandTestBas
               return "Waiting for shared configuration to be started";
             }
           };
-          DistributedTestCase.waitForCriterion(wc, 5000, 500, true);
+          Wait.waitForCriterion(wc, 5000, 500, true);
         } catch (IOException ioex) {
           fail("Unable to create a locator with a shared configuration");
         }
@@ -802,7 +805,7 @@ public class CreateAlterDestroyRegionCommandsDUnitTest extends CliCommandTestBas
     Host.getHost(0).getVM(0).invoke(new SerializableRunnable() {
       @Override
       public void run() {
-        DistributedTestCase.WaitCriterion wc = new DistributedTestCase.WaitCriterion() {
+        WaitCriterion wc = new WaitCriterion() {
           @Override
           public boolean done() {
             try {
@@ -812,7 +815,7 @@ public class CreateAlterDestroyRegionCommandsDUnitTest extends CliCommandTestBas
               ObjectName queryExpON = new ObjectName(queryExp);
               return !(mbeanServer.queryNames(null, queryExpON).isEmpty());
             } catch (MalformedObjectNameException mone) {
-              getLogWriter().error(mone);
+              LogWriterUtils.getLogWriter().error(mone);
               fail(mone.getMessage());
               return false;
             }
@@ -824,7 +827,7 @@ public class CreateAlterDestroyRegionCommandsDUnitTest extends CliCommandTestBas
           }
         };
 
-        DistributedTestCase.waitForCriterion(wc, 5000, 500, true);
+        Wait.waitForCriterion(wc, 5000, 500, true);
       }
     });
 
@@ -836,7 +839,7 @@ public class CreateAlterDestroyRegionCommandsDUnitTest extends CliCommandTestBas
         try {
           assertTrue(sharedConfig.getConfiguration(groupName).getCacheXmlContent().contains(regionName));
         } catch (Exception e) {
-          fail("Error in cluster configuration service", e);
+          Assert.fail("Error in cluster configuration service", e);
         }
       }
     });
@@ -937,7 +940,7 @@ public class CreateAlterDestroyRegionCommandsDUnitTest extends CliCommandTestBas
           final InternalLocator locator = (InternalLocator) Locator.startLocatorAndDS(locatorPort, locatorLogFile, null,
               locatorProps);
 
-          DistributedTestCase.WaitCriterion wc = new DistributedTestCase.WaitCriterion() {
+          WaitCriterion wc = new WaitCriterion() {
             @Override
             public boolean done() {
               return locator.isSharedConfigurationRunning();
@@ -948,7 +951,7 @@ public class CreateAlterDestroyRegionCommandsDUnitTest extends CliCommandTestBas
               return "Waiting for shared configuration to be started";
             }
           };
-          DistributedTestCase.waitForCriterion(wc, 5000, 500, true);
+          Wait.waitForCriterion(wc, 5000, 500, true);
         } catch (IOException ioex) {
           fail("Unable to create a locator with a shared configuration");
         }
@@ -988,7 +991,7 @@ public class CreateAlterDestroyRegionCommandsDUnitTest extends CliCommandTestBas
     Host.getHost(0).getVM(0).invoke(new SerializableRunnable() {
       @Override
       public void run() {
-        DistributedTestCase.WaitCriterion wc = new DistributedTestCase.WaitCriterion() {
+        WaitCriterion wc = new WaitCriterion() {
           @Override
           public boolean done() {
             try {
@@ -998,7 +1001,7 @@ public class CreateAlterDestroyRegionCommandsDUnitTest extends CliCommandTestBas
               ObjectName queryExpON = new ObjectName(queryExp);
               return !(mbeanServer.queryNames(null, queryExpON).isEmpty());
             } catch (MalformedObjectNameException mone) {
-              getLogWriter().error(mone);
+              LogWriterUtils.getLogWriter().error(mone);
               fail(mone.getMessage());
               return false;
             }
@@ -1010,7 +1013,7 @@ public class CreateAlterDestroyRegionCommandsDUnitTest extends CliCommandTestBas
           }
         };
 
-        DistributedTestCase.waitForCriterion(wc, 5000, 500, true);
+        Wait.waitForCriterion(wc, 5000, 500, true);
       }
     });
 
@@ -1031,7 +1034,7 @@ public class CreateAlterDestroyRegionCommandsDUnitTest extends CliCommandTestBas
     commandStringBuilder = new CommandStringBuilder(CliStrings.DESTROY_REGION);
     commandStringBuilder.addOption(CliStrings.DESTROY_REGION__REGION, regionName);
     cmdResult = executeCommand(commandStringBuilder.toString());
-    getLogWriter().info("#SB" + commandResultToString(cmdResult));
+    LogWriterUtils.getLogWriter().info("#SB" + commandResultToString(cmdResult));
     assertEquals(Result.Status.OK, cmdResult.getStatus());
 
     // Make sure the region was removed from the shared config
@@ -1075,7 +1078,7 @@ public class CreateAlterDestroyRegionCommandsDUnitTest extends CliCommandTestBas
   }
 
   @Override
-  public void tearDown2() throws Exception {
+  protected final void preTearDownCliCommandTestBase() throws Exception {
     for (String path : this.filesToBeDeleted) {
       try {
         final File fileToDelete = new File(path);
@@ -1084,11 +1087,10 @@ public class CreateAlterDestroyRegionCommandsDUnitTest extends CliCommandTestBas
           executeCommand("undeploy --jar=" + fileToDelete.getName());
         }
       } catch (IOException e) {
-        getLogWriter().error("Unable to delete file", e);
+        LogWriterUtils.getLogWriter().error("Unable to delete file", e);
       }
     }
     this.filesToBeDeleted.clear();
-    super.tearDown2();
   }
 
   /**

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/820cfd63/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/DeployCommandsDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/DeployCommandsDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/DeployCommandsDUnitTest.java
index 2e2a2d5..21e44b2 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/DeployCommandsDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/DeployCommandsDUnitTest.java
@@ -29,10 +29,12 @@ import com.gemstone.gemfire.management.internal.cli.i18n.CliStrings;
 import com.gemstone.gemfire.management.internal.cli.remote.CommandExecutionContext;
 import com.gemstone.gemfire.management.internal.cli.remote.CommandProcessor;
 import com.gemstone.gemfire.management.internal.cli.result.CommandResult;
-import com.gemstone.gemfire.test.dunit.DistributedTestCase;
+import com.gemstone.gemfire.test.dunit.Assert;
 import com.gemstone.gemfire.test.dunit.Host;
 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 java.io.File;
 import java.io.FilenameFilter;
@@ -76,7 +78,7 @@ public class DeployCommandsDUnitTest extends CliCommandTestBase {
 
   @SuppressWarnings("serial")
   @Override
-  public void tearDown2() throws Exception {
+  protected final void preTearDownCliCommandTestBase() throws Exception {
     Host.getHost(0).getVM(1).invoke(new SerializableRunnable() {
       public void run() {
         DistributionManager.isDedicatedAdminVM = false;
@@ -89,8 +91,6 @@ public class DeployCommandsDUnitTest extends CliCommandTestBase {
       }
     });
     deleteSavedJarFiles();
-
-    super.tearDown2();
   }
 
   @SuppressWarnings("serial")
@@ -346,7 +346,7 @@ public class DeployCommandsDUnitTest extends CliCommandTestBase {
           final InternalLocator locator = (InternalLocator) Locator.startLocatorAndDS(locatorPort, locatorLogFile, null,
               locatorProps);
 
-          DistributedTestCase.WaitCriterion wc = new DistributedTestCase.WaitCriterion() {
+          WaitCriterion wc = new WaitCriterion() {
             @Override
             public boolean done() {
               return locator.isSharedConfigurationRunning();
@@ -357,7 +357,7 @@ public class DeployCommandsDUnitTest extends CliCommandTestBase {
               return "Waiting for shared configuration to be started";
             }
           };
-          DistributedTestCase.waitForCriterion(wc, 5000, 500, true);
+          Wait.waitForCriterion(wc, 5000, 500, true);
         } catch (IOException ioex) {
           fail("Unable to create a locator with a shared configuration");
         }
@@ -412,7 +412,7 @@ public class DeployCommandsDUnitTest extends CliCommandTestBase {
         try {
           assertTrue(sharedConfig.getConfiguration(groupName).getJarNames().contains("DeployCommandsDUnit1.jar"));
         } catch (Exception e) {
-          fail("Error occurred in cluster configuration service", e);
+          Assert.fail("Error occurred in cluster configuration service", e);
         }
       }
     });
@@ -445,7 +445,7 @@ public class DeployCommandsDUnitTest extends CliCommandTestBase {
         try {
           assertFalse(sharedConfig.getConfiguration(groupName).getJarNames().contains("DeployCommandsDUnit1.jar"));
         } catch (Exception e) {
-          fail("Error occurred in cluster configuration service", e);
+          Assert.fail("Error occurred in cluster configuration service", e);
         }
       }
     });

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/820cfd63/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/DiskStoreCommandsDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/DiskStoreCommandsDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/DiskStoreCommandsDUnitTest.java
index b32a3a0..826f128 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/DiskStoreCommandsDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/DiskStoreCommandsDUnitTest.java
@@ -46,11 +46,14 @@ import com.gemstone.gemfire.management.internal.cli.i18n.CliStrings;
 import com.gemstone.gemfire.management.internal.cli.result.CommandResult;
 import com.gemstone.gemfire.management.internal.cli.shell.Gfsh;
 import com.gemstone.gemfire.management.internal.cli.util.CommandStringBuilder;
-import com.gemstone.gemfire.test.dunit.DistributedTestCase;
+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 org.junit.Test;
 
@@ -198,7 +201,7 @@ public class DiskStoreCommandsDUnitTest extends CliCommandTestBase {
             return "Waiting for another persistent member to come online";
           }
         };
-        waitForCriterion(waitCriterion, 70000, 100, true);
+        Wait.waitForCriterion(waitCriterion, 70000, 100, true);
       }
     });
 
@@ -369,16 +372,16 @@ public class DiskStoreCommandsDUnitTest extends CliCommandTestBase {
       }
     });
     String command = "validate offline-disk-store --name=" + diskStoreName1 + " --disk-dirs=" + diskStoreDir.getAbsolutePath();
-    getLogWriter().info("testValidateDiskStore command: " + command);
+    LogWriterUtils.getLogWriter().info("testValidateDiskStore command: " + command);
     CommandResult cmdResult = executeCommand(command);
     if (cmdResult != null) {
       String stringResult = commandResultToString(cmdResult);
-      getLogWriter().info("testValidateDiskStore cmdResult is stringResult " + stringResult);
+      LogWriterUtils.getLogWriter().info("testValidateDiskStore cmdResult is stringResult " + stringResult);
       assertEquals(Result.Status.OK, cmdResult.getStatus());
       assertTrue(stringResult.contains("Total number of region entries in this disk store is"));
 
     } else {
-      getLogWriter().info("testValidateDiskStore cmdResult is null");
+      LogWriterUtils.getLogWriter().info("testValidateDiskStore cmdResult is null");
       fail("Did not get CommandResult in testValidateDiskStore");
     }
   }
@@ -423,7 +426,7 @@ public class DiskStoreCommandsDUnitTest extends CliCommandTestBase {
       }
     });
     String command = "export offline-disk-store --name=" + diskStoreName1 + " --disk-dirs=" + diskStoreDir.getAbsolutePath() + " --dir=" + exportDir;
-    getLogWriter().info("testExportDiskStore command" + command);
+    LogWriterUtils.getLogWriter().info("testExportDiskStore command" + command);
     CommandResult cmdResult = executeCommand(command);
     if (cmdResult != null) {
       assertEquals(Result.Status.OK, cmdResult.getStatus());
@@ -432,7 +435,7 @@ public class DiskStoreCommandsDUnitTest extends CliCommandTestBase {
       SnapshotTestUtil.checkSnapshotEntries(exportDir, entries, diskStoreName1, region2);
 
     } else {
-      getLogWriter().info("testExportOfflineDiskStore cmdResult is null");
+      LogWriterUtils.getLogWriter().info("testExportOfflineDiskStore cmdResult is null");
       fail("Did not get CommandResult in testExportOfflineDiskStore");
     }
   }
@@ -462,7 +465,7 @@ public class DiskStoreCommandsDUnitTest extends CliCommandTestBase {
           final InternalLocator locator = (InternalLocator) Locator.startLocatorAndDS(locatorPort, locatorLogFile, null,
               locatorProps);
 
-          DistributedTestCase.WaitCriterion wc = new DistributedTestCase.WaitCriterion() {
+          WaitCriterion wc = new WaitCriterion() {
             @Override
             public boolean done() {
               return locator.isSharedConfigurationRunning();
@@ -473,7 +476,7 @@ public class DiskStoreCommandsDUnitTest extends CliCommandTestBase {
               return "Waiting for shared configuration to be started";
             }
           };
-          DistributedTestCase.waitForCriterion(wc, 5000, 500, true);
+          Wait.waitForCriterion(wc, 5000, 500, true);
         } catch (IOException ioex) {
           fail("Unable to create a locator with a shared configuration");
         }
@@ -522,7 +525,7 @@ public class DiskStoreCommandsDUnitTest extends CliCommandTestBase {
           xmlFromConfig = sharedConfig.getConfiguration(groupName).getCacheXmlContent();
           assertTrue(xmlFromConfig.contains(diskStoreName));
         } catch (Exception e) {
-          fail("Error occurred in cluster configuration service", e);
+          Assert.fail("Error occurred in cluster configuration service", e);
         }
       }
     });
@@ -573,7 +576,7 @@ public class DiskStoreCommandsDUnitTest extends CliCommandTestBase {
           xmlFromConfig = sharedConfig.getConfiguration(groupName).getCacheXmlContent();
           assertFalse(xmlFromConfig.contains(diskStoreName));
         } catch (Exception e) {
-          fail("Error occurred in cluster configuration service", e);
+          Assert.fail("Error occurred in cluster configuration service", e);
         }
       }
     });
@@ -664,7 +667,7 @@ public class DiskStoreCommandsDUnitTest extends CliCommandTestBase {
 
     CommandResult cmdResult = executeCommand(commandString);
     String resultString = commandResultToString(cmdResult);
-    getLogWriter().info("#SB command output : \n" + resultString);
+    LogWriterUtils.getLogWriter().info("#SB command output : \n" + resultString);
     assertEquals(true, Result.Status.OK.equals(cmdResult.getStatus()));
     assertEquals(true, resultString.contains("concurrencyLevel=5"));
     assertEquals(true, resultString.contains("lruAction=local-destroy"));
@@ -695,7 +698,7 @@ public class DiskStoreCommandsDUnitTest extends CliCommandTestBase {
 
     cmdResult = executeCommand(commandString);
     resultString = commandResultToString(cmdResult);
-    getLogWriter().info("command output : \n" + resultString);
+    LogWriterUtils.getLogWriter().info("command output : \n" + resultString);
     assertEquals(true, Result.Status.OK.equals(cmdResult.getStatus()));
 
     Object postDestroyValue = vm1.invoke(new SerializableCallable() {
@@ -722,7 +725,7 @@ public class DiskStoreCommandsDUnitTest extends CliCommandTestBase {
 
     cmdResult = executeCommand(commandString);
     resultString = commandResultToString(cmdResult);
-    getLogWriter().info("Alter DiskStore with wrong remove option  : \n" + resultString);
+    LogWriterUtils.getLogWriter().info("Alter DiskStore with wrong remove option  : \n" + resultString);
     assertEquals(true, Result.Status.ERROR.equals(cmdResult.getStatus()));
 
     filesToBeDeleted.add(diskDirName);
@@ -789,7 +792,7 @@ public class DiskStoreCommandsDUnitTest extends CliCommandTestBase {
 
     CommandResult cmdResult = executeCommand(commandString);
     String resultAsString = commandResultToString(cmdResult);
-    getLogWriter().info("Result from full backup : \n" + resultAsString);
+    LogWriterUtils.getLogWriter().info("Result from full backup : \n" + resultAsString);
     assertEquals(Result.Status.OK, cmdResult.getStatus());
     assertEquals(true, resultAsString.contains("Manager"));
     assertEquals(true, resultAsString.contains(vm1Name));
@@ -819,7 +822,7 @@ public class DiskStoreCommandsDUnitTest extends CliCommandTestBase {
 
     cmdResult = executeCommand(csb.toString());
     resultAsString = commandResultToString(cmdResult);
-    getLogWriter().info("Result from incremental backup : \n" + resultAsString);
+    LogWriterUtils.getLogWriter().info("Result from incremental backup : \n" + resultAsString);
     assertEquals(Result.Status.OK, cmdResult.getStatus());
 
     assertEquals(true, resultAsString.contains("Manager"));
@@ -1141,15 +1144,14 @@ public class DiskStoreCommandsDUnitTest extends CliCommandTestBase {
   }
 
   @Override
-  public void tearDown2() throws Exception {
+  protected final void preTearDownCliCommandTestBase() throws Exception {
     for (String path : this.filesToBeDeleted) {
       try {
         FileUtil.delete(new File(path));
       } catch (IOException e) {
-        getLogWriter().error("Unable to delete file", e);
+        LogWriterUtils.getLogWriter().error("Unable to delete file", e);
       }
     }
     this.filesToBeDeleted.clear();
-    super.tearDown2();
   }
 }


Mime
View raw message