geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kl...@apache.org
Subject [21/44] incubator-geode git commit: Refactor dunit
Date Tue, 02 Feb 2016 20:21:28 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/DataSerializerPropogationDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DataSerializerPropogationDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DataSerializerPropogationDUnitTest.java
index 9804184..e1e3bbc 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DataSerializerPropogationDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DataSerializerPropogationDUnitTest.java
@@ -49,9 +49,14 @@ import com.gemstone.gemfire.internal.cache.CacheServerImpl;
 import com.gemstone.gemfire.internal.cache.EventID;
 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.IgnoredException;
+import com.gemstone.gemfire.test.dunit.NetworkSupport;
+import com.gemstone.gemfire.test.dunit.StoppableWaitCriterion;
 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 DataSerializerPropogationDUnitTest extends DistributedTestCase {
 
@@ -169,7 +174,7 @@ public class DataSerializerPropogationDUnitTest extends DistributedTestCase {
 
     }
     finally {
-      unregisterAllDataSerializersFromAllVms();
+      DistributedTestSupport.unregisterAllDataSerializersFromAllVms();
     }
   }
 
@@ -184,7 +189,7 @@ public class DataSerializerPropogationDUnitTest extends DistributedTestCase {
     verifyDataSerializers(numOfDataSerializers, false);
   }
   public static void verifyDataSerializers(final int numOfDataSerializers, final boolean allowNonLocal) {
-    WaitCriterion wc = new WaitCriterion2() {
+    WaitCriterion wc = new StoppableWaitCriterion() {
       String excuse;
 
       private DataSerializer[] getSerializers() {
@@ -208,7 +213,7 @@ public class DataSerializerPropogationDUnitTest extends DistributedTestCase {
         return getSerializers().length > numOfDataSerializers;
       }
     };
-    DistributedTestCase.waitForCriterion(wc, 60 * 1000, 1000, true);
+    Wait.waitForCriterion(wc, 60 * 1000, 1000, true);
   }
 
   public static final ThreadLocal<Boolean> allowNonLocalTL = new ThreadLocal<Boolean>();
@@ -398,7 +403,7 @@ public class DataSerializerPropogationDUnitTest extends DistributedTestCase {
   public void testServerUpFirstClientLater() throws Exception {
     PORT1 = initServerCache(server1);
 
-    pause(3000);
+    Wait.pause(3000);
 
     server1.invoke(DataSerializerPropogationDUnitTest.class,
         "registerDSObject1");
@@ -410,10 +415,10 @@ public class DataSerializerPropogationDUnitTest extends DistributedTestCase {
 
     client1.invoke(DataSerializerPropogationDUnitTest.class,
         "createClientCache", new Object[] {
-            getServerHostName(server1.getHost()), new Integer(PORT1) });
+            NetworkSupport.getServerHostName(server1.getHost()), new Integer(PORT1) });
 
     // wait for client2 to come online
-    pause(3000);
+    Wait.pause(3000);
 
     client1.invoke(DataSerializerPropogationDUnitTest.class,
         "verifyDataSerializers", new Object[] { new Integer(2) });
@@ -449,7 +454,7 @@ public class DataSerializerPropogationDUnitTest extends DistributedTestCase {
       }
     });
 
-    pause(3000);
+    Wait.pause(3000);
     // Run getAll
     client1.invoke(new CacheSerializableRunnable("Get entry from client") {
       @Override
@@ -468,17 +473,17 @@ public class DataSerializerPropogationDUnitTest extends DistributedTestCase {
 
     client1.invoke(DataSerializerPropogationDUnitTest.class,
         "createClientCache", new Object[] {
-            getServerHostName(server1.getHost()), new Integer(PORT1) });
+            NetworkSupport.getServerHostName(server1.getHost()), new Integer(PORT1) });
     client2.invoke(DataSerializerPropogationDUnitTest.class,
         "createClientCache", new Object[] {
-            getServerHostName(server2.getHost()), new Integer(PORT2) });
+            NetworkSupport.getServerHostName(server2.getHost()), new Integer(PORT2) });
 
     // wait for client2 to come online
-    pause(2000);
+    Wait.pause(2000);
 
     client1.invoke(DataSerializerPropogationDUnitTest.class,
         "registerDSObject3");
-    pause(4000);
+    Wait.pause(4000);
 
     client1.invoke(DataSerializerPropogationDUnitTest.class,
         "verifyDataSerializers", new Object[] { new Integer(1) });
@@ -500,18 +505,18 @@ public class DataSerializerPropogationDUnitTest extends DistributedTestCase {
 
     client1.invoke(DataSerializerPropogationDUnitTest.class,
         "createClientCache", new Object[] {
-            getServerHostName(server1.getHost()), new Integer(PORT1) });
+            NetworkSupport.getServerHostName(server1.getHost()), new Integer(PORT1) });
     client2.invoke(DataSerializerPropogationDUnitTest.class,
         "createClientCache", new Object[] {
-            getServerHostName(server2.getHost()), new Integer(PORT2) });
+            NetworkSupport.getServerHostName(server2.getHost()), new Integer(PORT2) });
 
     // wait for client2 to come online
-    pause(2000);
+    Wait.pause(2000);
 
     server1.invoke(DataSerializerPropogationDUnitTest.class,
         "registerDSObjectLocalOnly", new Object[] { });
 
-    pause(4000);
+    Wait.pause(4000);
 
     server1.invoke(DataSerializerPropogationDUnitTest.class,
         "verifyDataSerializers", new Object[] { new Integer(1) });
@@ -532,13 +537,13 @@ public class DataSerializerPropogationDUnitTest extends DistributedTestCase {
 
     client1.invoke(DataSerializerPropogationDUnitTest.class,
         "createClientCache", new Object[] {
-            getServerHostName(server1.getHost()), new Integer(PORT1) });
+            NetworkSupport.getServerHostName(server1.getHost()), new Integer(PORT1) });
     client2.invoke(DataSerializerPropogationDUnitTest.class,
         "createClientCache", new Object[] {
-            getServerHostName(server2.getHost()), new Integer(PORT2) });
+            NetworkSupport.getServerHostName(server2.getHost()), new Integer(PORT2) });
 
     // wait for client2 to come online
-    pause(2000);
+    Wait.pause(2000);
 
     client1.invoke(DataSerializerPropogationDUnitTest.class,
         "registerDSObject4");
@@ -555,7 +560,7 @@ public class DataSerializerPropogationDUnitTest extends DistributedTestCase {
         "verifyDataSerializers", new Object[] { Integer.valueOf(1) });
 
     // can get server connectivity exception
-    final IgnoredException expectedEx = IgnoredException.addExpectedException(
+    final IgnoredException expectedEx = IgnoredException.addIgnoredException(
         "Server unreachable", client1);
 
     // stop the cache server
@@ -589,20 +594,20 @@ public class DataSerializerPropogationDUnitTest extends DistributedTestCase {
 
     client1.invoke(DataSerializerPropogationDUnitTest.class,
         "createClientCache", new Object[] {
-            getServerHostName(server1.getHost()), new Integer(PORT1) });
+            NetworkSupport.getServerHostName(server1.getHost()), new Integer(PORT1) });
     client2.invoke(DataSerializerPropogationDUnitTest.class,
         "createClientCache", new Object[] {
-            getServerHostName(server2.getHost()), new Integer(PORT2) });
+            NetworkSupport.getServerHostName(server2.getHost()), new Integer(PORT2) });
 
     // wait for client2 to come online
-    pause(2000);
+    Wait.pause(2000);
 
     client1.invoke(DataSerializerPropogationDUnitTest.class,
         "registerDSObject10");
 
     server1.invoke(DataSerializerPropogationDUnitTest.class,
         "registerDSObject11");
-    pause(4000);
+    Wait.pause(4000);
 
     server2.invoke(DataSerializerPropogationDUnitTest.class,
         "verifyDataSerializers", new Object[] { new Integer(2) });
@@ -622,10 +627,10 @@ public class DataSerializerPropogationDUnitTest extends DistributedTestCase {
     PORT2 = initServerCache(server2);
     client1.invoke(DataSerializerPropogationDUnitTest.class,
         "createClientCache", new Object[] {
-            getServerHostName(server1.getHost()), new Integer(PORT1) });
+            NetworkSupport.getServerHostName(server1.getHost()), new Integer(PORT1) });
     client2.invoke(DataSerializerPropogationDUnitTest.class,
         "createClientCache", new Object[] {
-            getServerHostName(server2.getHost()), new Integer(PORT2) });
+            NetworkSupport.getServerHostName(server2.getHost()), new Integer(PORT2) });
 
     client1.invoke(DataSerializerPropogationDUnitTest.class,
         "registerDSObject7");
@@ -646,7 +651,7 @@ public class DataSerializerPropogationDUnitTest extends DistributedTestCase {
             instanceCountWithOnePut) });
 
     // can get server connectivity exception
-    final IgnoredException expectedEx = IgnoredException.addExpectedException(
+    final IgnoredException expectedEx = IgnoredException.addIgnoredException(
         "Server unreachable", client1);
 
     server1.invoke(DataSerializerPropogationDUnitTest.class, "stopServer");
@@ -692,18 +697,18 @@ public class DataSerializerPropogationDUnitTest extends DistributedTestCase {
 
     client1.invoke(DataSerializerPropogationDUnitTest.class,
         "createClientCache", new Object[] {
-            getServerHostName(server1.getHost()), new Integer(PORT1) });
+            NetworkSupport.getServerHostName(server1.getHost()), new Integer(PORT1) });
     client2.invoke(DataSerializerPropogationDUnitTest.class,
         "createClientCache", new Object[] {
-            getServerHostName(server1.getHost()), new Integer(PORT1) });
-    createClientCache(getServerHostName(server2.getHost()), new Integer(PORT2));
+            NetworkSupport.getServerHostName(server1.getHost()), new Integer(PORT1) });
+    createClientCache(NetworkSupport.getServerHostName(server2.getHost()), new Integer(PORT2));
 
     // wait for client2 to come online
-    pause(2000);
+    Wait.pause(2000);
 
     client1.invoke(DataSerializerPropogationDUnitTest.class,
         "registerDSObject12");
-    pause(4000);
+    Wait.pause(4000);
 
     client1.invoke(DataSerializerPropogationDUnitTest.class,
         "verifyDataSerializers", new Object[] { new Integer(1) });
@@ -730,19 +735,19 @@ public class DataSerializerPropogationDUnitTest extends DistributedTestCase {
     PORT1 = initServerCache(server1, 1);
     PORT2 = initServerCache(server2, 2);
 
-    createClientCache(getServerHostName(server1.getHost()),
+    createClientCache(NetworkSupport.getServerHostName(server1.getHost()),
         new Integer(PORT1));
 
     client2.invoke(DataSerializerPropogationDUnitTest.class,
         "createClientCache", new Object[] {
-            getServerHostName(server2.getHost()), new Integer(PORT2) });
+            NetworkSupport.getServerHostName(server2.getHost()), new Integer(PORT2) });
     setClientServerObserver1();
     client2
         .invoke(DataSerializerPropogationDUnitTest.class, "setClientServerObserver2");
 
     registerDSObject13();
 
-    pause(10000);
+    Wait.pause(10000);
 
     Boolean pass = (Boolean)client2.invoke(
         DataSerializerPropogationDUnitTest.class, "verifyResult");
@@ -758,17 +763,17 @@ public class DataSerializerPropogationDUnitTest extends DistributedTestCase {
 
     client1.invoke(DataSerializerPropogationDUnitTest.class,
         "createClientCache", new Object[] {
-            getServerHostName(server1.getHost()), new Integer(PORT1) });
+            NetworkSupport.getServerHostName(server1.getHost()), new Integer(PORT1) });
     client2.invoke(DataSerializerPropogationDUnitTest.class,
         "createClientCache", new Object[] {
-            getServerHostName(server1.getHost()), new Integer(PORT2) });
+            NetworkSupport.getServerHostName(server1.getHost()), new Integer(PORT2) });
 
     // wait for client2 to come online
-    pause(2000);
+    Wait.pause(2000);
 
     client1.invoke(DataSerializerPropogationDUnitTest.class,
         "registerTestDataSerializer");
-    pause(4000);
+    Wait.pause(4000);
 
     client1.invoke(DataSerializerPropogationDUnitTest.class,
         "verifyDataSerializers", new Object[] { new Integer(1) });

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/76e324b5/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DestroyEntryPropagationDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DestroyEntryPropagationDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DestroyEntryPropagationDUnitTest.java
index c7bfeb2..c20f3f2 100755
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DestroyEntryPropagationDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DestroyEntryPropagationDUnitTest.java
@@ -41,7 +41,11 @@ import com.gemstone.gemfire.internal.cache.EventID;
 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.test.dunit.WaitCriterion;
 import com.gemstone.gemfire.cache30.CacheSerializableRunnable;
 import com.gemstone.gemfire.cache30.CertifiableTestCacheListener;
 import com.gemstone.gemfire.cache.client.*;
@@ -101,9 +105,9 @@ public class DestroyEntryPropagationDUnitTest extends DistributedTestCase
     PORT2 =  ((Integer)vm1.invoke(DestroyEntryPropagationDUnitTest.class, "createServerCache" )).intValue();
 
     vm2.invoke(DestroyEntryPropagationDUnitTest.class, "createClientCache",
-        new Object[] { getServerHostName(Host.getHost(0)), new Integer(PORT1),new Integer(PORT2)});
+        new Object[] { NetworkSupport.getServerHostName(Host.getHost(0)), new Integer(PORT1),new Integer(PORT2)});
     vm3.invoke(DestroyEntryPropagationDUnitTest.class, "createClientCache",
-        new Object[] { getServerHostName(Host.getHost(0)), new Integer(PORT1),new Integer(PORT2)});
+        new Object[] { NetworkSupport.getServerHostName(Host.getHost(0)), new Integer(PORT1),new Integer(PORT2)});
 
   }
 
@@ -222,7 +226,7 @@ public class DestroyEntryPropagationDUnitTest extends DistributedTestCase
             return null;
           }
         };
-        DistributedTestCase.waitForCriterion(ev, maxWaitTime, 200, true);
+        Wait.waitForCriterion(ev, maxWaitTime, 200, true);
       }
     });
 
@@ -246,7 +250,7 @@ public class DestroyEntryPropagationDUnitTest extends DistributedTestCase
             return null;
           }
         };
-        DistributedTestCase.waitForCriterion(ev, maxWaitTime, 200, true);
+        Wait.waitForCriterion(ev, maxWaitTime, 200, true);
       }
     });
 
@@ -297,10 +301,10 @@ public class DestroyEntryPropagationDUnitTest extends DistributedTestCase
   {
     try {
       Iterator iter = cache.getCacheServers().iterator();
-      getLogWriter().fine ("Asif: servers running = "+cache.getCacheServers().size());
+      LogWriterSupport.getLogWriter().fine ("Asif: servers running = "+cache.getCacheServers().size());
       if (iter.hasNext()) {
         CacheServer server = (CacheServer)iter.next();
-        getLogWriter().fine("asif : server running on port="+server.getPort()+ " asked to kill serevre onport="+port);
+        LogWriterSupport.getLogWriter().fine("asif : server running on port="+server.getPort()+ " asked to kill serevre onport="+port);
          if(port.intValue() == server.getPort()){
          server.stop();
         }
@@ -415,7 +419,7 @@ public class DestroyEntryPropagationDUnitTest extends DistributedTestCase
         return "waiting for destroy event for " + key;
       }
     };
-    DistributedTestCase.waitForCriterion(ev, 10 * 1000, 200, true);
+    Wait.waitForCriterion(ev, 10 * 1000, 200, true);
     ccl.destroys.remove(key);
   }
 
@@ -448,7 +452,7 @@ public class DestroyEntryPropagationDUnitTest extends DistributedTestCase
     AttributesFactory factory = new AttributesFactory();
     factory.setScope(Scope.DISTRIBUTED_ACK);
     factory.setPoolName(p.getName());
-    factory.setCacheListener(new CertifiableTestCacheListener(getLogWriter()));
+    factory.setCacheListener(new CertifiableTestCacheListener(LogWriterSupport.getLogWriter()));
     RegionAttributes attrs = factory.create();
     cache.createRegion(REGION_NAME, attrs);
 
@@ -460,7 +464,7 @@ public class DestroyEntryPropagationDUnitTest extends DistributedTestCase
     AttributesFactory factory = new AttributesFactory();
     factory.setScope(Scope.DISTRIBUTED_ACK);
     factory.setDataPolicy(DataPolicy.REPLICATE);
-    factory.setCacheListener(new CertifiableTestCacheListener(getLogWriter()));
+    factory.setCacheListener(new CertifiableTestCacheListener(LogWriterSupport.getLogWriter()));
     RegionAttributes attrs = factory.create();
     cache.createRegion(REGION_NAME, attrs);
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/76e324b5/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DurableClientBug39997DUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DurableClientBug39997DUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DurableClientBug39997DUnitTest.java
index 3e62a4e..94fe536 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DurableClientBug39997DUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DurableClientBug39997DUnitTest.java
@@ -32,8 +32,11 @@ import com.gemstone.gemfire.cache30.CacheTestCase;
 import com.gemstone.gemfire.internal.AvailablePortHelper;
 import com.gemstone.gemfire.test.dunit.Assert;
 import com.gemstone.gemfire.test.dunit.Host;
+import com.gemstone.gemfire.test.dunit.NetworkSupport;
 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;
 
 public class DurableClientBug39997DUnitTest extends CacheTestCase {
 
@@ -48,7 +51,7 @@ public class DurableClientBug39997DUnitTest extends CacheTestCase {
     VM vm0 = host.getVM(0);
     VM vm1 = host.getVM(1);
 
-    final String hostName = getServerHostName(host);
+    final String hostName = NetworkSupport.getServerHostName(host);
     final int port = AvailablePortHelper.getRandomAvailableTCPPort();
     vm0.invoke(new SerializableRunnable("create cache") {
       public void run() {
@@ -94,7 +97,7 @@ public class DurableClientBug39997DUnitTest extends CacheTestCase {
       public void run() {
         Cache cache = getCache();
         final Region region = cache.getRegion("region");
-        waitForCriterion(new WaitCriterion() {
+        Wait.waitForCriterion(new WaitCriterion() {
 
           public String description() {
             return "Wait for register interest to succeed";

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/76e324b5/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DurableClientQueueSizeDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DurableClientQueueSizeDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DurableClientQueueSizeDUnitTest.java
index 778e1bb..e6df36c 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DurableClientQueueSizeDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DurableClientQueueSizeDUnitTest.java
@@ -35,6 +35,7 @@ import com.gemstone.gemfire.distributed.internal.DistributionConfig;
 import com.gemstone.gemfire.internal.AvailablePort;
 import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
 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.IgnoredException;
 import com.gemstone.gemfire.test.dunit.VM;
@@ -86,8 +87,8 @@ public class DurableClientQueueSizeDUnitTest extends DistributedTestCase {
         "createCacheServer", new Object[] { });
     port1 = (Integer) vm1.invoke(DurableClientQueueSizeDUnitTest.class,
         "createCacheServer", new Object[] { });
-    IgnoredException.addExpectedException("java.net.SocketException");
-    IgnoredException.addExpectedException("Unexpected IOException");
+    IgnoredException.addIgnoredException("java.net.SocketException");
+    IgnoredException.addIgnoredException("Unexpected IOException");
   }
 
   public void tearDown2() throws Exception {
@@ -276,7 +277,7 @@ public class DurableClientQueueSizeDUnitTest extends DistributedTestCase {
   public static Integer createCacheServer(Integer serverPort)
       throws Exception {
     Properties props = new Properties();
-    props.setProperty("locators", "localhost["+getDUnitLocatorPort()+"]");
+    props.setProperty("locators", "localhost["+DistributedTestSupport.getDUnitLocatorPort()+"]");
 //    props.setProperty("log-level", "fine");
 //    props.setProperty("log-file", "server_" + OSProcess.getId() + ".log");
 //    props.setProperty("statistic-archive-file", "server_" + OSProcess.getId()

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/76e324b5/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DurableClientReconnectAutoDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DurableClientReconnectAutoDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DurableClientReconnectAutoDUnitTest.java
index 5e015ea..664d5ca 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DurableClientReconnectAutoDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DurableClientReconnectAutoDUnitTest.java
@@ -19,7 +19,9 @@ package com.gemstone.gemfire.internal.cache.tier.sockets;
 import com.gemstone.gemfire.cache.client.PoolFactory;
 import com.gemstone.gemfire.cache.client.PoolManager;
 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.NetworkSupport;
 
 /**
  * @author dsmith
@@ -50,7 +52,7 @@ public class DurableClientReconnectAutoDUnitTest extends
   protected PoolFactory getPoolFactory() {
     Host host = Host.getHost(0);
     PoolFactory factory = PoolManager.createFactory()
-    .addLocator(getServerHostName(host), getDUnitLocatorPort());
+    .addLocator(NetworkSupport.getServerHostName(host), DistributedTestSupport.getDUnitLocatorPort());
     return factory;
   }
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/76e324b5/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DurableClientReconnectDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DurableClientReconnectDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DurableClientReconnectDUnitTest.java
index a433cdc..6f72eef 100755
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DurableClientReconnectDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DurableClientReconnectDUnitTest.java
@@ -46,8 +46,12 @@ import com.gemstone.gemfire.internal.cache.CacheServerImpl;
 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.LogWriterSupport;
+import com.gemstone.gemfire.test.dunit.NetworkSupport;
 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;
 
 
 /**      
@@ -106,10 +110,10 @@ public class DurableClientReconnectDUnitTest extends DistributedTestCase
     PORT2 =  ((Integer) server2.invoke(DurableClientReconnectDUnitTest.class, "createServerCache"));
     PORT3 =  ((Integer) server3.invoke(DurableClientReconnectDUnitTest.class, "createServerCache"));
     PORT4 =  ((Integer) server4.invoke(DurableClientReconnectDUnitTest.class, "createServerCache"));
-    SERVER1 = getServerHostName(host)+PORT1;
-    SERVER2 = getServerHostName(host)+PORT2;
-    SERVER3 = getServerHostName(host)+PORT3;
-    SERVER4 = getServerHostName(host)+PORT4;
+    SERVER1 = NetworkSupport.getServerHostName(host)+PORT1;
+    SERVER2 = NetworkSupport.getServerHostName(host)+PORT2;
+    SERVER3 = NetworkSupport.getServerHostName(host)+PORT3;
+    SERVER4 = NetworkSupport.getServerHostName(host)+PORT4;
     
     //CacheServerTestUtil.disableShufflingOfEndpoints();
     System.setProperty("gemfire.bridge.disableShufflingOfEndpoints", "false");
@@ -117,7 +121,7 @@ public class DurableClientReconnectDUnitTest extends DistributedTestCase
   }
   public void testDurableReconnectSingleServer() throws Exception
   {
-    createCacheClientAndConnectToSingleServer(getServerHostName(Host.getHost(0)), 0);
+    createCacheClientAndConnectToSingleServer(NetworkSupport.getServerHostName(Host.getHost(0)), 0);
     List redundantServers = pool.getRedundantNames();    
     String primaryName = pool.getPrimaryName();
     assertTrue(redundantServers.isEmpty());
@@ -125,9 +129,9 @@ public class DurableClientReconnectDUnitTest extends DistributedTestCase
     
     //Wait for server to cleanup client resources
     //temporary fix for bug 38345.
-    pause(2000);
+    Wait.pause(2000);
     
-    createCacheClientAndConnectToSingleServer(getServerHostName(Host.getHost(0)), 0);
+    createCacheClientAndConnectToSingleServer(NetworkSupport.getServerHostName(Host.getHost(0)), 0);
     List redundantServers2 = pool.getRedundantNames();
     String primaryName2 = pool.getPrimaryName();
     assertTrue(redundantServers2.isEmpty());
@@ -135,13 +139,13 @@ public class DurableClientReconnectDUnitTest extends DistributedTestCase
   }
   public void testDurableReconnectSingleServerWithZeroConnPerServer() throws Exception
   {
-    createCacheClientAndConnectToSingleServerWithZeroConnPerServer(getServerHostName(Host.getHost(0)), 0);
+    createCacheClientAndConnectToSingleServerWithZeroConnPerServer(NetworkSupport.getServerHostName(Host.getHost(0)), 0);
     List redundantServers = pool.getRedundantNames();
     String primaryName = pool.getPrimaryName();
     assertTrue(redundantServers.isEmpty());
     closeCache(true);
     
-    createCacheClientAndConnectToSingleServerWithZeroConnPerServer(getServerHostName(Host.getHost(0)), 0);
+    createCacheClientAndConnectToSingleServerWithZeroConnPerServer(NetworkSupport.getServerHostName(Host.getHost(0)), 0);
     List redundantServers2 = pool.getRedundantNames();
     String primaryName2 = pool.getPrimaryName();
     assertTrue(redundantServers2.isEmpty());
@@ -157,7 +161,7 @@ public class DurableClientReconnectDUnitTest extends DistributedTestCase
     
     //Wait for server to cleanup client resources
     //temporary fix for bug 38345.
-    pause(2000);
+    Wait.pause(2000);
     
     createCacheClient(0);
     List redundantServers2 = pool.getRedundantNames();
@@ -184,7 +188,7 @@ public class DurableClientReconnectDUnitTest extends DistributedTestCase
     
     //Wait for server to cleanup client resources
     //temporary fix for bug 38345.
-    pause(2000);
+    Wait.pause(2000);
     
     createCacheClient();
     
@@ -213,7 +217,7 @@ public class DurableClientReconnectDUnitTest extends DistributedTestCase
     
     //Wait for server to cleanup client resources
     //temporary fix for bug 38345.
-    pause(2000);
+    Wait.pause(2000);
     
     createCacheClient();
     
@@ -335,7 +339,7 @@ public class DurableClientReconnectDUnitTest extends DistributedTestCase
     String rServer2 = (String)serverArray[1];
 
     // can see sporadic socket closed exceptions
-    final IgnoredException expectedEx = IgnoredException.addExpectedException(
+    final IgnoredException expectedEx = IgnoredException.addIgnoredException(
         SocketException.class.getName());
 
     instance.closeServer(rServer1);    
@@ -378,51 +382,51 @@ public class DurableClientReconnectDUnitTest extends DistributedTestCase
     instance.determineAndVerfiyRedundantServers(redundantServers);
     instance.determineAndVerfiyNonRedundantServers(redundantServers);
     
-    getLogWriter().info("TEST - Durable client initialially has servers " + redundantServers);
+    LogWriterSupport.getLogWriter().info("TEST - Durable client initialially has servers " + redundantServers);
      
-    getLogWriter().info("TEST - Closing durable client for the first time");
+    LogWriterSupport.getLogWriter().info("TEST - Closing durable client for the first time");
     // Stop the durable client
     closeCache(true);
     
-    getLogWriter().info("TEST - Durable client closed for the first time");
+    LogWriterSupport.getLogWriter().info("TEST - Durable client closed for the first time");
     
     //Wait for server to cleanup client resources
     //temporary fix for bug 38345.
-    pause(2000);
+    Wait.pause(2000);
     
-    getLogWriter().info("TEST - Creating the durable client with one fewer servers");
+    LogWriterSupport.getLogWriter().info("TEST - Creating the durable client with one fewer servers");
     //We recreate the durable client, but this
     //Time we won't have it create any queues
     createCacheClient(2, 20, false);
     
     HashSet redundantServers2 = new HashSet(pool.getRedundantNames());
     redundantServers2.add(pool.getPrimaryName());
-    getLogWriter().info("TEST - Durable client created again, now with servers " + redundantServers2);
+    LogWriterSupport.getLogWriter().info("TEST - Durable client created again, now with servers " + redundantServers2);
     Host host = Host.getHost(0);
     //Make sure we create client to server connections to all of the servers 
-    pool.acquireConnection(new ServerLocation(getServerHostName(host), PORT1.intValue()));
-    pool.acquireConnection(new ServerLocation(getServerHostName(host), PORT2.intValue()));
-    pool.acquireConnection(new ServerLocation(getServerHostName(host), PORT3.intValue()));
-    pool.acquireConnection(new ServerLocation(getServerHostName(host), PORT4.intValue()));
+    pool.acquireConnection(new ServerLocation(NetworkSupport.getServerHostName(host), PORT1.intValue()));
+    pool.acquireConnection(new ServerLocation(NetworkSupport.getServerHostName(host), PORT2.intValue()));
+    pool.acquireConnection(new ServerLocation(NetworkSupport.getServerHostName(host), PORT3.intValue()));
+    pool.acquireConnection(new ServerLocation(NetworkSupport.getServerHostName(host), PORT4.intValue()));
     
-    getLogWriter().info("TEST - All pool connections are now aquired");
+    LogWriterSupport.getLogWriter().info("TEST - All pool connections are now aquired");
     
     closeCache(true);
     
-    getLogWriter().info("TEST - closed durable client for the second time");
+    LogWriterSupport.getLogWriter().info("TEST - closed durable client for the second time");
     
   //Wait for server to cleanup client resources
     //temporary fix for bug 38345.
-    pause(2000);
+    Wait.pause(2000);
     
-    getLogWriter().info("TEST - creating durable client for the third time");
+    LogWriterSupport.getLogWriter().info("TEST - creating durable client for the third time");
     //Now we should connect to all of the servers we were originally connected to
     createCacheClient(2, 20);
     
     HashSet redundantServersAfterReconnect = new HashSet(pool.getRedundantNames());
     redundantServersAfterReconnect.add(pool.getPrimaryName());
     
-    getLogWriter().info("TEST - durable client created for the third time, now with servers " + redundantServersAfterReconnect);
+    LogWriterSupport.getLogWriter().info("TEST - durable client created for the third time, now with servers " + redundantServersAfterReconnect);
     
     instance.determineAndVerfiyRedundantServers(redundantServersAfterReconnect);
     instance.determineAndVerfiyNonRedundantServers(redundantServersAfterReconnect);
@@ -430,9 +434,9 @@ public class DurableClientReconnectDUnitTest extends DistributedTestCase
     assertEquals(redundantServers, redundantServersAfterReconnect);
     
     //Now we wait to make sure the durable client expiration task isn't fired.
-    pause(25000);
+    Wait.pause(25000);
     
-    getLogWriter().info("TEST - Finished waiting for durable client expiration task");
+    LogWriterSupport.getLogWriter().info("TEST - Finished waiting for durable client expiration task");
     
     redundantServersAfterReconnect = new HashSet(pool.getRedundantNames());
     redundantServersAfterReconnect.add(pool.getPrimaryName());
@@ -565,7 +569,7 @@ public class DurableClientReconnectDUnitTest extends DistributedTestCase
         return null;
       }
     };
-    DistributedTestCase.waitForCriterion(ev, 15 * 1000, 200, true);
+    Wait.waitForCriterion(ev, 15 * 1000, 200, true);
   }
   
   protected static int getNumberOfClientProxies() {
@@ -599,10 +603,10 @@ public class DurableClientReconnectDUnitTest extends DistributedTestCase
   protected PoolFactory getPoolFactory() {
     Host host = Host.getHost(0);
     PoolFactory factory = PoolManager.createFactory()
-    .addServer(getServerHostName(host), PORT1.intValue())
-    .addServer(getServerHostName(host), PORT2.intValue())
-    .addServer(getServerHostName(host), PORT3.intValue())
-    .addServer(getServerHostName(host), PORT4.intValue());
+    .addServer(NetworkSupport.getServerHostName(host), PORT1.intValue())
+    .addServer(NetworkSupport.getServerHostName(host), PORT2.intValue())
+    .addServer(NetworkSupport.getServerHostName(host), PORT3.intValue())
+    .addServer(NetworkSupport.getServerHostName(host), PORT4.intValue());
     return factory;
   }
   

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/76e324b5/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DurableClientStatsDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DurableClientStatsDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DurableClientStatsDUnitTest.java
index b97a058..a959ada 100755
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DurableClientStatsDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DurableClientStatsDUnitTest.java
@@ -33,7 +33,9 @@ import com.gemstone.gemfire.internal.cache.PoolFactoryImpl;
 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;
 
 /**
  * 
@@ -100,23 +102,23 @@ public class DurableClientStatsDUnitTest extends DistributedTestCase {
 
     startAndCloseNonDurableClientCache(durableClientTimeout);
     startAndCloseNonDurableClientCache(1);      //////// -> Reconnection1
-    pause(1400);        //////// -> Queue Dropped1
+    Wait.pause(1400);        //////// -> Queue Dropped1
     startAndCloseNonDurableClientCache(1);
-    pause(1400);        //////// -> Queue Dropped2
+    Wait.pause(1400);        //////// -> Queue Dropped2
     
     startRegisterAndCloseNonDurableClientCache( durableClientTimeout);
-    pause(500);
+    Wait.pause(500);
 
     this.server1VM.invoke(DurableClientStatsDUnitTest.class, "putValue",
         new Object[] { K1, "Value1" });         //////// -> Enqueue Message1
 
-    pause(500);
+    Wait.pause(500);
     startAndCloseNonDurableClientCache(1);      //////// -> Reconnection2
-    pause(1400);        //////// -> Queue Dropped3
+    Wait.pause(1400);        //////// -> Queue Dropped3
     startAndCloseNonDurableClientCache(1);
-    pause(1400);        //////// -> Queue Dropped4
+    Wait.pause(1400);        //////// -> Queue Dropped4
     startRegisterAndCloseNonDurableClientCache( durableClientTimeout);
-    pause(500);
+    Wait.pause(500);
 
     this.server1VM.invoke(DurableClientStatsDUnitTest.class, "putValue",
         new Object[] { K1, "NewValue1" });      //////// -> Enqueue Message2
@@ -144,23 +146,23 @@ public class DurableClientStatsDUnitTest extends DistributedTestCase {
 
     startAndCloseDurableClientCache(durableClientTimeout);
     startAndCloseDurableClientCache(1);      //////// -> Reconnection1
-    pause(1400);        //////// -> Queue Dropped1
+    Wait.pause(1400);        //////// -> Queue Dropped1
     startAndCloseDurableClientCache(1);
-    pause(1400);        //////// -> Queue Dropped2
+    Wait.pause(1400);        //////// -> Queue Dropped2
     
     startRegisterAndCloseDurableClientCache( durableClientTimeout);
-    pause(500);
+    Wait.pause(500);
 
     this.server1VM.invoke(DurableClientStatsDUnitTest.class, "putValue",
         new Object[] { K1, "Value1" });         //////// -> Enqueue Message1
 
-    pause(500);
+    Wait.pause(500);
     startAndCloseDurableClientCache(1);      //////// -> Reconnection2
-    pause(1400);        //////// -> Queue Dropped3
+    Wait.pause(1400);        //////// -> Queue Dropped3
     startAndCloseDurableClientCache(1);
-    pause(1400);        //////// -> Queue Dropped4
+    Wait.pause(1400);        //////// -> Queue Dropped4
     startRegisterAndCloseDurableClientCache( durableClientTimeout);
-    pause(500);
+    Wait.pause(500);
 
     this.server1VM.invoke(DurableClientStatsDUnitTest.class, "putValue",
         new Object[] { K1, "NewValue1" });      //////// -> Enqueue Message2
@@ -179,7 +181,7 @@ public class DurableClientStatsDUnitTest extends DistributedTestCase {
 
     this.durableClientVM.invoke(CacheServerTestUtil.class, "createCacheClient",
         new Object[] {
-            getClientPool(getServerHostName(durableClientVM.getHost()), PORT1, true, 0),
+            getClientPool(NetworkSupport.getServerHostName(durableClientVM.getHost()), PORT1, true, 0),
             regionName,
             getDurableClientDistributedSystemProperties(durableClientId,
                 durableClientTimeout), Boolean.TRUE });
@@ -204,7 +206,7 @@ public class DurableClientStatsDUnitTest extends DistributedTestCase {
 
     this.durableClientVM.invoke(CacheServerTestUtil.class, "createCacheClient",
         new Object[] {
-            getClientPool(getServerHostName(durableClientVM.getHost()), PORT1, true, 0),
+            getClientPool(NetworkSupport.getServerHostName(durableClientVM.getHost()), PORT1, true, 0),
             regionName,
             getNonDurableClientDistributedSystemProperties(durableClientId,
                 durableClientTimeout), Boolean.TRUE });
@@ -229,7 +231,7 @@ public class DurableClientStatsDUnitTest extends DistributedTestCase {
 
     this.durableClientVM.invoke(CacheServerTestUtil.class, "createCacheClient",
         new Object[] {
-            getClientPool(getServerHostName(durableClientVM.getHost()), PORT1, true, 0),
+            getClientPool(NetworkSupport.getServerHostName(durableClientVM.getHost()), PORT1, true, 0),
             regionName,
             getDurableClientDistributedSystemProperties(durableClientId,
                 durableClientTimeout), Boolean.TRUE });
@@ -253,7 +255,7 @@ public class DurableClientStatsDUnitTest extends DistributedTestCase {
 
     this.durableClientVM.invoke(CacheServerTestUtil.class, "createCacheClient",
         new Object[] {
-            getClientPool(getServerHostName(durableClientVM.getHost()), PORT1, true, 0),
+            getClientPool(NetworkSupport.getServerHostName(durableClientVM.getHost()), PORT1, true, 0),
             regionName,
             getNonDurableClientDistributedSystemProperties(durableClientId,
                 durableClientTimeout), Boolean.TRUE });

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/76e324b5/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DurableRegistrationDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DurableRegistrationDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DurableRegistrationDUnitTest.java
index 3b40ed7..ef122f3 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DurableRegistrationDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DurableRegistrationDUnitTest.java
@@ -42,7 +42,11 @@ import com.gemstone.gemfire.internal.cache.PoolFactoryImpl;
 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.test.dunit.WaitCriterion;
 
 /**
  * 
@@ -125,7 +129,7 @@ public class DurableRegistrationDUnitTest extends DistributedTestCase {
     // seconds
     this.durableClientVM.invoke(CacheServerTestUtil.class, "createCacheClient",
         new Object[] {
-            getClientPool(getServerHostName(durableClientVM.getHost()), PORT1, PORT2, true, 0),
+            getClientPool(NetworkSupport.getServerHostName(durableClientVM.getHost()), PORT1, PORT2, true, 0),
             regionName,
             getClientDistributedSystemProperties(durableClientId,
                 durableClientTimeout), Boolean.TRUE });
@@ -163,7 +167,7 @@ public class DurableRegistrationDUnitTest extends DistributedTestCase {
     this.server2VM.invoke(DurableRegistrationDUnitTest.class, "putValue",
         new Object[] { K4, "Value4" });
 
-    pause(1000);
+    Wait.pause(1000);
     // Step 5: Verify Updates on the Client
 
     assertEquals("Value1", this.server2VM.invoke(
@@ -198,7 +202,7 @@ public class DurableRegistrationDUnitTest extends DistributedTestCase {
     // Step 8: Re-start the Client
     this.durableClientVM
         .invoke(CacheServerTestUtil.class, "createCacheClient",
-            new Object[] { getClientPool(getServerHostName(durableClientVM.getHost()), PORT1, PORT2, true, 0),
+            new Object[] { getClientPool(NetworkSupport.getServerHostName(durableClientVM.getHost()), PORT1, PORT2, true, 0),
                 regionName,
                 getClientDistributedSystemProperties(durableClientId),
                 Boolean.TRUE });
@@ -211,7 +215,7 @@ public class DurableRegistrationDUnitTest extends DistributedTestCase {
       }
     });
 
-    pause(5000);
+    Wait.pause(5000);
 
     assertNull(this.durableClientVM.invoke(DurableRegistrationDUnitTest.class,
         "getValue", new Object[] { K1 }));
@@ -221,7 +225,7 @@ public class DurableRegistrationDUnitTest extends DistributedTestCase {
     this.durableClientVM.invoke(DurableRegistrationDUnitTest.class,
         "registerKey", new Object[] { K1, new Boolean(false) });
 
-    pause(5000);
+    Wait.pause(5000);
     assertNull(this.durableClientVM.invoke(DurableRegistrationDUnitTest.class,
         "getValue", new Object[] { K1 }));
     assertNull(this.durableClientVM.invoke(DurableRegistrationDUnitTest.class,
@@ -236,7 +240,7 @@ public class DurableRegistrationDUnitTest extends DistributedTestCase {
     this.server2VM.invoke(DurableRegistrationDUnitTest.class, "putValue",
         new Object[] { K4, "PingPong_updated_4" });
 
-    pause(5000);
+    Wait.pause(5000);
 
     // Step 9: Verify Updates on the Client
     assertEquals("PingPong_updated_1", this.durableClientVM.invoke(
@@ -277,7 +281,7 @@ public class DurableRegistrationDUnitTest extends DistributedTestCase {
     final int durableClientTimeout = 600;
     this.durableClientVM.invoke(CacheServerTestUtil.class, "createCacheClient",
         new Object[] {
-            getClientPool(getServerHostName(durableClientVM.getHost()), PORT1, PORT2, true, 0),
+            getClientPool(NetworkSupport.getServerHostName(durableClientVM.getHost()), PORT1, PORT2, true, 0),
             regionName,
             getClientDistributedSystemProperties(durableClientId,
                 durableClientTimeout) });
@@ -315,7 +319,7 @@ public class DurableRegistrationDUnitTest extends DistributedTestCase {
     this.server2VM.invoke(DurableRegistrationDUnitTest.class, "putValue",
         new Object[] { K4, "Value4" });
 
-    pause(1000);
+    Wait.pause(1000);
     // Step 5: Verify Updates on the Client
 
     assertEquals("Value1", this.server2VM.invoke(
@@ -350,7 +354,7 @@ public class DurableRegistrationDUnitTest extends DistributedTestCase {
     // Step 8: Re-start the Client
     this.durableClientVM
         .invoke(CacheServerTestUtil.class, "createCacheClient",
-            new Object[] { getClientPool(getServerHostName(durableClientVM.getHost()), PORT1, PORT2, true, 0),
+            new Object[] { getClientPool(NetworkSupport.getServerHostName(durableClientVM.getHost()), PORT1, PORT2, true, 0),
                 regionName,
                 getClientDistributedSystemProperties(durableClientId),
                 Boolean.TRUE });
@@ -382,7 +386,7 @@ public class DurableRegistrationDUnitTest extends DistributedTestCase {
     this.durableClientVM.invoke(DurableRegistrationDUnitTest.class,
         "unregisterKey", new Object[] { K3 });
 
-    pause(5000);
+    Wait.pause(5000);
 
     // Step 12: Modify values on the server for all the Keys
     this.server2VM.invoke(DurableRegistrationDUnitTest.class, "putValue",
@@ -394,7 +398,7 @@ public class DurableRegistrationDUnitTest extends DistributedTestCase {
     this.server2VM.invoke(DurableRegistrationDUnitTest.class, "putValue",
         new Object[] { K4, "PingPong_updated_4" });
 
-    pause(5000);
+    Wait.pause(5000);
 
     // Step 13: Check the values for the ones not unregistered and the
     // Unregistered Keys' Values should be null
@@ -468,7 +472,7 @@ public class DurableRegistrationDUnitTest extends DistributedTestCase {
     final int durableClientTimeout = 600;
     this.durableClientVM.invoke(CacheServerTestUtil.class, "createCacheClient",
         new Object[] {
-            getClientPool(getServerHostName(durableClientVM.getHost()), PORT1, PORT2, true, 1),
+            getClientPool(NetworkSupport.getServerHostName(durableClientVM.getHost()), PORT1, PORT2, true, 1),
             regionName,
             getClientDistributedSystemProperties(durableClientId,
                 durableClientTimeout) });
@@ -497,13 +501,13 @@ public class DurableRegistrationDUnitTest extends DistributedTestCase {
         "createCacheServer", new Object[] { regionName, new Boolean(true),
              PORT2 });
 
-    pause(3000);
+    Wait.pause(3000);
 
     // Check server2 got all the interests registered by the durable client.    
     server2VM.invoke(new CacheSerializableRunnable("Verify Interests.") {
       public void run2() throws CacheException
       {
-        getLogWriter().info("### Verifying interests registered by DurableClient. ###");
+        LogWriterSupport.getLogWriter().info("### Verifying interests registered by DurableClient. ###");
         CacheClientNotifier ccn = CacheClientNotifier.getInstance();
         CacheClientProxy p = null;
         
@@ -511,7 +515,7 @@ public class DurableRegistrationDUnitTest extends DistributedTestCase {
         for (int i=0; i < 60; i++) {
           Iterator ps = ccn.getClientProxies().iterator();
           if (!ps.hasNext()) {
-            pause(1000);
+            Wait.pause(1000);
             continue;
           } else {
             p = (CacheClientProxy)ps.next();
@@ -568,7 +572,7 @@ public class DurableRegistrationDUnitTest extends DistributedTestCase {
     final int durableClientTimeout = 600;
     this.durableClientVM.invoke(CacheServerTestUtil.class, "createCacheClient",
         new Object[] {
-            getClientPool(getServerHostName(durableClientVM.getHost()), PORT1, PORT2, true, 1),
+            getClientPool(NetworkSupport.getServerHostName(durableClientVM.getHost()), PORT1, PORT2, true, 1),
             regionName,
             getClientDistributedSystemProperties(durableClientId,
                 durableClientTimeout) });
@@ -595,12 +599,12 @@ public class DurableRegistrationDUnitTest extends DistributedTestCase {
     this.durableClientVM.invoke(DurableRegistrationDUnitTest.class,
         "closeCache");
 
-    pause(2000);
+    Wait.pause(2000);
 
     //Re-start the Client
     this.durableClientVM
         .invoke(CacheServerTestUtil.class, "createCacheClient",
-            new Object[] { getClientPool(getServerHostName(durableClientVM.getHost()), PORT1, PORT2, true, 1),
+            new Object[] { getClientPool(NetworkSupport.getServerHostName(durableClientVM.getHost()), PORT1, PORT2, true, 1),
                 regionName,
                 getClientDistributedSystemProperties(durableClientId),
                 Boolean.TRUE });
@@ -618,13 +622,13 @@ public class DurableRegistrationDUnitTest extends DistributedTestCase {
         "createCacheServer", new Object[] { regionName, new Boolean(true),
              PORT2 });
 
-    pause(3000);
+    Wait.pause(3000);
 
     // Check server2 got all the interests registered by the durable client.    
     server2VM.invoke(new CacheSerializableRunnable("Verify Interests.") {
       public void run2() throws CacheException
       {
-        getLogWriter().info("### Verifying interests registered by DurableClient. ###");
+        LogWriterSupport.getLogWriter().info("### Verifying interests registered by DurableClient. ###");
         CacheClientNotifier ccn = CacheClientNotifier.getInstance();
         CacheClientProxy p = null;
         
@@ -632,7 +636,7 @@ public class DurableRegistrationDUnitTest extends DistributedTestCase {
         for (int i=0; i < 60; i++) {
           Iterator ps = ccn.getClientProxies().iterator();
           if (!ps.hasNext()) {
-            pause(1000);
+            Wait.pause(1000);
             continue;
           } else {
             p = (CacheClientProxy)ps.next();
@@ -802,7 +806,7 @@ public class DurableRegistrationDUnitTest extends DistributedTestCase {
         return null;
       }
     };
-    DistributedTestCase.waitForCriterion(ev, 15 * 1000, 200, true);
+    Wait.waitForCriterion(ev, 15 * 1000, 200, true);
   }
 
   protected static int getNumberOfClientProxies() {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/76e324b5/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DurableResponseMatrixDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DurableResponseMatrixDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DurableResponseMatrixDUnitTest.java
index 1084793..36f34ff 100755
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DurableResponseMatrixDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DurableResponseMatrixDUnitTest.java
@@ -28,7 +28,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.AvailablePort;
 import com.gemstone.gemfire.cache.client.*;
 import com.gemstone.gemfire.cache.client.internal.PoolImpl;
@@ -68,9 +71,9 @@ public class DurableResponseMatrixDUnitTest extends DistributedTestCase
     // start servers first
     PORT1 = ((Integer)server1.invoke(DurableResponseMatrixDUnitTest.class,
         "createServerCache"));
-    createCacheClient(getServerHostName(server1.getHost()));
+    createCacheClient(NetworkSupport.getServerHostName(server1.getHost()));
     //Disconnecting the client can cause this
-    IgnoredException.addExpectedException("Connection reset||Unexpected IOException");
+    IgnoredException.addIgnoredException("Connection reset||Unexpected IOException");
   }
 
   public void testRegisterInterestResponse_NonExistent_Invalid()
@@ -198,7 +201,7 @@ public class DurableResponseMatrixDUnitTest extends DistributedTestCase
         return null;
       }
     };
-    DistributedTestCase.waitForCriterion(ev, 120 * 1000, 200, true);
+    Wait.waitForCriterion(ev, 120 * 1000, 200, true);
   }
   
   public void testNotification_NonExistent_Create() 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/EventIDVerificationDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/EventIDVerificationDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/EventIDVerificationDUnitTest.java
index ba1658c..007e850 100755
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/EventIDVerificationDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/EventIDVerificationDUnitTest.java
@@ -45,6 +45,7 @@ import com.gemstone.gemfire.internal.cache.RegionEventImpl;
 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;
 
 /**
@@ -98,7 +99,7 @@ public class EventIDVerificationDUnitTest extends DistributedTestCase
 
     //vm2.invoke(EventIDVerificationDUnitTest.class, "createClientCache", new
     // Object[] { new Integer(PORT1),new Integer(PORT2)});
-    createClientCache(getServerHostName(host), new Integer(PORT1), new Integer(PORT2));
+    createClientCache(NetworkSupport.getServerHostName(host), new Integer(PORT1), new Integer(PORT2));
     CacheObserverHolder.setInstance(new CacheObserverAdapter());
 
   }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/76e324b5/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/ForceInvalidateEvictionDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/ForceInvalidateEvictionDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/ForceInvalidateEvictionDUnitTest.java
index 806d702..e13644f 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/ForceInvalidateEvictionDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/ForceInvalidateEvictionDUnitTest.java
@@ -45,8 +45,11 @@ import com.gemstone.gemfire.internal.cache.LocalRegion;
 import com.gemstone.gemfire.internal.cache.Token;
 import com.gemstone.gemfire.test.dunit.Assert;
 import com.gemstone.gemfire.test.dunit.Host;
+import com.gemstone.gemfire.test.dunit.NetworkSupport;
 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;
 
 /**
  * @author dsmith
@@ -259,7 +262,7 @@ public class ForceInvalidateEvictionDUnitTest extends CacheTestCase {
         Region region = cache.getRegion(name);
         final MyListener listener = (MyListener) region.getAttributes().getCacheListeners()[0];
         if(invalidated) {
-          waitForCriterion(new WaitCriterion() {
+          Wait.waitForCriterion(new WaitCriterion() {
 
             public String description() {
               return "Didn't receive invalidate after 30 seconds";
@@ -285,7 +288,7 @@ public class ForceInvalidateEvictionDUnitTest extends CacheTestCase {
         Cache cache = getCache();
         final LocalRegion region = (LocalRegion) cache.getRegion(name);
         
-        waitForCriterion(new WaitCriterion() {
+        Wait.waitForCriterion(new WaitCriterion() {
           
           public boolean done() {
             Object value  = null;
@@ -342,7 +345,7 @@ public class ForceInvalidateEvictionDUnitTest extends CacheTestCase {
         Cache cache = getCache();
         
         PoolFactory pf = PoolManager.createFactory();
-        pf.addServer(getServerHostName(host), port);
+        pf.addServer(NetworkSupport.getServerHostName(host), port);
         pf.setSubscriptionEnabled(true);
         pf.create(name);
         RegionFactory rf = new RegionFactory();

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/76e324b5/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/ForceInvalidateOffHeapEvictionDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/ForceInvalidateOffHeapEvictionDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/ForceInvalidateOffHeapEvictionDUnitTest.java
index 7a441c6..80451bc 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/ForceInvalidateOffHeapEvictionDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/ForceInvalidateOffHeapEvictionDUnitTest.java
@@ -20,6 +20,7 @@ import java.util.Properties;
 
 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;
 
 /**
@@ -45,7 +46,7 @@ public class ForceInvalidateOffHeapEvictionDUnitTest 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/cache/tier/sockets/HABug36738DUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/HABug36738DUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/HABug36738DUnitTest.java
index 395047a..f9c604c 100755
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/HABug36738DUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/HABug36738DUnitTest.java
@@ -39,7 +39,9 @@ import com.gemstone.gemfire.internal.cache.tier.sockets.ClientProxyMembershipID;
 import com.gemstone.gemfire.internal.cache.tier.sockets.ClientUpdateMessage;
 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.test.dunit.Wait;
 
 /**
  * This is the bugtest for bug no. 36738. When Object of class
@@ -96,7 +98,7 @@ public class HABug36738DUnitTest extends DistributedTestCase
   public void testBug36768() throws Exception
   {
     createServer1();
-    pause(10000);
+    Wait.pause(10000);
     server1.invoke(HABug36738DUnitTest.class, "checkRegionQueueSize");
     createServer2();
     server1.invoke(HABug36738DUnitTest.class, "checkRegionQueueSize");
@@ -113,7 +115,7 @@ public class HABug36738DUnitTest extends DistributedTestCase
     while (itr.hasNext()) {
       Object key = itr.next();
       ClientUpdateMessage value = (ClientUpdateMessage)region.get(key);
-      getLogWriter().info("key : " + key + "Value " + value.getValue());
+      LogWriterSupport.getLogWriter().info("key : " + key + "Value " + value.getValue());
 
     }
 
@@ -161,7 +163,7 @@ public class HABug36738DUnitTest extends DistributedTestCase
             new EventID(("memberID" + i).getBytes(), i, i));
 
         haRegion.put(new Long(i), clientMessage);
-        getLogWriter().info("Putting in the message Queue");
+        LogWriterSupport.getLogWriter().info("Putting in the message Queue");
 
       }
     }
@@ -190,7 +192,7 @@ public class HABug36738DUnitTest extends DistributedTestCase
     HARegion region = (HARegion)cache.getRegion(Region.SEPARATOR
         + HAHelper.getRegionQueueName(HAREGION_NAME));
     assertNotNull(region);
-    getLogWriter().info("Size of the Queue : " + region.size());
+    LogWriterSupport.getLogWriter().info("Size of the Queue : " + region.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/HAInterestPart1DUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/HAInterestPart1DUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/HAInterestPart1DUnitTest.java
index 52e23c0..3616f9b 100755
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/HAInterestPart1DUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/HAInterestPart1DUnitTest.java
@@ -17,6 +17,7 @@
 package com.gemstone.gemfire.internal.cache.tier.sockets;
 
 import com.gemstone.gemfire.test.dunit.IgnoredException;
+import com.gemstone.gemfire.test.dunit.NetworkSupport;
 import com.gemstone.gemfire.test.dunit.VM;
 
 @SuppressWarnings("serial")
@@ -30,7 +31,7 @@ public class HAInterestPart1DUnitTest extends HAInterestTestCase {
    * Tests whether interest is registered or not on both primary and secondaries
    */
   public void testInterestRegistrationOnBothPrimaryAndSecondary() throws Exception {
-    createClientPoolCache(this.getName(), getServerHostName(server1.getHost()));
+    createClientPoolCache(this.getName(), NetworkSupport.getServerHostName(server1.getHost()));
     createEntriesK1andK2();
     server1.invoke(HAInterestTestCase.class, "createEntriesK1andK2");
     server2.invoke(HAInterestTestCase.class, "createEntriesK1andK2");
@@ -47,7 +48,7 @@ public class HAInterestPart1DUnitTest extends HAInterestTestCase {
    * verify their responses
    */
   public void testInterestRegistrationResponseOnBothPrimaryAndSecondary() throws Exception {
-    createClientPoolCache(this.getName(), getServerHostName(server1.getHost()));
+    createClientPoolCache(this.getName(), NetworkSupport.getServerHostName(server1.getHost()));
     createEntriesK1andK2();
     server1.invoke(HAInterestTestCase.class, "createEntriesK1andK2");
     server2.invoke(HAInterestTestCase.class, "createEntriesK1andK2");
@@ -61,7 +62,7 @@ public class HAInterestPart1DUnitTest extends HAInterestTestCase {
    * interest map
    */
   public void testRERegistrationWillNotCreateDuplicateKeysOnServerInterstMaps() throws Exception {
-    createClientPoolCache(this.getName(), getServerHostName(server1.getHost()));
+    createClientPoolCache(this.getName(), NetworkSupport.getServerHostName(server1.getHost()));
     createEntriesK1andK2();
     server1.invoke(HAInterestTestCase.class, "createEntriesK1andK2");
     server2.invoke(HAInterestTestCase.class, "createEntriesK1andK2");
@@ -80,7 +81,7 @@ public class HAInterestPart1DUnitTest extends HAInterestTestCase {
    * registerInterest
    */
   public void testPrimaryFailureInRegisterInterest() throws Exception {
-    createClientPoolCache(this.getName(), getServerHostName(server1.getHost()));
+    createClientPoolCache(this.getName(), NetworkSupport.getServerHostName(server1.getHost()));
     createEntriesK1andK2();
     server1.invoke(HAInterestTestCase.class, "createEntriesK1andK2");
     server2.invoke(HAInterestTestCase.class, "createEntriesK1andK2");
@@ -101,7 +102,7 @@ public class HAInterestPart1DUnitTest extends HAInterestTestCase {
    * list
    */
   public void testSecondaryFailureInRegisterInterest() throws Exception {
-    createClientPoolCache(this.getName(), getServerHostName(server1.getHost()));
+    createClientPoolCache(this.getName(), NetworkSupport.getServerHostName(server1.getHost()));
     createEntriesK1andK2();
     server1.invoke(HAInterestTestCase.class, "createEntriesK1andK2");
     server2.invoke(HAInterestTestCase.class, "createEntriesK1andK2");
@@ -123,7 +124,7 @@ public class HAInterestPart1DUnitTest extends HAInterestTestCase {
    * registration on newly selected primary
    */
   public void testBothPrimaryAndSecondaryFailureInRegisterInterest() throws Exception {
-    createClientPoolCache(this.getName(), getServerHostName(server1.getHost()));
+    createClientPoolCache(this.getName(), NetworkSupport.getServerHostName(server1.getHost()));
     createEntriesK1andK2();
     server1.invoke(HAInterestTestCase.class, "createEntriesK1andK2");
     server2.invoke(HAInterestTestCase.class, "createEntriesK1andK2");
@@ -147,7 +148,7 @@ public class HAInterestPart1DUnitTest extends HAInterestTestCase {
    *
    */
   public void testProbablePrimaryFailureInRegisterInterest() throws Exception {
-    createClientPoolCache(this.getName(), getServerHostName(server1.getHost()));
+    createClientPoolCache(this.getName(), NetworkSupport.getServerHostName(server1.getHost()));
     createEntriesK1andK2();
     server1.invoke(HAInterestTestCase.class, "createEntriesK1andK2");
     server2.invoke(HAInterestTestCase.class, "createEntriesK1andK2");
@@ -167,10 +168,10 @@ public class HAInterestPart1DUnitTest extends HAInterestTestCase {
    * client ( create CCP) as welll as register IL
    */
   public void testInterstRegistrationOnRecoveredEPbyDSM() throws Exception {
-    IgnoredException.addExpectedException("SocketException");
-    IgnoredException.addExpectedException("Unexpected IOException");
+    IgnoredException.addIgnoredException("SocketException");
+    IgnoredException.addIgnoredException("Unexpected IOException");
 
-    createClientPoolCache(this.getName(), getServerHostName(server1.getHost()));
+    createClientPoolCache(this.getName(), NetworkSupport.getServerHostName(server1.getHost()));
     createEntriesK1andK2();
     registerK1AndK2();
     server1.invoke(HAInterestTestCase.class, "createEntriesK1andK2");

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/76e324b5/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/HAInterestPart2DUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/HAInterestPart2DUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/HAInterestPart2DUnitTest.java
index 9d4b286..b955d38 100755
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/HAInterestPart2DUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/HAInterestPart2DUnitTest.java
@@ -19,9 +19,11 @@ package com.gemstone.gemfire.internal.cache.tier.sockets;
 import com.gemstone.gemfire.cache.EntryDestroyedException;
 import com.gemstone.gemfire.cache.Region;
 import com.gemstone.gemfire.cache.client.ServerConnectivityException;
-import com.gemstone.gemfire.test.dunit.DistributedTestCase;
 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;
 
 @SuppressWarnings({"rawtypes", "serial"})
 public class HAInterestPart2DUnitTest extends HAInterestTestCase {
@@ -35,7 +37,7 @@ public class HAInterestPart2DUnitTest extends HAInterestTestCase {
    * failover should pick new primary
    */
   public void testPrimaryFailureInUNregisterInterest() throws Exception {
-    createClientPoolCache(this.getName(), getServerHostName(server1.getHost()));
+    createClientPoolCache(this.getName(), NetworkSupport.getServerHostName(server1.getHost()));
     createEntriesK1andK2();
     server1.invoke(HAInterestTestCase.class, "createEntriesK1andK2");
     server2.invoke(HAInterestTestCase.class, "createEntriesK1andK2");
@@ -61,7 +63,7 @@ public class HAInterestPart2DUnitTest extends HAInterestTestCase {
    * Ep list
    */
   public void testSecondaryFailureInUNRegisterInterest() throws Exception {
-    createClientPoolCache(this.getName(), getServerHostName(server1.getHost()));
+    createClientPoolCache(this.getName(), NetworkSupport.getServerHostName(server1.getHost()));
     createEntriesK1andK2();
     server1.invoke(HAInterestTestCase.class, "createEntriesK1andK2");
     server2.invoke(HAInterestTestCase.class, "createEntriesK1andK2");
@@ -83,7 +85,7 @@ public class HAInterestPart2DUnitTest extends HAInterestTestCase {
    * detected live server as well
    */
   public void testDSMDetectsServerLiveJustBeforeInterestRegistration() throws Exception {
-    createClientPoolCache(this.getName(), getServerHostName(server1.getHost()));
+    createClientPoolCache(this.getName(), NetworkSupport.getServerHostName(server1.getHost()));
     createEntriesK1andK2();
     server1.invoke(HAInterestTestCase.class, "createEntriesK1andK2");
     server2.invoke(HAInterestTestCase.class, "createEntriesK1andK2");
@@ -109,7 +111,7 @@ public class HAInterestPart2DUnitTest extends HAInterestTestCase {
    * detected live server as well
    */
   public void testDSMDetectsServerLiveJustAfterInterestRegistration() throws Exception {
-    createClientPoolCache(this.getName(), getServerHostName(server1.getHost()));
+    createClientPoolCache(this.getName(), NetworkSupport.getServerHostName(server1.getHost()));
 
     createEntriesK1andK2();
     server1.invoke(HAInterestTestCase.class, "createEntriesK1andK2");
@@ -141,11 +143,11 @@ public class HAInterestPart2DUnitTest extends HAInterestTestCase {
    * is primary
    */
   public void testRefreshEntriesFromPrimaryWhenDSMDetectsServerLive() throws Exception {
-    IgnoredException.addExpectedException(ServerConnectivityException.class.getName());
+    IgnoredException.addIgnoredException(ServerConnectivityException.class.getName());
     
     PORT1 = ((Integer) server1.invoke(HAInterestTestCase.class, "createServerCache")).intValue();
     server1.invoke(HAInterestTestCase.class, "createEntriesK1andK2");
-    createClientPoolCacheConnectionToSingleServer(this.getName(), getServerHostName(server1.getHost()));
+    createClientPoolCacheConnectionToSingleServer(this.getName(), NetworkSupport.getServerHostName(server1.getHost()));
     registerK1AndK2();
     verifyRefreshedEntriesFromServer();
 
@@ -201,7 +203,7 @@ public class HAInterestPart2DUnitTest extends HAInterestTestCase {
         return excuse;
       }
     };
-    DistributedTestCase.waitForCriterion(wc, TIMEOUT_MILLIS, INTERVAL_MILLIS, true);
+    Wait.waitForCriterion(wc, TIMEOUT_MILLIS, INTERVAL_MILLIS, true);
   }
 
   /**
@@ -223,7 +225,7 @@ public class HAInterestPart2DUnitTest extends HAInterestTestCase {
     server2.invoke(HAInterestTestCase.class, "createEntriesK1andK2");
     server3.invoke(HAInterestTestCase.class, "createEntriesK1andK2");
 
-    createClientPoolCache(this.getName(), getServerHostName(server1.getHost()));
+    createClientPoolCache(this.getName(), NetworkSupport.getServerHostName(server1.getHost()));
 
     VM backup1 = getBackupVM();
     VM backup2 = getBackupVM(backup1);
@@ -248,7 +250,7 @@ public class HAInterestPart2DUnitTest extends HAInterestTestCase {
   public void testBug35945() throws Exception {
     PORT1 = ((Integer) server1.invoke(HAInterestTestCase.class, "createServerCache")).intValue();
     server1.invoke(HAInterestTestCase.class, "createEntriesK1andK2");
-    createClientPoolCacheConnectionToSingleServer(this.getName(), getServerHostName(server1.getHost()));
+    createClientPoolCacheConnectionToSingleServer(this.getName(), NetworkSupport.getServerHostName(server1.getHost()));
     registerK1AndK2();
     verifyRefreshedEntriesFromServer();
 
@@ -304,7 +306,7 @@ public class HAInterestPart2DUnitTest extends HAInterestTestCase {
         return excuse;
       }
     };
-    DistributedTestCase.waitForCriterion(wc, TIMEOUT_MILLIS, INTERVAL_MILLIS, true);
+    Wait.waitForCriterion(wc, TIMEOUT_MILLIS, INTERVAL_MILLIS, true);
   }
 
   /**
@@ -312,13 +314,13 @@ public class HAInterestPart2DUnitTest extends HAInterestTestCase {
    * new endpoint to register interest
    */
   public void testInterestRecoveryFailure() throws Exception {
-    IgnoredException.addExpectedException("Server unreachable");
+    IgnoredException.addIgnoredException("Server unreachable");
     
     PORT1 = ((Integer) server1.invoke(HAInterestTestCase.class, "createServerCache")).intValue();
     server1.invoke(HAInterestTestCase.class, "createEntriesK1andK2");
     PORT2 = ((Integer) server2.invoke(HAInterestTestCase.class, "createServerCache")).intValue();
     server2.invoke(HAInterestTestCase.class, "createEntriesK1andK2");
-    createClientPoolCacheWithSmallRetryInterval(this.getName(), getServerHostName(server1.getHost()));
+    createClientPoolCacheWithSmallRetryInterval(this.getName(), NetworkSupport.getServerHostName(server1.getHost()));
     registerK1AndK2();
     verifyRefreshedEntriesFromServer();
     VM backup = getBackupVM();
@@ -369,6 +371,6 @@ public class HAInterestPart2DUnitTest extends HAInterestTestCase {
         return excuse;
       }
     };
-    DistributedTestCase.waitForCriterion(wc, TIMEOUT_MILLIS, INTERVAL_MILLIS, true);
+    Wait.waitForCriterion(wc, TIMEOUT_MILLIS, INTERVAL_MILLIS, true);
   }
 }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/76e324b5/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/HAInterestTestCase.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/HAInterestTestCase.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/HAInterestTestCase.java
index 58ee502..0de43ae 100755
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/HAInterestTestCase.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/HAInterestTestCase.java
@@ -42,7 +42,11 @@ import com.gemstone.gemfire.internal.cache.tier.InterestType;
 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.Threads;
 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.junit.categories.IntegrationTest;
 
 import java.io.IOException;
@@ -109,7 +113,7 @@ public class HAInterestTestCase extends DistributedTestCase {
     PORT2 = ((Integer) server2.invoke(HAInterestTestCase.class, "createServerCache")).intValue();
     PORT3 = ((Integer) server3.invoke(HAInterestTestCase.class, "createServerCache")).intValue();
     exceptionOccured = false;
-    IgnoredException.addExpectedException("java.net.ConnectException: Connection refused: connect");
+    IgnoredException.addIgnoredException("java.net.ConnectException: Connection refused: connect");
   }
 
   @Override
@@ -176,7 +180,7 @@ public class HAInterestTestCase extends DistributedTestCase {
         return "waiting for primary";
       }
     };
-    DistributedTestCase.waitForCriterion(wc, TIMEOUT_MILLIS, INTERVAL_MILLIS, true);
+    Wait.waitForCriterion(wc, TIMEOUT_MILLIS, INTERVAL_MILLIS, true);
 
     int primaryPort = pool.getPrimaryPort();
     assertTrue(primaryPort != -1);
@@ -257,7 +261,7 @@ public class HAInterestTestCase extends DistributedTestCase {
         return "waiting for client_k1 refresh from server";
       }
     };
-    DistributedTestCase.waitForCriterion(wc, TIMEOUT_MILLIS, INTERVAL_MILLIS, true);
+    Wait.waitForCriterion(wc, TIMEOUT_MILLIS, INTERVAL_MILLIS, true);
 
     wc = new WaitCriterion() {
       @Override
@@ -273,7 +277,7 @@ public class HAInterestTestCase extends DistributedTestCase {
         return "waiting for client_k2 refresh from server";
       }
     };
-    DistributedTestCase.waitForCriterion(wc, TIMEOUT_MILLIS, INTERVAL_MILLIS, true);
+    Wait.waitForCriterion(wc, TIMEOUT_MILLIS, INTERVAL_MILLIS, true);
   }
 
   public static void verifyDeadAndLiveServers(final int expectedDeadServers, final int expectedLiveServers) {
@@ -287,7 +291,7 @@ public class HAInterestTestCase extends DistributedTestCase {
         return "waiting for pool.getConnectedServerCount() == expectedLiveServer";
       }
     };
-    DistributedTestCase.waitForCriterion(wc, TIMEOUT_MILLIS, INTERVAL_MILLIS, true);
+    Wait.waitForCriterion(wc, TIMEOUT_MILLIS, INTERVAL_MILLIS, true);
   }
 
   public static void putK1andK2() {
@@ -310,7 +314,7 @@ public class HAInterestTestCase extends DistributedTestCase {
           };
           t.start();
           try {
-            DistributedTestCase.join(t, 30 * 1000, getLogWriter());
+            Threads.join(t, 30 * 1000, LogWriterSupport.getLogWriter());
           } catch (Exception ignore) {
             exceptionOccured = true;
           }
@@ -423,7 +427,7 @@ public class HAInterestTestCase extends DistributedTestCase {
         return "waiting for cache.getCacheServers().size() == 1";
       }
     };
-    DistributedTestCase.waitForCriterion(wc, TIMEOUT_MILLIS, INTERVAL_MILLIS, true);
+    Wait.waitForCriterion(wc, TIMEOUT_MILLIS, INTERVAL_MILLIS, true);
 
     CacheServerImpl bs = (CacheServerImpl) cache.getCacheServers().iterator().next();
     assertNotNull(bs);
@@ -441,7 +445,7 @@ public class HAInterestTestCase extends DistributedTestCase {
         return "waiting for ccn.getClientProxies().size() > 0";
       }
     };
-    DistributedTestCase.waitForCriterion(wc, TIMEOUT_MILLIS, INTERVAL_MILLIS, true);
+    Wait.waitForCriterion(wc, TIMEOUT_MILLIS, INTERVAL_MILLIS, true);
 
     wc = new WaitCriterion() {
       Iterator iter_prox;
@@ -463,7 +467,7 @@ public class HAInterestTestCase extends DistributedTestCase {
         return "waiting for CacheClientProxy _messageDispatcher to be alive";
       }
     };
-    DistributedTestCase.waitForCriterion(wc, TIMEOUT_MILLIS, INTERVAL_MILLIS, true);
+    Wait.waitForCriterion(wc, TIMEOUT_MILLIS, INTERVAL_MILLIS, true);
   }
 
   public static void verifyDispatcherIsNotAlive() {
@@ -477,7 +481,7 @@ public class HAInterestTestCase extends DistributedTestCase {
         return "cache.getCacheServers().size() == 1";
       }
     };
-    DistributedTestCase.waitForCriterion(wc, TIMEOUT_MILLIS, INTERVAL_MILLIS, true);
+    Wait.waitForCriterion(wc, TIMEOUT_MILLIS, INTERVAL_MILLIS, true);
 
     CacheServerImpl bs = (CacheServerImpl) cache.getCacheServers().iterator().next();
     assertNotNull(bs);
@@ -495,7 +499,7 @@ public class HAInterestTestCase extends DistributedTestCase {
         return "waiting for ccn.getClientProxies().size() > 0";
       }
     };
-    DistributedTestCase.waitForCriterion(wc, TIMEOUT_MILLIS, INTERVAL_MILLIS, true);
+    Wait.waitForCriterion(wc, TIMEOUT_MILLIS, INTERVAL_MILLIS, true);
 
     Iterator iter_prox = ccn.getClientProxies().iterator();
     if (iter_prox.hasNext()) {
@@ -591,7 +595,7 @@ public class HAInterestTestCase extends DistributedTestCase {
         return "connected server count never became 3";
       }
     };
-    DistributedTestCase.waitForCriterion(wc, TIMEOUT_MILLIS, INTERVAL_MILLIS, true);
+    Wait.waitForCriterion(wc, TIMEOUT_MILLIS, INTERVAL_MILLIS, true);
 
     // close primaryEP
     getPrimaryVM().invoke(HAInterestTestCase.class, "stopServer");
@@ -621,7 +625,7 @@ public class HAInterestTestCase extends DistributedTestCase {
         return "connected server count never became 3";
       }
     };
-    DistributedTestCase.waitForCriterion(wc, TIMEOUT_MILLIS, INTERVAL_MILLIS, true);
+    Wait.waitForCriterion(wc, TIMEOUT_MILLIS, INTERVAL_MILLIS, true);
 
     // close primaryEP
     getPrimaryVM().invoke(HAInterestTestCase.class, "stopServer");
@@ -645,7 +649,7 @@ public class HAInterestTestCase extends DistributedTestCase {
         return "connected server count never became 3";
       }
     };
-    DistributedTestCase.waitForCriterion(wc, TIMEOUT_MILLIS, INTERVAL_MILLIS, true);
+    Wait.waitForCriterion(wc, TIMEOUT_MILLIS, INTERVAL_MILLIS, true);
 
     // close primaryEP
     VM backup = getBackupVM();
@@ -682,7 +686,7 @@ public class HAInterestTestCase extends DistributedTestCase {
         return "Never got three connected servers";
       }
     };
-    DistributedTestCase.waitForCriterion(wc, TIMEOUT_MILLIS, INTERVAL_MILLIS, true);
+    Wait.waitForCriterion(wc, TIMEOUT_MILLIS, INTERVAL_MILLIS, true);
 
     // close secondary EP
     VM result = getBackupVM();
@@ -718,7 +722,7 @@ public class HAInterestTestCase extends DistributedTestCase {
         return "connected server count never became 3";
       }
     };
-    DistributedTestCase.waitForCriterion(wc, TIMEOUT_MILLIS, INTERVAL_MILLIS, true);
+    Wait.waitForCriterion(wc, TIMEOUT_MILLIS, INTERVAL_MILLIS, true);
 
     // close secondary EP
     VM result = getBackupVM();
@@ -768,7 +772,7 @@ public class HAInterestTestCase extends DistributedTestCase {
         return "waiting for cache.getCacheServers().size() == 1";
       }
     };
-    DistributedTestCase.waitForCriterion(wc, TIMEOUT_MILLIS, INTERVAL_MILLIS, true);
+    Wait.waitForCriterion(wc, TIMEOUT_MILLIS, INTERVAL_MILLIS, true);
 
     CacheServerImpl bs = (CacheServerImpl) cache.getCacheServers().iterator().next();
     assertNotNull(bs);
@@ -786,7 +790,7 @@ public class HAInterestTestCase extends DistributedTestCase {
         return "waiting for ccn.getClientProxies().size() > 0";
       }
     };
-    DistributedTestCase.waitForCriterion(wc, TIMEOUT_MILLIS, INTERVAL_MILLIS, true);
+    Wait.waitForCriterion(wc, TIMEOUT_MILLIS, INTERVAL_MILLIS, true);
 
     Iterator iter_prox = ccn.getClientProxies().iterator();
 
@@ -806,7 +810,7 @@ public class HAInterestTestCase extends DistributedTestCase {
           return "waiting for keys of interest to include 2 keys";
         }
       };
-      DistributedTestCase.waitForCriterion(wc, TIMEOUT_MILLIS, INTERVAL_MILLIS, true);
+      Wait.waitForCriterion(wc, TIMEOUT_MILLIS, INTERVAL_MILLIS, true);
 
       Set keysMap = (Set) ccp.cils[RegisterInterestTracker.interestListIndex].getProfile(Region.SEPARATOR + REGION_NAME)
           .getKeysOfInterestFor(ccp.getProxyID());
@@ -828,7 +832,7 @@ public class HAInterestTestCase extends DistributedTestCase {
         return "waiting for cache.getCacheServers().size() == 1";
       }
     };
-    DistributedTestCase.waitForCriterion(wc, TIMEOUT_MILLIS, INTERVAL_MILLIS, true);
+    Wait.waitForCriterion(wc, TIMEOUT_MILLIS, INTERVAL_MILLIS, true);
 
     CacheServerImpl bs = (CacheServerImpl) cache.getCacheServers().iterator().next();
     assertNotNull(bs);
@@ -846,7 +850,7 @@ public class HAInterestTestCase extends DistributedTestCase {
         return "waiting for ccn.getClientProxies().size() > 0";
       }
     };
-    DistributedTestCase.waitForCriterion(wc, TIMEOUT_MILLIS, INTERVAL_MILLIS, true);
+    Wait.waitForCriterion(wc, TIMEOUT_MILLIS, INTERVAL_MILLIS, true);
 
     Iterator iter_prox = ccn.getClientProxies().iterator();
     if (iter_prox.hasNext()) {
@@ -865,7 +869,7 @@ public class HAInterestTestCase extends DistributedTestCase {
           return "waiting for keys of interest to not be null";
         }
       };
-      DistributedTestCase.waitForCriterion(wc, TIMEOUT_MILLIS, INTERVAL_MILLIS, true);
+      Wait.waitForCriterion(wc, TIMEOUT_MILLIS, INTERVAL_MILLIS, true);
 
       Set keysMap = (Set) ccp.cils[RegisterInterestTracker.interestListIndex]
           .getProfile(Region.SEPARATOR + REGION_NAME)


Mime
View raw message