geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kl...@apache.org
Subject [19/44] incubator-geode git commit: Refactor dunit
Date Tue, 02 Feb 2016 20:21:26 GMT
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/76e324b5/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/RedundancyLevelTestBase.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/RedundancyLevelTestBase.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/RedundancyLevelTestBase.java
index 6caa6a3..0fccd75 100755
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/RedundancyLevelTestBase.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/RedundancyLevelTestBase.java
@@ -44,7 +44,10 @@ import com.gemstone.gemfire.test.dunit.Assert;
 import com.gemstone.gemfire.test.dunit.DistributedTestCase;
 import com.gemstone.gemfire.test.dunit.Host;
 import com.gemstone.gemfire.test.dunit.IgnoredException;
+import com.gemstone.gemfire.test.dunit.NetworkSupport;
 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.internal.cache.CacheServerImpl;
 
 /**
@@ -109,7 +112,7 @@ public class RedundancyLevelTestBase extends DistributedTestCase
     server2 = host.getVM(2);
     server3 = host.getVM(3);
 
-    IgnoredException.addExpectedException("java.net.SocketException||java.net.ConnectException");
+    IgnoredException.addIgnoredException("java.net.SocketException||java.net.ConnectException");
 
     // start servers first
     PORT1 = ((Integer)server0.invoke(RedundancyLevelTestBase.class,
@@ -121,7 +124,7 @@ public class RedundancyLevelTestBase extends DistributedTestCase
     PORT4 = ((Integer)server3.invoke(RedundancyLevelTestBase.class,
         "createServerCache")).intValue();
 
-    String hostName = getServerHostName(Host.getHost(0));
+    String hostName = NetworkSupport.getServerHostName(Host.getHost(0));
     SERVER1 = hostName + PORT1;
     SERVER2 = hostName + PORT2;
     SERVER3 = hostName + PORT3;
@@ -171,7 +174,7 @@ public class RedundancyLevelTestBase extends DistributedTestCase
           return excuse;
         }
       };
-      DistributedTestCase.waitForCriterion(wc, 3 * 60 * 1000, 1000, true);
+      Wait.waitForCriterion(wc, 3 * 60 * 1000, 1000, true);
 
       CacheServerImpl bs = (CacheServerImpl)cache.getCacheServers()
           .iterator().next();
@@ -188,7 +191,7 @@ public class RedundancyLevelTestBase extends DistributedTestCase
           return excuse;
         }
       };
-      DistributedTestCase.waitForCriterion(wc, 60 * 1000, 1000, true);
+      Wait.waitForCriterion(wc, 60 * 1000, 1000, true);
 
 
       Iterator iter_prox = ccn.getClientProxies().iterator();
@@ -206,7 +209,7 @@ public class RedundancyLevelTestBase extends DistributedTestCase
             return excuse;
           }
         };
-        DistributedTestCase.waitForCriterion(wc, 60 * 1000, 1000, true);
+        Wait.waitForCriterion(wc, 60 * 1000, 1000, true);
         // assertTrue("Dispatcher on primary should be alive",   proxy._messageDispatcher.isAlive());
       }
 
@@ -230,7 +233,7 @@ public class RedundancyLevelTestBase extends DistributedTestCase
           return excuse;
         }
       };
-      DistributedTestCase.waitForCriterion(wc, 3 * 60 * 1000, 1000, true);
+      Wait.waitForCriterion(wc, 3 * 60 * 1000, 1000, true);
 
       CacheServerImpl bs = (CacheServerImpl)cache.getCacheServers()
           .iterator().next();
@@ -247,7 +250,7 @@ public class RedundancyLevelTestBase extends DistributedTestCase
           return excuse;
         }
       };
-      DistributedTestCase.waitForCriterion(wc, 3 * 60 * 1000, 1000, true);
+      Wait.waitForCriterion(wc, 3 * 60 * 1000, 1000, true);
 
       Iterator iter_prox = ccn.getClientProxies().iterator();
       if (iter_prox.hasNext()) {
@@ -273,7 +276,7 @@ public class RedundancyLevelTestBase extends DistributedTestCase
         + pool.getRedundantNames() + ") does not contain " + server;
       }
     };
-    DistributedTestCase.waitForCriterion(wc, 60 * 1000, 2000, true);
+    Wait.waitForCriterion(wc, 60 * 1000, 2000, true);
   }
 
   public static void verifyLiveAndRedundantServers(final int liveServers,
@@ -291,7 +294,7 @@ public class RedundancyLevelTestBase extends DistributedTestCase
             + ") to become " + redundantServers;
       }
     };
-    DistributedTestCase.waitForCriterion(wc, 120 * 1000, 2 * 1000, true);
+    Wait.waitForCriterion(wc, 120 * 1000, 2 * 1000, true);
   }
   
   public static void verifyDeadServers(int deadServers )
@@ -384,7 +387,7 @@ public class RedundancyLevelTestBase extends DistributedTestCase
           return excuse;
         }
       };
-      DistributedTestCase.waitForCriterion(wc, 3 * 60 * 1000, 1000, true);
+      Wait.waitForCriterion(wc, 3 * 60 * 1000, 1000, true);
       
       CacheServerImpl bs = (CacheServerImpl)cache.getCacheServers()
           .iterator().next();
@@ -403,7 +406,7 @@ public class RedundancyLevelTestBase extends DistributedTestCase
           return excuse;
         }
       };
-      DistributedTestCase.waitForCriterion(wc, 3 * 60 * 1000, 1000, true);
+      Wait.waitForCriterion(wc, 3 * 60 * 1000, 1000, true);
     }
     catch (Exception ex) {
       Assert.fail("exception in verifyCCP()", ex);
@@ -422,7 +425,7 @@ public class RedundancyLevelTestBase extends DistributedTestCase
               + cache.getCacheServers().size() + ") never became 1";
         }
       };
-      DistributedTestCase.waitForCriterion(wc, 180 * 1000, 2000, true);
+      Wait.waitForCriterion(wc, 180 * 1000, 2000, true);
 
       CacheServerImpl bs = (CacheServerImpl)cache.getCacheServers()
           .iterator().next();
@@ -438,7 +441,7 @@ public class RedundancyLevelTestBase extends DistributedTestCase
           return "Notifier's proxies is empty";
         }
       };
-      DistributedTestCase.waitForCriterion(wc, 180 * 1000, 2000, true);
+      Wait.waitForCriterion(wc, 180 * 1000, 2000, true);
 
       Iterator iter_prox = ccn.getClientProxies().iterator();
 
@@ -464,7 +467,7 @@ public class RedundancyLevelTestBase extends DistributedTestCase
             return excuse;
           }
         };
-        DistributedTestCase.waitForCriterion(wc, 180 * 1000, 2 * 1000, true);
+        Wait.waitForCriterion(wc, 180 * 1000, 2 * 1000, true);
         
         Set keysMap = ccp.cils[RegisterInterestTracker.interestListIndex]
           .getProfile(Region.SEPARATOR + REGION_NAME)

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/76e324b5/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/RegionCloseDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/RegionCloseDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/RegionCloseDUnitTest.java
index 9debcd9..01114c3 100755
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/RegionCloseDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/RegionCloseDUnitTest.java
@@ -35,7 +35,10 @@ import com.gemstone.gemfire.internal.cache.tier.sockets.CacheClientProxy;
 import com.gemstone.gemfire.test.dunit.Assert;
 import com.gemstone.gemfire.test.dunit.DistributedTestCase;
 import com.gemstone.gemfire.test.dunit.Host;
+import com.gemstone.gemfire.test.dunit.NetworkSupport;
 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.cache.client.*;
 
 /**
@@ -76,7 +79,7 @@ public class RegionCloseDUnitTest extends DistributedTestCase
 
     PORT1 =  ((Integer)server1.invoke(RegionCloseDUnitTest.class, "createServerCache" )).intValue();
     client1.invoke(RegionCloseDUnitTest.class, "createClientCache", new Object[] {
-      getServerHostName(host), new Integer(PORT1)});
+      NetworkSupport.getServerHostName(host), new Integer(PORT1)});
 
   }
 
@@ -158,7 +161,7 @@ public class RegionCloseDUnitTest extends DistributedTestCase
         return null;
       }
     };
-    DistributedTestCase.waitForCriterion(ev, 15 * 1000, 200, true);
+    Wait.waitForCriterion(ev, 15 * 1000, 200, true);
     assertEquals(1, bs.getAcceptor().getCacheClientNotifier().getClientProxies().size());
 
     Iterator iter = bs.getAcceptor().getCacheClientNotifier().getClientProxies().iterator();
@@ -197,7 +200,7 @@ public class RegionCloseDUnitTest extends DistributedTestCase
         return null;
       }
     };
-    DistributedTestCase.waitForCriterion(ev, 40 * 1000, 200, true);
+    Wait.waitForCriterion(ev, 40 * 1000, 200, true);
 
     final CacheServerImpl bs = (CacheServerImpl)c.getCacheServers().iterator()
         .next();
@@ -209,7 +212,7 @@ public class RegionCloseDUnitTest extends DistributedTestCase
         return null;
       }
     };
-    DistributedTestCase.waitForCriterion(ev, 40 * 1000, 200, true);
+    Wait.waitForCriterion(ev, 40 * 1000, 200, true);
     
     ev = new WaitCriterion() {
       public boolean done() {
@@ -219,7 +222,7 @@ public class RegionCloseDUnitTest extends DistributedTestCase
         return null;
       }
     };
-    DistributedTestCase.waitForCriterion(ev, 40 * 1000, 200, true);
+    Wait.waitForCriterion(ev, 40 * 1000, 200, true);
     // assertNull(c.getRegion("/"+clientMembershipId));
     assertEquals(0, bs.getAcceptor().getCacheClientNotifier()
         .getClientProxies().size());

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/76e324b5/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/RegisterInterestBeforeRegionCreationDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/RegisterInterestBeforeRegionCreationDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/RegisterInterestBeforeRegionCreationDUnitTest.java
index 6d71b43..c43ba1c 100755
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/RegisterInterestBeforeRegionCreationDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/RegisterInterestBeforeRegionCreationDUnitTest.java
@@ -33,7 +33,10 @@ import com.gemstone.gemfire.internal.AvailablePort;
 import com.gemstone.gemfire.internal.cache.CacheServerImpl;
 import com.gemstone.gemfire.test.dunit.DistributedTestCase;
 import com.gemstone.gemfire.test.dunit.Host;
+import com.gemstone.gemfire.test.dunit.NetworkSupport;
 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.internal.cache.CacheObserverAdapter;
 import com.gemstone.gemfire.internal.cache.CacheObserverHolder;
 import com.gemstone.gemfire.cache.client.*;
@@ -168,7 +171,7 @@ public class RegisterInterestBeforeRegionCreationDUnitTest extends DistributedTe
             return null;
           }
         };
-        DistributedTestCase.waitForCriterion(ev, 5 * 1000, 200, true);
+        Wait.waitForCriterion(ev, 5 * 1000, 200, true);
       }
     };
     return putFromServer;
@@ -204,11 +207,11 @@ public class RegisterInterestBeforeRegionCreationDUnitTest extends DistributedTe
     
     //client1 connected to server1
     client1.invoke(RegisterInterestBeforeRegionCreationDUnitTest.class, "createClient",
-        new Object[] { getServerHostName(server1.getHost()), new Integer(PORT1) });
+        new Object[] { NetworkSupport.getServerHostName(server1.getHost()), new Integer(PORT1) });
     
     //client2 connected to server2
     client2.invoke(RegisterInterestBeforeRegionCreationDUnitTest.class, "createClient",
-        new Object[] { getServerHostName(server1.getHost()), new Integer(PORT2) });
+        new Object[] { NetworkSupport.getServerHostName(server1.getHost()), new Integer(PORT2) });
   }
 
   public static Integer createServer(Boolean createRegion) throws Exception

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/76e324b5/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/RegisterInterestKeysDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/RegisterInterestKeysDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/RegisterInterestKeysDUnitTest.java
index 6c874e2..5189806 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/RegisterInterestKeysDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/RegisterInterestKeysDUnitTest.java
@@ -26,7 +26,10 @@ import com.gemstone.gemfire.internal.AvailablePort;
 import com.gemstone.gemfire.test.dunit.Assert;
 import com.gemstone.gemfire.test.dunit.DistributedTestCase;
 import com.gemstone.gemfire.test.dunit.Host;
+import com.gemstone.gemfire.test.dunit.LogWriterSupport;
+import com.gemstone.gemfire.test.dunit.NetworkSupport;
 import com.gemstone.gemfire.test.dunit.VM;
+import com.gemstone.gemfire.test.dunit.Wait;
 import com.gemstone.gemfire.cache.client.*;
 
 /**
@@ -66,7 +69,7 @@ public class RegisterInterestKeysDUnitTest extends DistributedTestCase
   public void setUp() throws Exception {
     super.setUp();
     disconnectAllFromDS();
-    pause(5000);
+    Wait.pause(5000);
 
     final Host host = Host.getHost(0);
     //Server1 VM
@@ -86,15 +89,15 @@ public class RegisterInterestKeysDUnitTest extends DistributedTestCase
       host.getVM(i).invoke(getClass(), "createImpl", null);
     }
 
-    getLogWriter().info("implementation class is " + impl.getClass());
+    LogWriterSupport.getLogWriter().info("implementation class is " + impl.getClass());
 
     PORT1 =  ((Integer)server1.invoke(impl.getClass(), "createServerCache" )).intValue();
     PORT2 =  ((Integer)server2.invoke(impl.getClass(), "createServerCache" )).intValue();
     
     client1.invoke(impl.getClass(), "createClientCache", new Object[] { 
-      getServerHostName(server1.getHost()), new Integer(PORT1),new Integer(PORT2)});
+      NetworkSupport.getServerHostName(server1.getHost()), new Integer(PORT1),new Integer(PORT2)});
     client2.invoke(impl.getClass(), "createClientCache", new Object[] {
-      getServerHostName(server1.getHost()), new Integer(PORT1),new Integer(PORT2)});
+      NetworkSupport.getServerHostName(server1.getHost()), new Integer(PORT1),new Integer(PORT2)});
 
   }
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/76e324b5/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/ReliableMessagingDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/ReliableMessagingDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/ReliableMessagingDUnitTest.java
index 3985120..90b59a6 100755
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/ReliableMessagingDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/ReliableMessagingDUnitTest.java
@@ -44,7 +44,11 @@ import com.gemstone.gemfire.test.dunit.Assert;
 import com.gemstone.gemfire.test.dunit.DistributedTestCase;
 import com.gemstone.gemfire.test.dunit.Host;
 import com.gemstone.gemfire.test.dunit.IgnoredException;
+import com.gemstone.gemfire.test.dunit.LogWriterSupport;
+import com.gemstone.gemfire.test.dunit.NetworkSupport;
 import com.gemstone.gemfire.test.dunit.VM;
+import com.gemstone.gemfire.test.dunit.Wait;
+import com.gemstone.gemfire.test.dunit.WaitCriterion;
 
 /**
  * 
@@ -109,15 +113,15 @@ public class ReliableMessagingDUnitTest extends DistributedTestCase
    * QRM to other redundant servers.    
    */
   public void testPeriodicAckSendByClientPrimaryFailover() throws Exception {    
-    IgnoredException.addExpectedException("java.net.ConnectException");
+    IgnoredException.addIgnoredException("java.net.ConnectException");
     createEntries();
     setClientServerObserverForBeforeSendingClientAck();    
     server1.invoke(ReliableMessagingDUnitTest.class, "putOnServer");
-    getLogWriter().info("Entering waitForServerUpdate");
+    LogWriterSupport.getLogWriter().info("Entering waitForServerUpdate");
     waitForServerUpdate();    
-    getLogWriter().info("Entering waitForCallback");
+    LogWriterSupport.getLogWriter().info("Entering waitForCallback");
     waitForCallback();
-    getLogWriter().info("Entering waitForClientAck");
+    LogWriterSupport.getLogWriter().info("Entering waitForClientAck");
     waitForClientAck();
     server2.invoke(ReliableMessagingDUnitTest.class, "checkTidAndSeq");
   }
@@ -147,7 +151,7 @@ public class ReliableMessagingDUnitTest extends DistributedTestCase
           (System.currentTimeMillis() - start) < maxWaitTime);
       sleep(1000);
     }
-    getLogWriter().info("seo = " + seo);
+    LogWriterSupport.getLogWriter().info("seo = " + seo);
     assertTrue("Creation time " + creationTime + " supposed to be same as seo " 
         + seo.getCreationTime(), creationTime == seo.getCreationTime());
   }
@@ -165,7 +169,7 @@ public class ReliableMessagingDUnitTest extends DistributedTestCase
         return null;
       }
     };
-    DistributedTestCase.waitForCriterion(ev, 10 * 1000, 200, true);
+    Wait.waitForCriterion(ev, 10 * 1000, 200, true);
     Map.Entry entry;
     synchronized (map) {
       Iterator iter = map.entrySet().iterator();
@@ -176,7 +180,7 @@ public class ReliableMessagingDUnitTest extends DistributedTestCase
           .getValue();
       assertFalse(seo.getAckSend());
       creationTime = seo.getCreationTime();
-      getLogWriter().info("seo is " + seo.toString());
+      LogWriterSupport.getLogWriter().info("seo is " + seo.toString());
       assertTrue("Creation time not set", creationTime != 0);
       
       Object args[] =
@@ -295,13 +299,13 @@ public class ReliableMessagingDUnitTest extends DistributedTestCase
     origObserver = ClientServerObserverHolder.setInstance(new ClientServerObserverAdapter() {
       public void beforeSendingClientAck()
       {
-        getLogWriter().info("beforeSendingClientAck invoked");
+        LogWriterSupport.getLogWriter().info("beforeSendingClientAck invoked");
         setCreationTimeTidAndSeq();   
         server1.invoke(ReliableMessagingDUnitTest.class, "stopServer");
         checkServerCount(1,1);
         server2.invoke(ReliableMessagingDUnitTest.class, "checkEmptyDispatchedMsgs");        
         PoolImpl.BEFORE_SENDING_CLIENT_ACK_CALLBACK_FLAG = false;       
-        getLogWriter().info("end of beforeSendingClientAck");
+        LogWriterSupport.getLogWriter().info("end of beforeSendingClientAck");
             }
     });
   }
@@ -372,7 +376,7 @@ public class ReliableMessagingDUnitTest extends DistributedTestCase
     server.setPort(port);
     server.setNotifyBySubscription(true);
     server.start();
-    getLogWriter().info("Server started at PORT = " + port);
+    LogWriterSupport.getLogWriter().info("Server started at PORT = " + port);
 
     return new Integer(server.getPort());
   }
@@ -384,7 +388,7 @@ public class ReliableMessagingDUnitTest extends DistributedTestCase
     props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
     props.setProperty(DistributionConfig.LOCATORS_NAME, "");
     cache = test.createCache(props);
-    String host = getServerHostName(Host.getHost(0));
+    String host = NetworkSupport.getServerHostName(Host.getHost(0));
     PoolImpl p = (PoolImpl)PoolManager.createFactory()
       .addServer(host, PORT1)
       .addServer(host, PORT2)

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/76e324b5/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/UnregisterInterestDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/UnregisterInterestDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/UnregisterInterestDUnitTest.java
index 288b9a6..6a60fd9 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/UnregisterInterestDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/UnregisterInterestDUnitTest.java
@@ -39,8 +39,11 @@ import com.gemstone.gemfire.internal.cache.FilterProfile;
 import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
 import com.gemstone.gemfire.test.dunit.Assert;
 import com.gemstone.gemfire.test.dunit.DistributedTestCase;
+import com.gemstone.gemfire.test.dunit.DistributedTestSupport;
 import com.gemstone.gemfire.test.dunit.Host;
 import com.gemstone.gemfire.test.dunit.VM;
+import com.gemstone.gemfire.test.dunit.Wait;
+import com.gemstone.gemfire.test.dunit.WaitCriterion;
 
 /**
  * @author ashetkar
@@ -303,14 +306,14 @@ public class UnregisterInterestDUnitTest extends DistributedTestCase {
         return "Expected to receive " + inv + " invalidates but received " + pool.getInvalidateCount();
       }
     };
-    DistributedTestCase.waitForCriterion(wc, 10000, 100, true);
+    Wait.waitForCriterion(wc, 10000, 100, true);
   }
 
   public static Integer createCacheAndStartServer() throws Exception {
     DistributedSystem ds = new UnregisterInterestDUnitTest("UnregisterInterestDUnitTest").getSystem();
     ds.disconnect();
     Properties props = new Properties();
-    props.setProperty("locators", "localhost["+getDUnitLocatorPort()+"]");
+    props.setProperty("locators", "localhost["+DistributedTestSupport.getDUnitLocatorPort()+"]");
     CacheFactory cf = new CacheFactory(props);
     cache = cf.create();
     RegionFactory rf = ((GemFireCacheImpl)cache).createRegionFactory(RegionShortcut.REPLICATE);

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/76e324b5/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/UpdatePropagationDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/UpdatePropagationDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/UpdatePropagationDUnitTest.java
index f7ead8a..72d4a76 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/UpdatePropagationDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/UpdatePropagationDUnitTest.java
@@ -48,7 +48,10 @@ import com.gemstone.gemfire.test.dunit.Assert;
 import com.gemstone.gemfire.test.dunit.DistributedTestCase;
 import com.gemstone.gemfire.test.dunit.Host;
 import com.gemstone.gemfire.test.dunit.IgnoredException;
+import com.gemstone.gemfire.test.dunit.NetworkSupport;
 import com.gemstone.gemfire.test.dunit.VM;
+import com.gemstone.gemfire.test.dunit.Wait;
+import com.gemstone.gemfire.test.dunit.WaitCriterion;
 
 /**
  *
@@ -125,12 +128,12 @@ public class UpdatePropagationDUnitTest extends DistributedTestCase
     PORT2 =  ((Integer)server2.invoke(getClass(), "createServerCache" )).intValue();
 
     client1.invoke(getClass(), "createClientCache", new Object[] {
-      getServerHostName(server1.getHost()), new Integer(PORT1),new Integer(PORT2)});
+      NetworkSupport.getServerHostName(server1.getHost()), new Integer(PORT1),new Integer(PORT2)});
     client2.invoke(getClass(), "createClientCache", new Object[] {
-      getServerHostName(server1.getHost()), new Integer(PORT1),new Integer(PORT2)});
+      NetworkSupport.getServerHostName(server1.getHost()), new Integer(PORT1),new Integer(PORT2)});
     
-    IgnoredException.addExpectedException("java.net.SocketException");
-    IgnoredException.addExpectedException("Unexpected IOException");
+    IgnoredException.addIgnoredException("java.net.SocketException");
+    IgnoredException.addIgnoredException("Unexpected IOException");
 
   }
   
@@ -193,7 +196,7 @@ public class UpdatePropagationDUnitTest extends DistributedTestCase
             return null;
           }
         };
-        DistributedTestCase.waitForCriterion(ev, maxWaitTime, 200, true);
+        Wait.waitForCriterion(ev, maxWaitTime, 200, true);
       }
     });
 
@@ -218,7 +221,7 @@ public class UpdatePropagationDUnitTest extends DistributedTestCase
             return null;
           }
         };
-        DistributedTestCase.waitForCriterion(ev, maxWaitTime, 200, true);
+        Wait.waitForCriterion(ev, maxWaitTime, 200, true);
       }
     });
 
@@ -246,7 +249,7 @@ public class UpdatePropagationDUnitTest extends DistributedTestCase
             return null;
           }
         };
-        DistributedTestCase.waitForCriterion(ev, maxWaitTime, 200, true);
+        Wait.waitForCriterion(ev, maxWaitTime, 200, true);
       }
     });
 
@@ -254,7 +257,7 @@ public class UpdatePropagationDUnitTest extends DistributedTestCase
     // Client1 should not receive updated value while client2 should receive
     client1.invoke(impl.getClass(),
         "acquireConnectionsAndPutonK1andK2",
-        new Object[] { getServerHostName(client1.getHost())});
+        new Object[] { NetworkSupport.getServerHostName(client1.getHost())});
     //pause(5000);
     //Check if both the puts ( on key1 & key2 ) have reached the servers
     server1.invoke(impl.getClass(), "verifyUpdates");
@@ -303,7 +306,7 @@ public class UpdatePropagationDUnitTest extends DistributedTestCase
             return null;
           }
         };
-        DistributedTestCase.waitForCriterion(ev, maxWaitTime, 200, true);
+        Wait.waitForCriterion(ev, maxWaitTime, 200, true);
       }
     });
     client2.invoke(new CacheSerializableRunnable("Wait for server on port1 to be dead") {
@@ -327,7 +330,7 @@ public class UpdatePropagationDUnitTest extends DistributedTestCase
             return null;
           }
         };
-        DistributedTestCase.waitForCriterion(ev, maxWaitTime, 200, true);
+        Wait.waitForCriterion(ev, maxWaitTime, 200, true);
       }
     });
 
@@ -350,7 +353,7 @@ public class UpdatePropagationDUnitTest extends DistributedTestCase
             return null;
           }
         };
-        DistributedTestCase.waitForCriterion(ev, maxWaitTime, 200, true);
+        Wait.waitForCriterion(ev, maxWaitTime, 200, true);
       }
     });
 
@@ -370,18 +373,18 @@ public class UpdatePropagationDUnitTest extends DistributedTestCase
             return null;
           }
         };
-        DistributedTestCase.waitForCriterion(ev, maxWaitTime, 200, true);
+        Wait.waitForCriterion(ev, maxWaitTime, 200, true);
       }
     });
     
-    pause(5000);
+    Wait.pause(5000);
 
     //Do a put on Server1 via Connection object from client1.
     // Client1 should not receive updated value while client2 should receive
     client1.invoke(impl.getClass(),
         "acquireConnectionsAndPutonK1andK2",
-        new Object[] { getServerHostName(client1.getHost())});
-    pause(5000);
+        new Object[] { NetworkSupport.getServerHostName(client1.getHost())});
+    Wait.pause(5000);
     //Check if both the puts ( on key1 & key2 ) have reached the servers
     server1.invoke(impl.getClass(), "verifyUpdates");
     server2.invoke(impl.getClass(), "verifyUpdates");

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/76e324b5/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/VerifyUpdatesFromNonInterestEndPointDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/VerifyUpdatesFromNonInterestEndPointDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/VerifyUpdatesFromNonInterestEndPointDUnitTest.java
index 14fcdf0..cef75dc 100755
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/VerifyUpdatesFromNonInterestEndPointDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/VerifyUpdatesFromNonInterestEndPointDUnitTest.java
@@ -36,7 +36,9 @@ import com.gemstone.gemfire.internal.cache.LocalRegion;
 import com.gemstone.gemfire.test.dunit.Assert;
 import com.gemstone.gemfire.test.dunit.DistributedTestCase;
 import com.gemstone.gemfire.test.dunit.Host;
+import com.gemstone.gemfire.test.dunit.NetworkSupport;
 import com.gemstone.gemfire.test.dunit.VM;
+import com.gemstone.gemfire.test.dunit.Wait;
 import com.gemstone.gemfire.cache.client.*;
 import com.gemstone.gemfire.cache.client.internal.PoolImpl;
 import com.gemstone.gemfire.cache.client.internal.Connection;
@@ -74,7 +76,7 @@ public class VerifyUpdatesFromNonInterestEndPointDUnitTest extends DistributedTe
   public void setUp() throws Exception {
     super.setUp();
     disconnectAllFromDS();
-    pause(5000);
+    Wait.pause(5000);
     final Host host = Host.getHost(0);
     vm0 = host.getVM(0);
     vm1 = host.getVM(1);
@@ -85,7 +87,7 @@ public class VerifyUpdatesFromNonInterestEndPointDUnitTest extends DistributedTe
     PORT2 =  ((Integer)vm1.invoke(VerifyUpdatesFromNonInterestEndPointDUnitTest.class, "createServerCache" )).intValue();
 
     vm2.invoke(VerifyUpdatesFromNonInterestEndPointDUnitTest.class, "createClientCache",
-        new Object[] { getServerHostName(vm0.getHost()), new Integer(PORT1),new Integer(PORT2)});
+        new Object[] { NetworkSupport.getServerHostName(vm0.getHost()), new Integer(PORT1),new Integer(PORT2)});
 
 
   }
@@ -111,7 +113,7 @@ public class VerifyUpdatesFromNonInterestEndPointDUnitTest extends DistributedTe
     vm2.invoke(VerifyUpdatesFromNonInterestEndPointDUnitTest.class, "registerKey");
 
     vm2.invoke(VerifyUpdatesFromNonInterestEndPointDUnitTest.class, "acquireConnectionsAndPut", new Object[] { new Integer(PORT2)});
-    pause(30000);
+    Wait.pause(30000);
     vm2.invoke(VerifyUpdatesFromNonInterestEndPointDUnitTest.class, "verifyPut");
   }
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/76e324b5/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/versions/RegionVersionVectorJUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/versions/RegionVersionVectorJUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/versions/RegionVersionVectorJUnitTest.java
index 0efea5a..c992012 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/versions/RegionVersionVectorJUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/versions/RegionVersionVectorJUnitTest.java
@@ -35,7 +35,7 @@ import com.gemstone.gemfire.internal.HeapDataOutputStream;
 import com.gemstone.gemfire.internal.InternalDataSerializer;
 import com.gemstone.gemfire.internal.Version;
 import com.gemstone.gemfire.internal.cache.persistence.DiskStoreID;
-import com.gemstone.gemfire.test.dunit.DistributedTestCase;
+import com.gemstone.gemfire.test.dunit.NetworkSupport;
 import com.gemstone.gemfire.test.junit.categories.UnitTest;
 
 @Category(UnitTest.class)
@@ -56,7 +56,7 @@ public class RegionVersionVectorJUnitTest extends TestCase {
   public void testRegionVersionVectors() throws Exception {
     // this is just a quick set of unit tests for basic RVV functionality
     
-    final String local = DistributedTestCase.getIPLiteral();
+    final String local = NetworkSupport.getIPLiteral();
     InternalDistributedMember server1 = new InternalDistributedMember(local, 101);
     InternalDistributedMember server2 = new InternalDistributedMember(local, 102);
     InternalDistributedMember server3 = new InternalDistributedMember(local, 103);

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/76e324b5/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/wan/AsyncEventQueueTestBase.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/wan/AsyncEventQueueTestBase.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/wan/AsyncEventQueueTestBase.java
index bb728f9..44b3c8c 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/wan/AsyncEventQueueTestBase.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/wan/AsyncEventQueueTestBase.java
@@ -78,8 +78,12 @@ import com.gemstone.gemfire.internal.cache.RegionQueue;
 import com.gemstone.gemfire.test.dunit.Assert;
 import com.gemstone.gemfire.test.dunit.DistributedTestCase;
 import com.gemstone.gemfire.test.dunit.IgnoredException;
+import com.gemstone.gemfire.test.dunit.Invoke;
+import com.gemstone.gemfire.test.dunit.LogWriterSupport;
 import com.gemstone.gemfire.test.dunit.Host;
 import com.gemstone.gemfire.test.dunit.VM;
+import com.gemstone.gemfire.test.dunit.Wait;
+import com.gemstone.gemfire.test.dunit.WaitCriterion;
 
 public class AsyncEventQueueTestBase extends DistributedTestCase {
 
@@ -134,7 +138,7 @@ public class AsyncEventQueueTestBase extends DistributedTestCase {
     // this is done to vary the number of dispatchers for sender
     // during every test method run
     shuffleNumDispatcherThreads();
-    invokeInEveryVM(AsyncEventQueueTestBase.class,
+    Invoke.invokeInEveryVM(AsyncEventQueueTestBase.class,
         "setNumDispatcherThreadsForTheRun",
         new Object[] { dispatcherThreads.get(0) });
   }
@@ -182,7 +186,7 @@ public class AsyncEventQueueTestBase extends DistributedTestCase {
 
   public static void createReplicatedRegionWithAsyncEventQueue(
       String regionName, String asyncQueueIds, Boolean offHeap) {
-    IgnoredException exp1 = IgnoredException.addExpectedException(ForceReattemptException.class
+    IgnoredException exp1 = IgnoredException.addIgnoredException(ForceReattemptException.class
         .getName());
     try {
       AttributesFactory fact = new AttributesFactory();
@@ -225,7 +229,7 @@ public class AsyncEventQueueTestBase extends DistributedTestCase {
 
   public static void createReplicatedRegionWithSenderAndAsyncEventQueue(
       String regionName, String senderIds, String asyncChannelId, Boolean offHeap) {
-    IgnoredException exp = IgnoredException.addExpectedException(ForceReattemptException.class
+    IgnoredException exp = IgnoredException.addIgnoredException(ForceReattemptException.class
         .getName());
     try {
 
@@ -369,7 +373,7 @@ public class AsyncEventQueueTestBase extends DistributedTestCase {
       Integer batchSize, boolean isConflation, boolean isPersistent,
       String diskStoreName, boolean isDiskSynchronous, int nDispatchers) {
 
-    IgnoredException exp = IgnoredException.addExpectedException(ForceReattemptException.class
+    IgnoredException exp = IgnoredException.addIgnoredException(ForceReattemptException.class
         .getName());
 
     try {
@@ -445,7 +449,7 @@ public class AsyncEventQueueTestBase extends DistributedTestCase {
     else {
       persistentDirectory = new File(diskStoreName);
     }
-    getLogWriter().info("The ds is : " + persistentDirectory.getName());
+    LogWriterSupport.getLogWriter().info("The ds is : " + persistentDirectory.getName());
     persistentDirectory.mkdir();
     DiskStoreFactory dsf = cache.createDiskStoreFactory();
     File[] dirs1 = new File[] { persistentDirectory };
@@ -568,7 +572,7 @@ public class AsyncEventQueueTestBase extends DistributedTestCase {
       final Set<RegionQueue> queues = ((AbstractGatewaySender)sender)
           .getQueues();
 
-      waitForCriterion(new WaitCriterion() {
+      Wait.waitForCriterion(new WaitCriterion() {
 
         public String description() {
           return "Waiting for EventQueue size to be " + numQueueEntries;
@@ -592,9 +596,9 @@ public class AsyncEventQueueTestBase extends DistributedTestCase {
 
   public static void createPartitionedRegion(String regionName,
       String senderIds, Integer redundantCopies, Integer totalNumBuckets) {
-    IgnoredException exp = IgnoredException.addExpectedException(ForceReattemptException.class
+    IgnoredException exp = IgnoredException.addIgnoredException(ForceReattemptException.class
         .getName());
-    IgnoredException exp1 = IgnoredException.addExpectedException(PartitionOfflineException.class
+    IgnoredException exp1 = IgnoredException.addIgnoredException(PartitionOfflineException.class
         .getName());
     try {
       AttributesFactory fact = new AttributesFactory();
@@ -623,9 +627,9 @@ public class AsyncEventQueueTestBase extends DistributedTestCase {
 
   public static void createPartitionedRegionWithAsyncEventQueue(
       String regionName, String asyncEventQueueId, Boolean offHeap) {
-    IgnoredException exp = IgnoredException.addExpectedException(ForceReattemptException.class
+    IgnoredException exp = IgnoredException.addIgnoredException(ForceReattemptException.class
         .getName());
-    IgnoredException exp1 = IgnoredException.addExpectedException(PartitionOfflineException.class
+    IgnoredException exp1 = IgnoredException.addIgnoredException(PartitionOfflineException.class
         .getName());
     try {
       AttributesFactory fact = new AttributesFactory();
@@ -648,9 +652,9 @@ public class AsyncEventQueueTestBase extends DistributedTestCase {
       String regionName, String asyncEventQueueId, Integer totalNumBuckets,
       String colocatedWith) {
 
-    IgnoredException exp = IgnoredException.addExpectedException(ForceReattemptException.class
+    IgnoredException exp = IgnoredException.addIgnoredException(ForceReattemptException.class
         .getName());
-    IgnoredException exp1 = IgnoredException.addExpectedException(PartitionOfflineException.class
+    IgnoredException exp1 = IgnoredException.addIgnoredException(PartitionOfflineException.class
         .getName());
     try {
       AttributesFactory fact = new AttributesFactory();
@@ -689,7 +693,7 @@ public class AsyncEventQueueTestBase extends DistributedTestCase {
    */
   public static void createPRWithRedundantCopyWithAsyncEventQueue(
       String regionName, String asyncEventQueueId, Boolean offHeap) {
-    IgnoredException exp = IgnoredException.addExpectedException(ForceReattemptException.class
+    IgnoredException exp = IgnoredException.addIgnoredException(ForceReattemptException.class
         .getName());
 
     try {
@@ -875,7 +879,7 @@ public class AsyncEventQueueTestBase extends DistributedTestCase {
         return "Expected sender primary state to be true but is false";
       }
     };
-    DistributedTestCase.waitForCriterion(wc, 10000, 1000, true);
+    Wait.waitForCriterion(wc, 10000, 1000, true);
   }
 
   private static GatewaySender getGatewaySenderById(Set<GatewaySender> senders,
@@ -893,7 +897,7 @@ public class AsyncEventQueueTestBase extends DistributedTestCase {
       boolean isParallel, Integer maxMemory, Integer batchSize,
       boolean isConflation, boolean isPersistent, GatewayEventFilter filter,
       boolean isManulaStart) {
-    final IgnoredException exln = IgnoredException.addExpectedException("Could not connect");
+    final IgnoredException exln = IgnoredException.addIgnoredException("Could not connect");
     try {
       File persistentDirectory = new File(dsName + "_disk_"
           + System.currentTimeMillis() + "_" + VM.getCurrentVMNum());
@@ -968,7 +972,7 @@ public class AsyncEventQueueTestBase extends DistributedTestCase {
         return "Expected to wait for " + millisec + " millisec.";
       }
     };
-    DistributedTestCase.waitForCriterion(wc, millisec, 500, false);
+    Wait.waitForCriterion(wc, millisec, 500, false);
   }
 
   public static int createReceiver(int locPort) {
@@ -1018,12 +1022,12 @@ public class AsyncEventQueueTestBase extends DistributedTestCase {
     try {
       RebalanceResults simulateResults = null;
       if (!heapEviction) {
-        getLogWriter().info("Calling rebalance simulate");
+        LogWriterSupport.getLogWriter().info("Calling rebalance simulate");
         RebalanceOperation simulateOp = factory.simulate();
         simulateResults = simulateOp.getResults();
       }
 
-      getLogWriter().info("Starting rebalancing");
+      LogWriterSupport.getLogWriter().info("Starting rebalancing");
       RebalanceOperation rebalanceOp = factory.start();
       RebalanceResults rebalanceResults = rebalanceOp.getResults();
 
@@ -1034,9 +1038,9 @@ public class AsyncEventQueueTestBase extends DistributedTestCase {
   }
 
   public static void doPuts(String regionName, int numPuts) {
-    IgnoredException exp1 = IgnoredException.addExpectedException(InterruptedException.class
+    IgnoredException exp1 = IgnoredException.addIgnoredException(InterruptedException.class
         .getName());
-    IgnoredException exp2 = IgnoredException.addExpectedException(GatewaySenderException.class
+    IgnoredException exp2 = IgnoredException.addIgnoredException(GatewaySenderException.class
         .getName());
     try {
       Region r = cache.getRegion(Region.SEPARATOR + regionName);
@@ -1096,7 +1100,7 @@ public class AsyncEventQueueTestBase extends DistributedTestCase {
 
   public static void doNextPuts(String regionName, int start, int numPuts) {
     // waitForSitesToUpdate();
-    IgnoredException exp = IgnoredException.addExpectedException(CacheClosedException.class
+    IgnoredException exp = IgnoredException.addIgnoredException(CacheClosedException.class
         .getName());
     try {
       Region r = cache.getRegion(Region.SEPARATOR + regionName);
@@ -1111,9 +1115,9 @@ public class AsyncEventQueueTestBase extends DistributedTestCase {
   }
 
   public static void validateRegionSize(String regionName, final int regionSize) {
-    IgnoredException exp = IgnoredException.addExpectedException(ForceReattemptException.class
+    IgnoredException exp = IgnoredException.addIgnoredException(ForceReattemptException.class
         .getName());
-    IgnoredException exp1 = IgnoredException.addExpectedException(CacheClosedException.class
+    IgnoredException exp1 = IgnoredException.addIgnoredException(CacheClosedException.class
         .getName());
     try {
 
@@ -1133,7 +1137,7 @@ public class AsyncEventQueueTestBase extends DistributedTestCase {
               + " present region keyset " + r.keySet();
         }
       };
-      DistributedTestCase.waitForCriterion(wc, 240000, 500, true);
+      Wait.waitForCriterion(wc, 240000, 500, true);
     }
     finally {
       exp.remove();
@@ -1234,7 +1238,7 @@ public class AsyncEventQueueTestBase extends DistributedTestCase {
             + " but actual entries: " + eventsMap.size();
       }
     };
-    DistributedTestCase.waitForCriterion(wc, 60000, 500, true); // TODO:Yogs
+    Wait.waitForCriterion(wc, 60000, 500, true); // TODO:Yogs
   }
 
   public static void validateAsyncEventForOperationDetail(String asyncQueueId,
@@ -1265,7 +1269,7 @@ public class AsyncEventQueueTestBase extends DistributedTestCase {
             + " but actual entries: " + eventsMap.size();
       }
     };
-    DistributedTestCase.waitForCriterion(wc, 60000, 500, true); // TODO:Yogs
+    Wait.waitForCriterion(wc, 60000, 500, true); // TODO:Yogs
     Collection values = eventsMap.values();
     Iterator itr = values.iterator();
     while (itr.hasNext()) {
@@ -1304,7 +1308,7 @@ public class AsyncEventQueueTestBase extends DistributedTestCase {
             + " but actual entries: " + eventsMap.size();
       }
     };
-    DistributedTestCase.waitForCriterion(wc, 60000, 500, true); // TODO:Yogs
+    Wait.waitForCriterion(wc, 60000, 500, true); // TODO:Yogs
 
     Iterator<AsyncEvent> itr = eventsMap.values().iterator();
     while (itr.hasNext()) {
@@ -1352,7 +1356,7 @@ public class AsyncEventQueueTestBase extends DistributedTestCase {
               + size;
         }
       };
-      DistributedTestCase.waitForCriterion(wc, 60000, 500, true);
+      Wait.waitForCriterion(wc, 60000, 500, true);
 
     }
     else {
@@ -1379,7 +1383,7 @@ public class AsyncEventQueueTestBase extends DistributedTestCase {
               + size;
         }
       };
-      DistributedTestCase.waitForCriterion(wc, 60000, 500, true);
+      Wait.waitForCriterion(wc, 60000, 500, true);
     }
   }
 
@@ -1402,7 +1406,7 @@ public class AsyncEventQueueTestBase extends DistributedTestCase {
     for (int bucketId : bucketIds) {
       List<GatewaySenderEventImpl> eventsForBucket = bucketToEventsMap
           .get(bucketId);
-      getLogWriter().info(
+      LogWriterSupport.getLogWriter().info(
           "Events for bucket: " + bucketId + " is " + eventsForBucket);
       assertNotNull(eventsForBucket);
       for (int i = 0; i < batchSize; i++) {
@@ -1424,7 +1428,7 @@ public class AsyncEventQueueTestBase extends DistributedTestCase {
 
     final Map eventsMap = ((MyAsyncEventListener)theListener).getEventsMap();
     assertNotNull(eventsMap);
-    getLogWriter().info("The events map size is " + eventsMap.size());
+    LogWriterSupport.getLogWriter().info("The events map size is " + eventsMap.size());
     return eventsMap.size();
   }
 
@@ -1469,10 +1473,10 @@ public class AsyncEventQueueTestBase extends DistributedTestCase {
   }
 
   public static Boolean killSender(String senderId) {
-    final IgnoredException exln = IgnoredException.addExpectedException("Could not connect");
-    IgnoredException exp = IgnoredException.addExpectedException(CacheClosedException.class
+    final IgnoredException exln = IgnoredException.addIgnoredException("Could not connect");
+    IgnoredException exp = IgnoredException.addIgnoredException(CacheClosedException.class
         .getName());
-    IgnoredException exp1 = IgnoredException.addExpectedException(ForceReattemptException.class
+    IgnoredException exp1 = IgnoredException.addIgnoredException(ForceReattemptException.class
         .getName());
     try {
       Set<GatewaySender> senders = cache.getGatewaySenders();
@@ -1484,7 +1488,7 @@ public class AsyncEventQueueTestBase extends DistributedTestCase {
         }
       }
       if (sender.isPrimary()) {
-        getLogWriter().info("Gateway sender is killed by a test");
+        LogWriterSupport.getLogWriter().info("Gateway sender is killed by a test");
         cache.getDistributedSystem().disconnect();
         return Boolean.TRUE;
       }
@@ -1507,7 +1511,7 @@ public class AsyncEventQueueTestBase extends DistributedTestCase {
       }
     }
     if (queue.isPrimary()) {
-      getLogWriter().info("AsyncEventQueue is killed by a test");
+      LogWriterSupport.getLogWriter().info("AsyncEventQueue is killed by a test");
       cache.getDistributedSystem().disconnect();
       return Boolean.TRUE;
     }
@@ -1515,10 +1519,10 @@ public class AsyncEventQueueTestBase extends DistributedTestCase {
   }
 
   public static void killSender() {
-    getLogWriter().info("Gateway sender is going to be killed by a test");
+    LogWriterSupport.getLogWriter().info("Gateway sender is going to be killed by a test");
     cache.close();
     cache.getDistributedSystem().disconnect();
-    getLogWriter().info("Gateway sender is killed by a test");
+    LogWriterSupport.getLogWriter().info("Gateway sender is killed by a test");
   }
 
   public static class MyLocatorCallback extends LocatorDiscoveryCallbackAdapter {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/76e324b5/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/wan/asyncqueue/AsyncEventListenerDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/wan/asyncqueue/AsyncEventListenerDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/wan/asyncqueue/AsyncEventListenerDUnitTest.java
index e696248..72db679 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/wan/asyncqueue/AsyncEventListenerDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/wan/asyncqueue/AsyncEventListenerDUnitTest.java
@@ -32,6 +32,8 @@ import com.gemstone.gemfire.distributed.internal.DistributionConfig;
 import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
 import com.gemstone.gemfire.internal.AvailablePortHelper;
 import com.gemstone.gemfire.internal.cache.wan.AsyncEventQueueTestBase;
+import com.gemstone.gemfire.test.dunit.LogWriterSupport;
+import com.gemstone.gemfire.test.dunit.Wait;
 
 public class AsyncEventListenerDUnitTest extends AsyncEventQueueTestBase {
 
@@ -120,7 +122,7 @@ public class AsyncEventListenerDUnitTest extends AsyncEventQueueTestBase {
     vm7
         .invoke(AsyncEventQueueTestBase.class, "pauseAsyncEventQueue",
             new Object[] { "ln" });
-    pause(1000);// pause at least for the batchTimeInterval
+    Wait.pause(1000);// pause at least for the batchTimeInterval
 
     vm4.invoke(AsyncEventQueueTestBase.class, "doPuts", new Object[] { testName + "_RR",
         1000 });
@@ -167,7 +169,7 @@ public class AsyncEventListenerDUnitTest extends AsyncEventQueueTestBase {
 	  .invoke(AsyncEventQueueTestBase.class, "pauseAsyncEventQueue",
 		new Object[] { "ln" });
 
-	pause(1000);// pause at least for the batchTimeInterval
+	Wait.pause(1000);// pause at least for the batchTimeInterval
 
 	vm4.invoke(AsyncEventQueueTestBase.class, "doPuts", new Object[] { testName + "_RR",
 		1000 });
@@ -322,7 +324,7 @@ public class AsyncEventListenerDUnitTest extends AsyncEventQueueTestBase {
     vm7
         .invoke(AsyncEventQueueTestBase.class, "pauseAsyncEventQueue",
             new Object[] { "ln" });
-    pause(2000);// pause at least for the batchTimeInterval
+    Wait.pause(2000);// pause at least for the batchTimeInterval
 
     vm4.invoke(AsyncEventQueueTestBase.class, "doPuts", new Object[] { testName + "_RR",
         100 });
@@ -391,7 +393,7 @@ public class AsyncEventListenerDUnitTest extends AsyncEventQueueTestBase {
     vm7
         .invoke(AsyncEventQueueTestBase.class, "pauseAsyncEventQueue",
             new Object[] { "ln" });
-    pause(1000);// pause at least for the batchTimeInterval
+    Wait.pause(1000);// pause at least for the batchTimeInterval
 
     final Map keyValues = new HashMap();
     final Map updateKeyValues = new HashMap();
@@ -402,7 +404,7 @@ public class AsyncEventListenerDUnitTest extends AsyncEventQueueTestBase {
     vm4.invoke(AsyncEventQueueTestBase.class, "putGivenKeyValue", new Object[] {
         testName + "_RR", keyValues });
 
-    pause(1000);
+    Wait.pause(1000);
     vm4.invoke(AsyncEventQueueTestBase.class, "checkAsyncEventQueueSize", new Object[] {
         "ln", keyValues.size() });
 
@@ -643,8 +645,8 @@ public class AsyncEventListenerDUnitTest extends AsyncEventQueueTestBase {
     int vm5size = (Integer)vm5.invoke(AsyncEventQueueTestBase.class,
         "getAsyncEventListenerMapSize", new Object[] { "ln" });
 
-    getLogWriter().info("vm4 size is: " + vm4size);
-    getLogWriter().info("vm5 size is: " + vm5size);
+    LogWriterSupport.getLogWriter().info("vm4 size is: " + vm4size);
+    LogWriterSupport.getLogWriter().info("vm5 size is: " + vm5size);
     // verify that there is no event loss
     assertTrue(
         "Total number of entries in events map on vm4 and vm5 should be at least 2000",
@@ -886,7 +888,7 @@ public class AsyncEventListenerDUnitTest extends AsyncEventQueueTestBase {
         .invoke(AsyncEventQueueTestBase.class, "pauseAsyncEventQueue",
             new Object[] { "ln" });
     
-    pause(2000);
+    Wait.pause(2000);
 
     final Map keyValues = new HashMap();
     final Map updateKeyValues = new HashMap();
@@ -1200,7 +1202,7 @@ public class AsyncEventListenerDUnitTest extends AsyncEventQueueTestBase {
     vm7
         .invoke(AsyncEventQueueTestBase.class, "pauseAsyncEventQueue",
             new Object[] { "ln" });
-    pause(1000);// pause at least for the batchTimeInterval
+    Wait.pause(1000);// pause at least for the batchTimeInterval
 
     vm4.invoke(AsyncEventQueueTestBase.class, "doPuts", new Object[] { testName + "_PR",
         1000 });
@@ -1257,7 +1259,7 @@ public class AsyncEventListenerDUnitTest extends AsyncEventQueueTestBase {
 	vm7
 	  .invoke(AsyncEventQueueTestBase.class, "pauseAsyncEventQueue",
 		new Object[] { "ln" });
-	pause(1000);// pause at least for the batchTimeInterval
+	Wait.pause(1000);// pause at least for the batchTimeInterval
 
 	vm4.invoke(AsyncEventQueueTestBase.class, "doPuts", new Object[] { testName + "_PR",
 	  1000 });
@@ -1311,7 +1313,7 @@ public class AsyncEventListenerDUnitTest extends AsyncEventQueueTestBase {
         .invoke(AsyncEventQueueTestBase.class, "pauseAsyncEventQueue",
             new Object[] { "ln" });
 
-    pause(2000);// pause for the batchTimeInterval to ensure that all the
+    Wait.pause(2000);// pause for the batchTimeInterval to ensure that all the
     // senders are paused
 
     final Map keyValues = new HashMap();
@@ -1416,7 +1418,7 @@ public class AsyncEventListenerDUnitTest extends AsyncEventQueueTestBase {
         .invoke(AsyncEventQueueTestBase.class, "pauseAsyncEventQueue",
             new Object[] { "ln" });
 
-    pause(2000);// pause for the batchTimeInterval to ensure that all the
+    Wait.pause(2000);// pause for the batchTimeInterval to ensure that all the
     // senders are paused
 
     final Map keyValues = new HashMap();
@@ -1428,7 +1430,7 @@ public class AsyncEventListenerDUnitTest extends AsyncEventQueueTestBase {
     vm4.invoke(AsyncEventQueueTestBase.class, "putGivenKeyValue", new Object[] {
         testName + "_PR", keyValues });
 
-    pause(2000);
+    Wait.pause(2000);
     vm4.invoke(AsyncEventQueueTestBase.class, "checkAsyncEventQueueSize", new Object[] {
         "ln", keyValues.size() });
 
@@ -1443,7 +1445,7 @@ public class AsyncEventListenerDUnitTest extends AsyncEventQueueTestBase {
         testName + "_PR", updateKeyValues });
 
     // pause to ensure that events have been conflated.
-    pause(2000);
+    Wait.pause(2000);
     vm4.invoke(AsyncEventQueueTestBase.class, "checkAsyncEventQueueSize", new Object[] {
         "ln", keyValues.size() + updateKeyValues.size() });
 
@@ -1660,14 +1662,14 @@ public class AsyncEventListenerDUnitTest extends AsyncEventQueueTestBase {
     vm4.invoke(AsyncEventQueueTestBase.class, "createCache", new Object[] { lnPort });
     vm5.invoke(AsyncEventQueueTestBase.class, "createCache", new Object[] { lnPort });
 
-    getLogWriter().info("Created the cache");
+    LogWriterSupport.getLogWriter().info("Created the cache");
 
     vm4.invoke(AsyncEventQueueTestBase.class, "createAsyncEventQueueWithListener2",
         new Object[] { "ln", true, 100, 5, false, null });
     vm5.invoke(AsyncEventQueueTestBase.class, "createAsyncEventQueueWithListener2",
         new Object[] { "ln", true, 100, 5, false, null });
 
-    getLogWriter().info("Created the AsyncEventQueue");
+    LogWriterSupport.getLogWriter().info("Created the AsyncEventQueue");
 
     vm4.invoke(AsyncEventQueueTestBase.class,
         "createPRWithRedundantCopyWithAsyncEventQueue", new Object[] {
@@ -1676,7 +1678,7 @@ public class AsyncEventListenerDUnitTest extends AsyncEventQueueTestBase {
         "createPRWithRedundantCopyWithAsyncEventQueue", new Object[] {
             testName + "_PR", "ln", isOffHeap() });
 
-    getLogWriter().info("Created PR with AsyncEventQueue");
+    LogWriterSupport.getLogWriter().info("Created PR with AsyncEventQueue");
 
     vm4
         .invoke(AsyncEventQueueTestBase.class, "pauseAsyncEventQueue",
@@ -1684,25 +1686,25 @@ public class AsyncEventListenerDUnitTest extends AsyncEventQueueTestBase {
     vm5
         .invoke(AsyncEventQueueTestBase.class, "pauseAsyncEventQueue",
             new Object[] { "ln" });
-    pause(1000);// pause for the batchTimeInterval to make sure the AsyncQueue
+    Wait.pause(1000);// pause for the batchTimeInterval to make sure the AsyncQueue
                 // is paused
 
-    getLogWriter().info("Paused the AsyncEventQueue");
+    LogWriterSupport.getLogWriter().info("Paused the AsyncEventQueue");
 
     vm4.invoke(AsyncEventQueueTestBase.class, "doPuts",
         new Object[] { testName + "_PR", 80 });
 
-    getLogWriter().info("Done puts");
+    LogWriterSupport.getLogWriter().info("Done puts");
 
     Set<Integer> primaryBucketsVm5 = (Set<Integer>)vm5.invoke(
         AsyncEventQueueTestBase.class, "getAllPrimaryBucketsOnTheNode",
         new Object[] { testName + "_PR" });
 
-    getLogWriter().info("Primary buckets on vm5: " + primaryBucketsVm5);
+    LogWriterSupport.getLogWriter().info("Primary buckets on vm5: " + primaryBucketsVm5);
     // ---------------------------- Kill vm5 --------------------------
     vm5.invoke(AsyncEventQueueTestBase.class, "killSender", new Object[] {});
 
-    pause(1000);// give some time for rebalancing to happen
+    Wait.pause(1000);// give some time for rebalancing to happen
     vm4.invoke(AsyncEventQueueTestBase.class, "resumeAsyncEventQueue",
         new Object[] { "ln" });
 
@@ -1726,14 +1728,14 @@ public class AsyncEventListenerDUnitTest extends AsyncEventQueueTestBase {
     vm4.invoke(AsyncEventQueueTestBase.class, "createCache", new Object[] { lnPort });
     vm5.invoke(AsyncEventQueueTestBase.class, "createCache", new Object[] { lnPort });
 
-    getLogWriter().info("Created the cache");
+    LogWriterSupport.getLogWriter().info("Created the cache");
 
     vm4.invoke(AsyncEventQueueTestBase.class, "createAsyncEventQueueWithListener2",
         new Object[] { "ln", true, 100, 5, false, null });
     vm5.invoke(AsyncEventQueueTestBase.class, "createAsyncEventQueueWithListener2",
         new Object[] { "ln", true, 100, 5, false, null });
 
-    getLogWriter().info("Created the AsyncEventQueue");
+    LogWriterSupport.getLogWriter().info("Created the AsyncEventQueue");
 
     vm4.invoke(AsyncEventQueueTestBase.class,
         "createPRWithRedundantCopyWithAsyncEventQueue", new Object[] {
@@ -1742,7 +1744,7 @@ public class AsyncEventListenerDUnitTest extends AsyncEventQueueTestBase {
         "createPRWithRedundantCopyWithAsyncEventQueue", new Object[] {
             testName + "_PR", "ln", isOffHeap() });
 
-    getLogWriter().info("Created PR with AsyncEventQueue");
+    LogWriterSupport.getLogWriter().info("Created PR with AsyncEventQueue");
 
     vm4
         .invoke(AsyncEventQueueTestBase.class, "pauseAsyncEventQueue",
@@ -1750,21 +1752,21 @@ public class AsyncEventListenerDUnitTest extends AsyncEventQueueTestBase {
     vm5
         .invoke(AsyncEventQueueTestBase.class, "pauseAsyncEventQueue",
             new Object[] { "ln" });
-    pause(1000);// pause for the batchTimeInterval to make sure the AsyncQueue
+    Wait.pause(1000);// pause for the batchTimeInterval to make sure the AsyncQueue
                 // is paused
 
-    getLogWriter().info("Paused the AsyncEventQueue");
+    LogWriterSupport.getLogWriter().info("Paused the AsyncEventQueue");
 
     vm4.invoke(AsyncEventQueueTestBase.class, "doPuts",
         new Object[] { testName + "_PR", 80 });
 
-    getLogWriter().info("Done puts");
+    LogWriterSupport.getLogWriter().info("Done puts");
 
     Set<Integer> primaryBucketsVm5 = (Set<Integer>)vm5.invoke(
         AsyncEventQueueTestBase.class, "getAllPrimaryBucketsOnTheNode",
         new Object[] { testName + "_PR" });
 
-    getLogWriter().info("Primary buckets on vm5: " + primaryBucketsVm5);
+    LogWriterSupport.getLogWriter().info("Primary buckets on vm5: " + primaryBucketsVm5);
     // ---------------------------- Kill vm5 --------------------------
     vm5.invoke(AsyncEventQueueTestBase.class, "killSender", new Object[] {});
     // ----------------------------------------------------------------
@@ -1779,7 +1781,7 @@ public class AsyncEventListenerDUnitTest extends AsyncEventQueueTestBase {
 
     // ------------------------------------------------------------------
 
-    pause(1000);// give some time for rebalancing to happen
+    Wait.pause(1000);// give some time for rebalancing to happen
     Set<Integer> primaryBucketsVm6 = (Set<Integer>)vm6.invoke(
         AsyncEventQueueTestBase.class, "getAllPrimaryBucketsOnTheNode",
         new Object[] { testName + "_PR" });
@@ -1810,14 +1812,14 @@ public class AsyncEventListenerDUnitTest extends AsyncEventQueueTestBase {
     vm4.invoke(AsyncEventQueueTestBase.class, "createCache", new Object[] { lnPort });
     vm5.invoke(AsyncEventQueueTestBase.class, "createCache", new Object[] { lnPort });
 
-    getLogWriter().info("Created the cache");
+    LogWriterSupport.getLogWriter().info("Created the cache");
 
     vm4.invoke(AsyncEventQueueTestBase.class, "createAsyncEventQueueWithListener2",
         new Object[] { "ln", true, 100, 5, false, null });
     vm5.invoke(AsyncEventQueueTestBase.class, "createAsyncEventQueueWithListener2",
         new Object[] { "ln", true, 100, 5, false, null });
 
-    getLogWriter().info("Created the AsyncEventQueue");
+    LogWriterSupport.getLogWriter().info("Created the AsyncEventQueue");
 
     vm4.invoke(AsyncEventQueueTestBase.class,
         "createPRWithRedundantCopyWithAsyncEventQueue", new Object[] {
@@ -1826,7 +1828,7 @@ public class AsyncEventListenerDUnitTest extends AsyncEventQueueTestBase {
         "createPRWithRedundantCopyWithAsyncEventQueue", new Object[] {
             testName + "_PR", "ln", isOffHeap() });
 
-    getLogWriter().info("Created PR with AsyncEventQueue");
+    LogWriterSupport.getLogWriter().info("Created PR with AsyncEventQueue");
 
     vm4
         .invoke(AsyncEventQueueTestBase.class, "pauseAsyncEventQueue",
@@ -1834,15 +1836,15 @@ public class AsyncEventListenerDUnitTest extends AsyncEventQueueTestBase {
     vm5
         .invoke(AsyncEventQueueTestBase.class, "pauseAsyncEventQueue",
             new Object[] { "ln" });
-    pause(1000);// pause for the batchTimeInterval to make sure the AsyncQueue
+    Wait.pause(1000);// pause for the batchTimeInterval to make sure the AsyncQueue
                 // is paused
 
-    getLogWriter().info("Paused the AsyncEventQueue");
+    LogWriterSupport.getLogWriter().info("Paused the AsyncEventQueue");
 
     vm4.invoke(AsyncEventQueueTestBase.class, "doPuts",
         new Object[] { testName + "_PR", 80 });
 
-    getLogWriter().info("Done puts");
+    LogWriterSupport.getLogWriter().info("Done puts");
 
     // ---------------------------- start vm6 --------------------------
     vm6.invoke(AsyncEventQueueTestBase.class, "createCache", new Object[] { lnPort });
@@ -1858,7 +1860,7 @@ public class AsyncEventListenerDUnitTest extends AsyncEventQueueTestBase {
     Set<Integer> primaryBucketsVm6 = (Set<Integer>)vm6.invoke(
         AsyncEventQueueTestBase.class, "getAllPrimaryBucketsOnTheNode",
         new Object[] { testName + "_PR" });
-    getLogWriter().info("Primary buckets on vm6: " + primaryBucketsVm6);
+    LogWriterSupport.getLogWriter().info("Primary buckets on vm6: " + primaryBucketsVm6);
     vm4.invoke(AsyncEventQueueTestBase.class, "resumeAsyncEventQueue",
         new Object[] { "ln" });
     vm5.invoke(AsyncEventQueueTestBase.class, "resumeAsyncEventQueue",

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/76e324b5/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/wan/asyncqueue/AsyncEventQueueStatsDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/wan/asyncqueue/AsyncEventQueueStatsDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/wan/asyncqueue/AsyncEventQueueStatsDUnitTest.java
index 9258c49..0dfdf18 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/wan/asyncqueue/AsyncEventQueueStatsDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/wan/asyncqueue/AsyncEventQueueStatsDUnitTest.java
@@ -21,6 +21,7 @@ import java.util.Map;
 
 import com.gemstone.gemfire.internal.cache.wan.AsyncEventQueueTestBase;
 import com.gemstone.gemfire.test.dunit.AsyncInvocation;
+import com.gemstone.gemfire.test.dunit.Wait;
 
 public class AsyncEventQueueStatsDUnitTest extends AsyncEventQueueTestBase {
 
@@ -69,7 +70,7 @@ public class AsyncEventQueueStatsDUnitTest extends AsyncEventQueueTestBase {
 
     vm4.invoke(AsyncEventQueueTestBase.class, "validateAsyncEventListener",
         new Object[] { "ln", 1000 });// primary sender
-    pause(2000);//give some time for system to become stable
+    Wait.pause(2000);//give some time for system to become stable
     
     vm4.invoke(AsyncEventQueueTestBase.class, "checkAsyncEventQueueStats", new Object[] {
         "ln", 0, 1000, 1000, 1000 });
@@ -126,7 +127,7 @@ public class AsyncEventQueueStatsDUnitTest extends AsyncEventQueueTestBase {
         new Object[] { "ln1", 1000 });
     vm4.invoke(AsyncEventQueueTestBase.class, "validateAsyncEventListener",
         new Object[] { "ln2", 1000 });
-    pause(2000);//give some time for system to become stable
+    Wait.pause(2000);//give some time for system to become stable
 
     vm4.invoke(AsyncEventQueueTestBase.class, "checkAsyncEventQueueStats", new Object[] {
         "ln1", 0, 1000, 1000, 1000 });
@@ -174,7 +175,7 @@ public class AsyncEventQueueStatsDUnitTest extends AsyncEventQueueTestBase {
     
     AsyncInvocation inv1 = vm5.invokeAsync(AsyncEventQueueTestBase.class, "doPuts",
         new Object[] { testName + "_RR", 10000 });
-    pause(2000);
+    Wait.pause(2000);
     AsyncInvocation inv2 = vm4.invokeAsync(AsyncEventQueueTestBase.class, "killAsyncEventQueue", new Object[] { "ln" });
     Boolean isKilled = Boolean.FALSE;
     try {
@@ -190,7 +191,7 @@ public class AsyncEventQueueStatsDUnitTest extends AsyncEventQueueTestBase {
     }
     inv1.join();
     inv2.join();
-    pause(2000);//give some time for system to become stable
+    Wait.pause(2000);//give some time for system to become stable
     vm5.invoke(AsyncEventQueueTestBase.class, "checkAsyncEventQueueStats_Failover", new Object[] {"ln", 10000});
   }
 
@@ -239,7 +240,7 @@ public class AsyncEventQueueStatsDUnitTest extends AsyncEventQueueTestBase {
     vm4.invoke(AsyncEventQueueTestBase.class, "validateAsyncEventListener",
         new Object[] { "ln", 1500 });
         
-    pause(2000);//give some time for system to become stable
+    Wait.pause(2000);//give some time for system to become stable
     vm4.invoke(AsyncEventQueueTestBase.class, "checkAsyncEventQueueStats", new Object[] {"ln",
       0, 1500, 1500, 1500});
     vm4.invoke(AsyncEventQueueTestBase.class, "checkAsyncEventQueueUnprocessedStats", new Object[] {"ln", 0});
@@ -278,7 +279,7 @@ public class AsyncEventQueueStatsDUnitTest extends AsyncEventQueueTestBase {
         .invoke(AsyncEventQueueTestBase.class, "pauseAsyncEventQueue",
             new Object[] { "ln" });
     //pause at least for the batchTimeInterval to make sure that the AsyncEventQueue is actually paused
-    pause(2000);
+    Wait.pause(2000);
 
     final Map keyValues = new HashMap();
     final Map updateKeyValues = new HashMap();
@@ -310,7 +311,7 @@ public class AsyncEventQueueStatsDUnitTest extends AsyncEventQueueTestBase {
     vm4.invoke(AsyncEventQueueTestBase.class, "validateAsyncEventListener",
         new Object[] { "ln", 1000 });
     
-    pause(2000);// give some time for system to become stable
+    Wait.pause(2000);// give some time for system to become stable
     vm4.invoke(AsyncEventQueueTestBase.class, "checkAsyncEventQueueStats", new Object[] {
         "ln", 0, 2000, 2000, 1000 });
     vm4.invoke(AsyncEventQueueTestBase.class, "checkAsyncEventQueueConflatedStats",

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/76e324b5/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/wan/misc/CommonParallelAsyncEventQueueDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/wan/misc/CommonParallelAsyncEventQueueDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/wan/misc/CommonParallelAsyncEventQueueDUnitTest.java
index 8960179..245f76d 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/wan/misc/CommonParallelAsyncEventQueueDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/wan/misc/CommonParallelAsyncEventQueueDUnitTest.java
@@ -37,7 +37,7 @@ public class CommonParallelAsyncEventQueueDUnitTest extends AsyncEventQueueTestB
   }
     
   public void testSameSenderWithNonColocatedRegions() throws Exception {
-    IgnoredException.addExpectedException("cannot have the same parallel async");
+    IgnoredException.addIgnoredException("cannot have the same parallel async");
     Integer lnPort = (Integer)vm0.invoke(AsyncEventQueueTestBase.class,
         "createFirstLocatorWithDSId", new Object[] { 1 });
     vm4.invoke(AsyncEventQueueTestBase.class, "createCache", new Object[] { lnPort });

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/76e324b5/gemfire-core/src/test/java/com/gemstone/gemfire/internal/compression/CompressionCacheConfigDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/compression/CompressionCacheConfigDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/compression/CompressionCacheConfigDUnitTest.java
index aadeb46..2d62127 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/compression/CompressionCacheConfigDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/compression/CompressionCacheConfigDUnitTest.java
@@ -27,6 +27,7 @@ import com.gemstone.gemfire.compression.Compressor;
 import com.gemstone.gemfire.compression.SnappyCompressor;
 import com.gemstone.gemfire.internal.cache.LocalRegion;
 import com.gemstone.gemfire.test.dunit.IgnoredException;
+import com.gemstone.gemfire.test.dunit.LogWriterSupport;
 import com.gemstone.gemfire.test.dunit.Host;
 import com.gemstone.gemfire.test.dunit.SerializableCallable;
 import com.gemstone.gemfire.test.dunit.SerializableRunnable;
@@ -96,9 +97,9 @@ public class CompressionCacheConfigDUnitTest extends CacheTestCase {
    * @throws Exception
    */
   public void testCreateCacheWithBadCompressor() throws Exception {
-    IgnoredException.addExpectedException("Unable to load class BAD_COMPRESSOR");
+    IgnoredException.addIgnoredException("Unable to load class BAD_COMPRESSOR");
     File cacheXml = createCacheXml(BAD_COMPRESSOR);
-    IgnoredException expectedException = IgnoredException.addExpectedException("While reading Cache XML file");
+    IgnoredException expectedException = IgnoredException.addIgnoredException("While reading Cache XML file");
     try {
       assertFalse(createCacheOnVM(getVM(0), cacheXml.getCanonicalPath()));
     } finally {
@@ -138,15 +139,15 @@ public class CompressionCacheConfigDUnitTest extends CacheTestCase {
           disconnectFromDS();
           Properties props = new Properties();
           props.setProperty("cache-xml-file",cacheXml);
-          getLogWriter().info("<ExpectedException action=add>ClassNotFoundException</ExpectedException>");
+          LogWriterSupport.getLogWriter().info("<ExpectedException action=add>ClassNotFoundException</ExpectedException>");
           getSystem(props);
           assertNotNull(getCache());
           return Boolean.TRUE;
         } catch(Exception e) {
-          getLogWriter().error("Could not create the cache", e);
+          LogWriterSupport.getLogWriter().error("Could not create the cache", e);
           return Boolean.FALSE;
         } finally {
-          getLogWriter().info("<ExpectedException action=remove>ClassNotFoundException</ExpectedException>");
+          LogWriterSupport.getLogWriter().info("<ExpectedException action=remove>ClassNotFoundException</ExpectedException>");
         }
       }      
     });

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/76e324b5/gemfire-core/src/test/java/com/gemstone/gemfire/internal/compression/CompressionCacheListenerOffHeapDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/compression/CompressionCacheListenerOffHeapDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/compression/CompressionCacheListenerOffHeapDUnitTest.java
index cf8583a..f3e4ef3 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/compression/CompressionCacheListenerOffHeapDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/compression/CompressionCacheListenerOffHeapDUnitTest.java
@@ -21,6 +21,7 @@ import java.util.Properties;
 import com.gemstone.gemfire.compression.SnappyCompressor;
 import com.gemstone.gemfire.distributed.internal.DistributionConfig;
 import com.gemstone.gemfire.internal.cache.OffHeapTestUtil;
+import com.gemstone.gemfire.test.dunit.Invoke;
 import com.gemstone.gemfire.test.dunit.SerializableRunnable;
 
 @SuppressWarnings("serial")
@@ -49,7 +50,7 @@ public class CompressionCacheListenerOffHeapDUnitTest extends
         }
       }
     };
-    invokeInEveryVM(checkOrphans);
+    Invoke.invokeInEveryVM(checkOrphans);
     try {
       checkOrphans.run();
     } finally {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/76e324b5/gemfire-core/src/test/java/com/gemstone/gemfire/internal/compression/CompressionRegionConfigDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/compression/CompressionRegionConfigDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/compression/CompressionRegionConfigDUnitTest.java
index 8061b3c..67fb4e4 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/compression/CompressionRegionConfigDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/compression/CompressionRegionConfigDUnitTest.java
@@ -27,11 +27,14 @@ import com.gemstone.gemfire.cache.server.CacheServer;
 import com.gemstone.gemfire.cache30.CacheTestCase;
 import com.gemstone.gemfire.compression.Compressor;
 import com.gemstone.gemfire.compression.SnappyCompressor;
-import com.gemstone.gemfire.test.dunit.DistributedTestCase;
+import com.gemstone.gemfire.test.dunit.DistributedTestSupport;
 import com.gemstone.gemfire.test.dunit.Host;
+import com.gemstone.gemfire.test.dunit.LogWriterSupport;
 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.standalone.DUnitLauncher;
 
 /**
@@ -236,7 +239,7 @@ public class CompressionRegionConfigDUnitTest extends CacheTestCase {
    * @param key the key to wait on.
    */
   private void waitOnPut(final VM vm, final String key) {
-    DistributedTestCase.waitForCriterion(new DistributedTestCase.WaitCriterion() {
+    Wait.waitForCriterion(new WaitCriterion() {
       @Override
       public boolean done() {
         return (getUsingVM(vm, key) != null);
@@ -371,7 +374,7 @@ public class CompressionRegionConfigDUnitTest extends CacheTestCase {
         try {
           assertNotNull(createServerRegion(name,dataPolicy,compressor));
         } catch(Exception e) {
-          getLogWriter().error("Could not create the compressed region", e);
+          LogWriterSupport.getLogWriter().error("Could not create the compressed region", e);
           return Boolean.FALSE;
         }
         
@@ -394,7 +397,7 @@ public class CompressionRegionConfigDUnitTest extends CacheTestCase {
         try {
           assertNotNull(createRegion(name,dataPolicy,compressor));
         } catch(Exception e) {
-          getLogWriter().error("Could not create the compressed region", e);
+          LogWriterSupport.getLogWriter().error("Could not create the compressed region", e);
           return Boolean.FALSE;
         }
         
@@ -417,7 +420,7 @@ public class CompressionRegionConfigDUnitTest extends CacheTestCase {
         try {
           assertNotNull(createRegion(name,dataPolicy,compressor,diskStoreName));
         } catch(Exception e) {
-          getLogWriter().error("Could not create the compressed region", e);
+          LogWriterSupport.getLogWriter().error("Could not create the compressed region", e);
           return Boolean.FALSE;
         }
         
@@ -441,7 +444,7 @@ public class CompressionRegionConfigDUnitTest extends CacheTestCase {
         try {
           assertNotNull(createClientRegion(name,compressor,shortcut));
         } catch(Exception e) {
-          getLogWriter().error("Could not create the compressed region", e);
+          LogWriterSupport.getLogWriter().error("Could not create the compressed region", e);
           return Boolean.FALSE;
         }
         
@@ -523,7 +526,7 @@ public class CompressionRegionConfigDUnitTest extends CacheTestCase {
     } 
     // Running in hydra
     else {
-      return getDUnitLocatorPort();
+      return DistributedTestSupport.getDUnitLocatorPort();
     }
   }
 }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/76e324b5/gemfire-core/src/test/java/com/gemstone/gemfire/internal/compression/CompressionRegionOperationsOffHeapDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/compression/CompressionRegionOperationsOffHeapDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/compression/CompressionRegionOperationsOffHeapDUnitTest.java
index 8c66f96..fff71d4 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/compression/CompressionRegionOperationsOffHeapDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/compression/CompressionRegionOperationsOffHeapDUnitTest.java
@@ -22,6 +22,7 @@ import com.gemstone.gemfire.compression.Compressor;
 import com.gemstone.gemfire.compression.SnappyCompressor;
 import com.gemstone.gemfire.distributed.internal.DistributionConfig;
 import com.gemstone.gemfire.internal.cache.OffHeapTestUtil;
+import com.gemstone.gemfire.test.dunit.Invoke;
 import com.gemstone.gemfire.test.dunit.SerializableRunnable;
 
 public class CompressionRegionOperationsOffHeapDUnitTest extends
@@ -41,7 +42,7 @@ public class CompressionRegionOperationsOffHeapDUnitTest extends
         }
       }
     };
-    invokeInEveryVM(checkOrphans);
+    Invoke.invokeInEveryVM(checkOrphans);
     try {
       checkOrphans.run();
     } finally {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/76e324b5/gemfire-core/src/test/java/com/gemstone/gemfire/internal/jta/dunit/ExceptionsDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/jta/dunit/ExceptionsDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/jta/dunit/ExceptionsDUnitTest.java
index 8015b6a..9286fa4 100755
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/jta/dunit/ExceptionsDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/jta/dunit/ExceptionsDUnitTest.java
@@ -38,6 +38,7 @@ import com.gemstone.gemfire.internal.OSProcess;
 import com.gemstone.gemfire.internal.jta.CacheUtils;
 import com.gemstone.gemfire.test.dunit.DistributedTestCase;
 import com.gemstone.gemfire.test.dunit.Host;
+import com.gemstone.gemfire.test.dunit.LogWriterSupport;
 import com.gemstone.gemfire.test.dunit.VM;
 import com.gemstone.gemfire.util.test.TestUtil;
 
@@ -60,7 +61,7 @@ public class ExceptionsDUnitTest extends DistributedTestCase {
       //
       //    sb.append(lineSep);
     }
-    getLogWriter().fine("***********\n " + sb);
+    LogWriterSupport.getLogWriter().fine("***********\n " + sb);
     return sb.toString();
   }
 
@@ -110,10 +111,10 @@ public class ExceptionsDUnitTest extends DistributedTestCase {
      * value=\"83f0069202c571faf1ae6c42b4ad46030e4e31c17409e19a\"/>";
      */
     int n1 = str.indexOf(search);
-    getLogWriter().fine("Start Index = " + n1);
+    LogWriterSupport.getLogWriter().fine("Start Index = " + n1);
     int n2 = str.indexOf(last_search, n1);
     StringBuffer sbuff = new StringBuffer(str);
-    getLogWriter().fine("END Index = " + n2);
+    LogWriterSupport.getLogWriter().fine("END Index = " + n2);
     String modified_str = sbuff.replace(n1, n2, new_str).toString();
     return modified_str;
   }
@@ -173,7 +174,7 @@ public class ExceptionsDUnitTest extends DistributedTestCase {
       if (ds != null) ds.disconnect();
     }
     catch (Exception e) {
-      getLogWriter().fine("Error in disconnecting from Distributed System");
+      LogWriterSupport.getLogWriter().fine("Error in disconnecting from Distributed System");
     }
   }
 
@@ -234,7 +235,7 @@ public class ExceptionsDUnitTest extends DistributedTestCase {
               + "occur");
     }
     catch (Exception e) {
-      getLogWriter().fine("Exception caught in runTest1 due to : " + e);
+      LogWriterSupport.getLogWriter().fine("Exception caught in runTest1 due to : " + e);
       fail("failed in runTest1 due to " + e);
     }
   }


Mime
View raw message