geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kl...@apache.org
Subject [25/44] incubator-geode git commit: Refactor dunit
Date Tue, 02 Feb 2016 20:21:32 GMT
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/76e324b5/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRClientServerTestBase.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRClientServerTestBase.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRClientServerTestBase.java
index 739deb5..c6d6472 100755
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRClientServerTestBase.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRClientServerTestBase.java
@@ -52,11 +52,13 @@ import com.gemstone.gemfire.internal.AvailablePort;
 import com.gemstone.gemfire.internal.cache.functions.TestFunction;
 import com.gemstone.gemfire.internal.cache.tier.sockets.CacheServerTestUtil;
 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.SerializableRunnable;
 import com.gemstone.gemfire.test.dunit.VM;
-import com.gemstone.gemfire.test.dunit.DistributedTestCase.WaitCriterion;
+import com.gemstone.gemfire.test.dunit.Wait;
+import com.gemstone.gemfire.test.dunit.WaitCriterion;
 
 public class PRClientServerTestBase extends CacheTestCase {
 
@@ -410,7 +412,7 @@ public class PRClientServerTestBase extends CacheTestCase {
   public static void createCacheClientWithoutRegion(String host, Integer port1,
       Integer port2, Integer port3) throws Exception {
     CacheServerTestUtil.disableShufflingOfEndpoints();
-    getLogWriter().info("PRClientServerTestBase#createCacheClientWithoutRegion : creating pool");
+    LogWriterSupport.getLogWriter().info("PRClientServerTestBase#createCacheClientWithoutRegion : creating pool");
     serverPort1 = port1;
     serverPort2 = port2;
     serverPort3 = port3;
@@ -433,7 +435,7 @@ public class PRClientServerTestBase extends CacheTestCase {
   public static void createCacheClientWithDistributedRegion(String host, Integer port1,
       Integer port2, Integer port3) throws Exception {
     CacheServerTestUtil.disableShufflingOfEndpoints();
-    getLogWriter().info("PRClientServerTestBase#createCacheClientWithoutRegion : creating pool");
+    LogWriterSupport.getLogWriter().info("PRClientServerTestBase#createCacheClientWithoutRegion : creating pool");
     serverPort1 = port1;
     serverPort2 = port2;
     serverPort3 = port3;
@@ -475,7 +477,7 @@ public class PRClientServerTestBase extends CacheTestCase {
     serverPort2 = port2;
     serverPort3 = port3;
     client.invoke(PRClientServerTestBase.class, "createCacheClient",
-        new Object[] { getServerHostName(server1.getHost()), port1, port2,
+        new Object[] { NetworkSupport.getServerHostName(server1.getHost()), port1, port2,
             port3 });
   }
 
@@ -490,7 +492,7 @@ public class PRClientServerTestBase extends CacheTestCase {
         new Object[] {commonAttributes ,new Integer(localMaxMemoryServer2) });
     serverPort1 = port1;
     client.invoke(PRClientServerTestBase.class, "createCacheClient_SingleConnection",
-        new Object[] { getServerHostName(server1.getHost()), port1});
+        new Object[] { NetworkSupport.getServerHostName(server1.getHost()), port1});
   }
   
   
@@ -511,7 +513,7 @@ public class PRClientServerTestBase extends CacheTestCase {
     serverPort2 = port2;
     serverPort3 = port3;
     client.invoke(PRClientServerTestBase.class, "createCacheClientWith2Regions",
-        new Object[] { getServerHostName(server1.getHost()), port1, port2,
+        new Object[] { NetworkSupport.getServerHostName(server1.getHost()), port1, port2,
             port3 });
   }
 
@@ -560,7 +562,7 @@ public class PRClientServerTestBase extends CacheTestCase {
     serverPort2 = port2;
     serverPort3 = port3;
     client.invoke(PRClientServerTestBase.class, "createNoSingleHopCacheClient",
-        new Object[] { getServerHostName(server1.getHost()), port1, port2,
+        new Object[] { NetworkSupport.getServerHostName(server1.getHost()), port1, port2,
             port3 });
   }
   
@@ -580,13 +582,13 @@ public class PRClientServerTestBase extends CacheTestCase {
     serverPort2 = port2;
     serverPort3 = port3;
     client.invoke(PRClientServerTestBase.class, "createNoSingleHopCacheClient",
-        new Object[] { getServerHostName(server1.getHost()), port1, port2,
+        new Object[] { NetworkSupport.getServerHostName(server1.getHost()), port1, port2,
             port3 });
   }
 
   
   protected void createClientServerScenarionWithoutRegion () {
-    getLogWriter().info("PRClientServerTestBase#createClientServerScenarionWithoutRegion : creating client server");
+    LogWriterSupport.getLogWriter().info("PRClientServerTestBase#createClientServerScenarionWithoutRegion : creating client server");
     createCacheInClientServer();
     Integer port1 = (Integer)server1.invoke(PRClientServerTestBase.class,
         "createCacheServer");
@@ -599,12 +601,12 @@ public class PRClientServerTestBase extends CacheTestCase {
     serverPort3 = port3;
     
     client.invoke(PRClientServerTestBase.class, "createCacheClientWithoutRegion",
-        new Object[] { getServerHostName(server1.getHost()), port1, port2,
+        new Object[] { NetworkSupport.getServerHostName(server1.getHost()), port1, port2,
             port3 });    
   }
   
   protected void createClientServerScenarionWithDistributedtRegion () {
-    getLogWriter().info("PRClientServerTestBase#createClientServerScenarionWithoutRegion : creating client server");
+    LogWriterSupport.getLogWriter().info("PRClientServerTestBase#createClientServerScenarionWithoutRegion : creating client server");
     createCacheInClientServer();
     Integer port1 = (Integer)server1.invoke(PRClientServerTestBase.class,
         "createCacheServerWithDR");
@@ -618,7 +620,7 @@ public class PRClientServerTestBase extends CacheTestCase {
     
     
     client.invoke(PRClientServerTestBase.class, "createCacheClientWithDistributedRegion",
-        new Object[] { getServerHostName(server1.getHost()), port1, port2,
+        new Object[] { NetworkSupport.getServerHostName(server1.getHost()), port1, port2,
             port3 });    
   }
 
@@ -692,13 +694,13 @@ public class PRClientServerTestBase extends CacheTestCase {
         return excuse;
       }
     };
-    DistributedTestCase.waitForCriterion(wc, 2000, 500, false);
+    Wait.waitForCriterion(wc, 2000, 500, false);
     Collection bridgeServers = cache.getCacheServers();
-    getLogWriter().info(
+    LogWriterSupport.getLogWriter().info(
         "Start Server Bridge Servers list : " + bridgeServers.size());
     Iterator bridgeIterator = bridgeServers.iterator();
     CacheServer bridgeServer = (CacheServer)bridgeIterator.next();
-    getLogWriter().info("start Server Bridge Server" + bridgeServer);
+    LogWriterSupport.getLogWriter().info("start Server Bridge Server" + bridgeServer);
     try {
       bridgeServer.start();
     }
@@ -719,7 +721,7 @@ public class PRClientServerTestBase extends CacheTestCase {
         return excuse;
       }
     };
-    DistributedTestCase.waitForCriterion(wc, 1000, 200, false);
+    Wait.waitForCriterion(wc, 1000, 200, false);
     try {
       Iterator iter = cache.getCacheServers().iterator();
       if (iter.hasNext()) {
@@ -760,7 +762,7 @@ public class PRClientServerTestBase extends CacheTestCase {
         return excuse;
       }
     };
-    DistributedTestCase.waitForCriterion(wc, 1000, 200, false);
+    Wait.waitForCriterion(wc, 1000, 200, false);
     if (cache != null && !cache.isClosed()) {
       cache.close();
     }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/76e324b5/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRColocationDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRColocationDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRColocationDUnitTest.java
index 90f9aef..893a182 100755
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRColocationDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRColocationDUnitTest.java
@@ -63,10 +63,13 @@ import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
 import com.gemstone.gemfire.test.dunit.Assert;
 import com.gemstone.gemfire.test.dunit.AsyncInvocation;
 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.SerializableCallable;
 import com.gemstone.gemfire.test.dunit.SerializableRunnable;
 import com.gemstone.gemfire.test.dunit.VM;
+import com.gemstone.gemfire.test.dunit.Wait;
 /**
  * This is the test for the custom and colocated partitioning of
  * PartitionedRegion
@@ -714,14 +717,14 @@ public class PRColocationDUnitTest extends CacheTestCase {
         assertNotNull(basicGetCache());
         Region pr = basicGetCache().createRegion(partitionedRegionName, attr.create());
         assertNotNull(pr);
-        getLogWriter().info(
+        LogWriterSupport.getLogWriter().info(
             "Partitioned Region " + partitionedRegionName
                 + " created Successfully :" + pr.toString());
       }
     });
 
     // add expected exception string
-    final IgnoredException ex = IgnoredException.addExpectedException(
+    final IgnoredException ex = IgnoredException.addIgnoredException(
         "Colocated regions should have accessors at the same node", dataStore1);
     dataStore1.invoke(new CacheSerializableRunnable(
         "Colocated PR with Accessor on different nodes") {
@@ -751,7 +754,7 @@ public class PRColocationDUnitTest extends CacheTestCase {
         }
         catch (Exception Expected) {
           Expected.printStackTrace();
-          getLogWriter().info("Expected Message : " + Expected.getMessage());
+          LogWriterSupport.getLogWriter().info("Expected Message : " + Expected.getMessage());
           assertTrue(Expected.getMessage().startsWith(
               "Colocated regions should have accessors at the same node"));
         }
@@ -786,14 +789,14 @@ public class PRColocationDUnitTest extends CacheTestCase {
         assertNotNull(basicGetCache());
         Region pr = basicGetCache().createRegion(partitionedRegionName, attr.create());
         assertNotNull(pr);
-        getLogWriter().info(
+        LogWriterSupport.getLogWriter().info(
             "Partitioned Region " + partitionedRegionName
                 + " created Successfully :" + pr.toString());
       }
     });
 
     // add expected exception string
-    final IgnoredException ex = IgnoredException.addExpectedException(
+    final IgnoredException ex = IgnoredException.addIgnoredException(
         "Colocated regions should have accessors at the same node", dataStore1);
     dataStore1.invoke(new CacheSerializableRunnable(
         "Colocated PR with accessor on different nodes") {
@@ -822,7 +825,7 @@ public class PRColocationDUnitTest extends CacheTestCase {
               + "should have accessors at the same node");
         }
         catch (Exception Expected) {
-          getLogWriter().info("Expected Message : " + Expected.getMessage());
+          LogWriterSupport.getLogWriter().info("Expected Message : " + Expected.getMessage());
           assertTrue(Expected.getMessage().startsWith(
               "Colocated regions should have accessors at the same node"));
         }
@@ -857,7 +860,7 @@ public class PRColocationDUnitTest extends CacheTestCase {
         assertNotNull(basicGetCache());
         Region pr = basicGetCache().createRegion(partitionedRegionName, attr.create());
         assertNotNull(pr);
-        getLogWriter().info(
+        LogWriterSupport.getLogWriter().info(
             "Partitioned Region " + partitionedRegionName
                 + " created Successfully :" + pr.toString());
       }
@@ -885,14 +888,14 @@ public class PRColocationDUnitTest extends CacheTestCase {
         assertNotNull(basicGetCache());
         Region pr = basicGetCache().createRegion(partitionedRegionName, attr.create());
         assertNotNull(pr);
-        getLogWriter().info(
+        LogWriterSupport.getLogWriter().info(
             "Partitioned Region " + partitionedRegionName
                 + " created Successfully :" + pr.toString());
       }
     });
 
     // add expected exception string
-    final IgnoredException ex = IgnoredException.addExpectedException("Cannot create buckets",
+    final IgnoredException ex = IgnoredException.addIgnoredException("Cannot create buckets",
         dataStore2);
     dataStore2.invoke(new CacheSerializableRunnable(
         "Colocated PR with PR on different node") {
@@ -924,7 +927,7 @@ public class PRColocationDUnitTest extends CacheTestCase {
               + "as colocated regions are not configured to be at the same nodes.");
         }
         catch (Exception Expected) {
-          getLogWriter().info("Expected Message : " + Expected.getMessage());
+          LogWriterSupport.getLogWriter().info("Expected Message : " + Expected.getMessage());
           assertTrue(Expected.getMessage().contains("Cannot create buckets, as "
               + "colocated regions are not configured to be at the same nodes."));
         }
@@ -960,7 +963,7 @@ public class PRColocationDUnitTest extends CacheTestCase {
         }
         catch (Exception NotExpected) {
           NotExpected.printStackTrace();
-          getLogWriter().info(
+          LogWriterSupport.getLogWriter().info(
               "Unexpected Exception Message : " + NotExpected.getMessage());
           Assert.fail("Unpexpected Exception" , NotExpected);
         }
@@ -1001,7 +1004,7 @@ public class PRColocationDUnitTest extends CacheTestCase {
     // add expected exception string
     final String expectedExMessage =
       "Any Region in colocation chain cannot be destroyed locally.";
-    final IgnoredException ex = IgnoredException.addExpectedException(expectedExMessage,
+    final IgnoredException ex = IgnoredException.addIgnoredException(expectedExMessage,
         dataStore1);
     dataStore1.invoke(new CacheSerializableRunnable(
         "PR with Local destroy") {
@@ -1015,7 +1018,7 @@ public class PRColocationDUnitTest extends CacheTestCase {
               + expectedExMessage);
         }
         catch (Exception Expected) {
-          getLogWriter().info("Expected Messageee : " + Expected.getMessage());
+          LogWriterSupport.getLogWriter().info("Expected Messageee : " + Expected.getMessage());
           assertTrue(Expected.getMessage().contains(expectedExMessage));
         }
       }
@@ -1033,7 +1036,7 @@ public class PRColocationDUnitTest extends CacheTestCase {
               + expectedExMessage);
         }
         catch (Exception Expected) {
-          getLogWriter().info("Expected Messageee : " + Expected.getMessage());
+          LogWriterSupport.getLogWriter().info("Expected Messageee : " + Expected.getMessage());
           assertTrue(Expected.getMessage().contains(expectedExMessage));
         }
       }
@@ -1079,7 +1082,7 @@ public class PRColocationDUnitTest extends CacheTestCase {
     // add expected exception string
     final String expectedExMessage = "colocation chain cannot be destroyed, "
         + "unless all its children";
-    final IgnoredException ex = IgnoredException.addExpectedException(expectedExMessage,
+    final IgnoredException ex = IgnoredException.addIgnoredException(expectedExMessage,
         dataStore1);
     dataStore1.invoke(new CacheSerializableRunnable(
         "PR with destroy") {
@@ -1093,7 +1096,7 @@ public class PRColocationDUnitTest extends CacheTestCase {
               + expectedExMessage);
         }
         catch (IllegalStateException expected) {
-          getLogWriter().info("Got message: " + expected.getMessage());
+          LogWriterSupport.getLogWriter().info("Got message: " + expected.getMessage());
           assertTrue(expected.getMessage().contains(expectedExMessage));
         }
       }
@@ -1111,7 +1114,7 @@ public class PRColocationDUnitTest extends CacheTestCase {
         }
         catch (Exception unexpected) {
           unexpected.printStackTrace();
-          getLogWriter().info("Unexpected Message: " + unexpected.getMessage());
+          LogWriterSupport.getLogWriter().info("Unexpected Message: " + unexpected.getMessage());
           fail("Could not destroy the child region.");
         }
       }
@@ -1128,7 +1131,7 @@ public class PRColocationDUnitTest extends CacheTestCase {
         }
         catch (Exception unexpected) {
           unexpected.printStackTrace();
-          getLogWriter().info("Unexpected Message: " + unexpected.getMessage());
+          LogWriterSupport.getLogWriter().info("Unexpected Message: " + unexpected.getMessage());
           fail("Could not destroy the parent region.");
         }
       }
@@ -1223,7 +1226,7 @@ public class PRColocationDUnitTest extends CacheTestCase {
               DummyKeyBasedRoutingResolver dummy = new DummyKeyBasedRoutingResolver(1);
               prForCustomer.put(dummy, new Integer(100));
               assertEquals(prForCustomer.get(dummy), new Integer(100));
-              getLogWriter().info(
+              LogWriterSupport.getLogWriter().info(
                   "Key :" + dummy.dummyID + " Value :"
                       + prForCustomer.get(dummy));
 
@@ -1232,14 +1235,14 @@ public class PRColocationDUnitTest extends CacheTestCase {
               assertNotNull(prForOrder);
               prForOrder.put(dummy, new Integer(200));
               assertEquals(prForOrder.get(dummy), new Integer(200));
-              getLogWriter().info(
+              LogWriterSupport.getLogWriter().info(
                   "Key :" + dummy.dummyID + " Value :" + prForOrder.get(dummy));
               return null;
             }
           });
     } catch (Exception unexpected) {
       unexpected.printStackTrace();
-      getLogWriter().info("Unexpected Message: " + unexpected.getMessage());
+      LogWriterSupport.getLogWriter().info("Unexpected Message: " + unexpected.getMessage());
       fail("Test failed");
     }
   }
@@ -1515,7 +1518,7 @@ public class PRColocationDUnitTest extends CacheTestCase {
       @Override
       public void run2() throws CacheException {
         getCache();
-        IgnoredException.addExpectedException("redundancy should be same as the redundancy");
+        IgnoredException.addIgnoredException("redundancy should be same as the redundancy");
         createPR(rName, red1, Integer.valueOf(100), Integer.valueOf(3), null, Boolean.FALSE, Boolean.FALSE);
         try {
           createPR(rName+"colo", red0, Integer.valueOf(100), Integer.valueOf(3), rName, Boolean.FALSE, Boolean.FALSE);
@@ -1755,7 +1758,7 @@ public class PRColocationDUnitTest extends CacheTestCase {
         assertEquals(2, region.getDataStore().getAllLocalPrimaryBucketIds().size());
       }
     };
-    pause(5000);
+    Wait.pause(5000);
     dataStore1.invoke(checkForBuckets_ForOrder);
     
     dataStore2.invoke(PRColocationDUnitTest.class, "createPR", attributeObjects1);
@@ -1885,7 +1888,7 @@ public class PRColocationDUnitTest extends CacheTestCase {
       throw async2.getException();
     }
     
-    pause(5000);
+    Wait.pause(5000);
     SerializableRunnable checkForBuckets_ForOrder = new SerializableRunnable("check for buckets") {
       public void run() {
         PartitionedRegion region = (PartitionedRegion) basicGetCache().getRegion(OrderPartitionedRegionName);
@@ -2069,13 +2072,13 @@ public class PRColocationDUnitTest extends CacheTestCase {
       }
       Iterator primaryBucketIterator = primaryBucketListForCustomer.iterator();
       while (primaryBucketIterator.hasNext()) {
-        getLogWriter().info("Primary Bucket : " + primaryBucketIterator.next());
+        LogWriterSupport.getLogWriter().info("Primary Bucket : " + primaryBucketIterator.next());
 
       }
       Iterator SecondaryBucketIterator = secondaryBucketListForCustomer
           .iterator();
       while (SecondaryBucketIterator.hasNext()) {
-        getLogWriter().info(
+        LogWriterSupport.getLogWriter().info(
             "Secondary Bucket : " + SecondaryBucketIterator.next());
       }
     }
@@ -2116,12 +2119,12 @@ public class PRColocationDUnitTest extends CacheTestCase {
       }
       Iterator primaryBucketIterator = primaryBucketListForOrder.iterator();
       while (primaryBucketIterator.hasNext()) {
-        getLogWriter().info("Primary Bucket : " + primaryBucketIterator.next());
+        LogWriterSupport.getLogWriter().info("Primary Bucket : " + primaryBucketIterator.next());
 
       }
       Iterator SecondaryBucketIterator = secondaryBucketListForOrder.iterator();
       while (SecondaryBucketIterator.hasNext()) {
-        getLogWriter().info(
+        LogWriterSupport.getLogWriter().info(
             "Secondary Bucket : " + SecondaryBucketIterator.next());
       }
     }
@@ -2162,13 +2165,13 @@ public class PRColocationDUnitTest extends CacheTestCase {
       }
       Iterator primaryBucketIterator = primaryBucketListForShipment.iterator();
       while (primaryBucketIterator.hasNext()) {
-        getLogWriter().info("Primary Bucket : " + primaryBucketIterator.next());
+        LogWriterSupport.getLogWriter().info("Primary Bucket : " + primaryBucketIterator.next());
 
       }
       Iterator SecondaryBucketIterator = secondaryBucketListForShipment
           .iterator();
       while (SecondaryBucketIterator.hasNext()) {
-        getLogWriter().info(
+        LogWriterSupport.getLogWriter().info(
             "Secondary Bucket : " + SecondaryBucketIterator.next());
       }
     }
@@ -2208,10 +2211,10 @@ public class PRColocationDUnitTest extends CacheTestCase {
     HashMap localBucket2RegionMap = (HashMap)customerPartitionedregion
         .getDataStore().getSizeLocally();
     int customerBucketSize = localBucket2RegionMap.size();
-    getLogWriter().info(
+    LogWriterSupport.getLogWriter().info(
         "Size of the " + customerPartitionedRegionName + " in this VM :- "
             + localBucket2RegionMap.size());
-    getLogWriter().info(
+    LogWriterSupport.getLogWriter().info(
         "Size of primary buckets the " + customerPartitionedRegionName + " in this VM :- "
             + customerPartitionedregion.getDataStore().getNumberOfPrimaryBucketsManaged());
     Set customerEntrySet = localBucket2RegionMap.entrySet();
@@ -2221,7 +2224,7 @@ public class PRColocationDUnitTest extends CacheTestCase {
       Map.Entry me = (Map.Entry)customerIterator.next();
       Integer size = (Integer)me.getValue();
       assertEquals(1, size.intValue());
-      getLogWriter().info(
+      LogWriterSupport.getLogWriter().info(
           "Size of the Bucket " + me.getKey() + ": - " + size.toString());
     }
     
@@ -2229,10 +2232,10 @@ public class PRColocationDUnitTest extends CacheTestCase {
     localBucket2RegionMap = (HashMap)orderPartitionedregion.getDataStore()
         .getSizeLocally();
     int orderBucketSize = localBucket2RegionMap.size();
-    getLogWriter().info(
+    LogWriterSupport.getLogWriter().info(
         "Size of the " + orderPartitionedRegionName + " in this VM :- "
             + localBucket2RegionMap.size());
-    getLogWriter().info(
+    LogWriterSupport.getLogWriter().info(
         "Size of primary buckets the " + orderPartitionedRegionName + " in this VM :- "
             + orderPartitionedregion.getDataStore().getNumberOfPrimaryBucketsManaged());
     
@@ -2243,16 +2246,16 @@ public class PRColocationDUnitTest extends CacheTestCase {
       Map.Entry me = (Map.Entry)orderIterator.next();
       Integer size = (Integer)me.getValue();
       assertEquals(10, size.intValue());
-      getLogWriter().info(
+      LogWriterSupport.getLogWriter().info(
           "Size of the Bucket " + me.getKey() + ": - " + size.toString());
     }
     localBucket2RegionMap = (HashMap)shipmentPartitionedregion.getDataStore()
         .getSizeLocally();
     int shipmentBucketSize = localBucket2RegionMap.size();
-    getLogWriter().info(
+    LogWriterSupport.getLogWriter().info(
         "Size of the " + shipmentPartitionedRegionName + " in this VM :- "
             + localBucket2RegionMap.size());
-    getLogWriter().info(
+    LogWriterSupport.getLogWriter().info(
         "Size of primary buckets the " + shipmentPartitionedRegionName + " in this VM :- "
             + shipmentPartitionedregion.getDataStore().getNumberOfPrimaryBucketsManaged());
     Set shipmentEntrySet = localBucket2RegionMap.entrySet();
@@ -2262,7 +2265,7 @@ public class PRColocationDUnitTest extends CacheTestCase {
       Map.Entry me = (Map.Entry)shipmentIterator.next();
       Integer size = (Integer)me.getValue();
       assertEquals(100, size.intValue());
-      getLogWriter().info(
+      LogWriterSupport.getLogWriter().info(
           "Size of the Bucket " + me.getKey() + ": - " + size.toString());
     }
     
@@ -2360,7 +2363,7 @@ public class PRColocationDUnitTest extends CacheTestCase {
           // assertNotNull(orderPartitionedregion.get(orderId));
 
           if (custId.equals(orderId.getCustId())) {
-            getLogWriter().info(
+            LogWriterSupport.getLogWriter().info(
                 orderId + "belongs to node " + idmForCustomer + " "
                     + idmForOrder);
             assertEquals(idmForCustomer, idmForOrder);
@@ -2372,7 +2375,7 @@ public class PRColocationDUnitTest extends CacheTestCase {
             ShipmentId shipmentId = (ShipmentId)shipmentIterator.next();
             // assertNotNull(shipmentPartitionedregion.get(shipmentId));
             if (orderId.equals(shipmentId.getOrderId())) {
-              getLogWriter().info(
+              LogWriterSupport.getLogWriter().info(
                   shipmentId + "belongs to node " + idmForOrder + " "
                       + idmForShipment);
             }
@@ -2457,7 +2460,7 @@ public class PRColocationDUnitTest extends CacheTestCase {
             "putCustomerPartitionedRegion : failed while doing put operation in CustomerPartitionedRegion ",
             e);
       }
-      getLogWriter().info("Customer :- { " + custid + " : " + customer + " }");
+      LogWriterSupport.getLogWriter().info("Customer :- { " + custid + " : " + customer + " }");
     }
   }
 
@@ -2483,7 +2486,7 @@ public class PRColocationDUnitTest extends CacheTestCase {
               "putOrderPartitionedRegion : failed while doing put operation in OrderPartitionedRegion ",
               e);
         }
-        getLogWriter().info("Order :- { " + orderId + " : " + order + " }");
+        LogWriterSupport.getLogWriter().info("Order :- { " + orderId + " : " + order + " }");
       }
     }
   }
@@ -2510,7 +2513,7 @@ public class PRColocationDUnitTest extends CacheTestCase {
               "putOrderPartitionedRegion : failed while doing put operation in OrderPartitionedRegion ",
               e);
         }
-        getLogWriter().info("Order :- { " + orderId + " : " + order + " }");
+        LogWriterSupport.getLogWriter().info("Order :- { " + orderId + " : " + order + " }");
       }
     }
   }
@@ -2539,7 +2542,7 @@ public class PRColocationDUnitTest extends CacheTestCase {
                 "putShipmentPartitionedRegion : failed while doing put operation in ShipmentPartitionedRegion ",
                 e);
           }
-          getLogWriter().info(
+          LogWriterSupport.getLogWriter().info(
               "Shipment :- { " + shipmentId + " : " + shipment + " }");
         }
       }
@@ -2573,7 +2576,7 @@ public class PRColocationDUnitTest extends CacheTestCase {
     Region pr = basicGetCache().getRegion(partitionedRegionName);
     assertNotNull(pr);
     try {
-      getLogWriter().info("Destroying Partitioned Region " + partitionedRegionName);
+      LogWriterSupport.getLogWriter().info("Destroying Partitioned Region " + partitionedRegionName);
       pr.destroyRegion();
       fail("Did not get the expected ISE");
     } catch (Exception e) {
@@ -2604,7 +2607,7 @@ public class PRColocationDUnitTest extends CacheTestCase {
     assertNotNull(basicGetCache());
     Region pr = basicGetCache().createRegion(partitionedRegionName, attr.create());
     assertNotNull(pr);
-    getLogWriter().info(
+    LogWriterSupport.getLogWriter().info(
         "Partitioned Region " + partitionedRegionName
             + " created Successfully :" + pr.toString());
   }
@@ -2625,7 +2628,7 @@ public class PRColocationDUnitTest extends CacheTestCase {
     attr.setPartitionAttributes(prAttr);
     Region pr = root.createSubregion(partitionedRegionName, attr.create());
     assertNotNull(pr);
-    getLogWriter().info(
+    LogWriterSupport.getLogWriter().info(
         "Partitioned sub region " + pr.getName()
             + " created Successfully :" + pr.toString());
     if(localMaxMemory == 0){
@@ -2640,7 +2643,7 @@ public class PRColocationDUnitTest extends CacheTestCase {
   @Override
   public void tearDown2() throws Exception {
     super.tearDown2();
-    invokeInEveryVM(new SerializableRunnable() {
+    Invoke.invokeInEveryVM(new SerializableRunnable() {
       public void run() {
         InternalResourceManager.setResourceObserver(null);
       }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/76e324b5/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRCustomPartitioningDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRCustomPartitioningDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRCustomPartitioningDUnitTest.java
index 5a619f9..45eae3c 100755
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRCustomPartitioningDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRCustomPartitioningDUnitTest.java
@@ -53,6 +53,7 @@ import com.gemstone.gemfire.internal.cache.PartitionedRegionDataStore.BucketVisi
 import com.gemstone.gemfire.internal.cache.xmlcache.Declarable2;
 import com.gemstone.gemfire.test.dunit.Assert;
 import com.gemstone.gemfire.test.dunit.Host;
+import com.gemstone.gemfire.test.dunit.LogWriterSupport;
 import com.gemstone.gemfire.test.dunit.SerializableRunnable;
 import com.gemstone.gemfire.test.dunit.VM;
 
@@ -154,12 +155,12 @@ public class PRCustomPartitioningDUnitTest extends
     for (int b = 0; b < numBucks; b++) {
       if (par.getBucketKeys(b).contains(key)) {
         foundIt = true;
-        getLogWriter().info("Key " + key + " found in bucket " + b);
+        LogWriterSupport.getLogWriter().info("Key " + key + " found in bucket " + b);
         break;
       }
     }
     if (!foundIt) {
-      getLogWriter().severe("Key " + key + " not found in any bucket");      
+      LogWriterSupport.getLogWriter().severe("Key " + key + " not found in any bucket");      
     }
     return foundIt;
   }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/76e324b5/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRFunctionExecutionDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRFunctionExecutionDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRFunctionExecutionDUnitTest.java
index 94303ee..e35e4fe 100755
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRFunctionExecutionDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRFunctionExecutionDUnitTest.java
@@ -68,12 +68,15 @@ import com.gemstone.gemfire.internal.cache.functions.TestFunction;
 import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
 import com.gemstone.gemfire.test.dunit.Assert;
 import com.gemstone.gemfire.test.dunit.AsyncInvocation;
-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.SerializableCallable;
 import com.gemstone.gemfire.test.dunit.SerializableRunnable;
+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;
 
 public class PRFunctionExecutionDUnitTest extends
     PartitionedRegionDUnitTestCase {
@@ -752,7 +755,7 @@ public class PRFunctionExecutionDUnitTest extends
   }
   
   public void testLocalMultiKeyExecution_BucketMoved() throws Exception {
-    IgnoredException.addExpectedException("BucketMovedException");
+    IgnoredException.addIgnoredException("BucketMovedException");
     final String rName = getUniqueName();
     Host host = Host.getHost(0);
     final VM datastore0 = host.getVM(0);
@@ -982,7 +985,7 @@ public class PRFunctionExecutionDUnitTest extends
             return excuse;
           }
         };
-        DistributedTestCase.waitForCriterion(wc, 3000, 200, false);
+        Wait.waitForCriterion(wc, 3000, 200, false);
         long endTime = System.currentTimeMillis();
         getCache().getLogger().fine(
             "Time wait for Cache Close = " + (endTime - startTime));
@@ -992,7 +995,7 @@ public class PRFunctionExecutionDUnitTest extends
     });
     assertEquals(Boolean.TRUE, o);
 
-    DistributedTestCase.join(async[0], 60 * 1000, getLogWriter());
+    Threads.join(async[0], 60 * 1000, LogWriterSupport.getLogWriter());
 
     if (async[0].getException() != null) {
       Assert.fail("UnExpected Exception Occured : ", async[0].getException());
@@ -1080,7 +1083,7 @@ public class PRFunctionExecutionDUnitTest extends
             return excuse;
           }
         };
-        DistributedTestCase.waitForCriterion(wc, 3000, 200, false);
+        Wait.waitForCriterion(wc, 3000, 200, false);
         long endTime = System.currentTimeMillis();
         getCache().getLogger().fine(
             "Time wait for Cache Close = " + (endTime - startTime));
@@ -1090,7 +1093,7 @@ public class PRFunctionExecutionDUnitTest extends
     });
     assertEquals(Boolean.TRUE, o);
 
-    DistributedTestCase.join(async[0], 60 * 1000, getLogWriter());
+    Threads.join(async[0], 60 * 1000, LogWriterSupport.getLogWriter());
 
     if (async[0].getException() != null) {
       Assert.fail("UnExpected Exception Occured : ", async[0].getException());
@@ -1587,7 +1590,7 @@ public class PRFunctionExecutionDUnitTest extends
         }
         catch (Exception expected) {
           // No data should cause exec to throw
-          getLogWriter().warning("Exception Occured : "+ expected.getMessage());
+          LogWriterSupport.getLogWriter().warning("Exception Occured : "+ expected.getMessage());
           // boolean expectedStr = expected.getMessage().startsWith("No target
           // node was found for routingKey");
           // assertTrue("Unexpected exception: " + expected, expectedStr);
@@ -2244,7 +2247,7 @@ public class PRFunctionExecutionDUnitTest extends
         ResultCollector rc1 = dataSet.withArgs(Boolean.TRUE)
             .execute(function.getId());
         List l = ((List)rc1.getResult());
-        getLogWriter().info(
+        LogWriterSupport.getLogWriter().info(
             "PRFunctionExecutionDUnitTest#testExecutionOnAllNodes_byName : Result size :"
                 + l.size() + " Result : " + l);
         assertEquals(4, l.size());
@@ -2429,7 +2432,7 @@ public class PRFunctionExecutionDUnitTest extends
               }
             });
         List l = ((List)rc1.getResult());
-        getLogWriter().info(
+        LogWriterSupport.getLogWriter().info(
             "PRFunctionExecutionDUnitTest#testExecutionOnAllNodes_byName : Result size :"
                 + l.size() + " Result : " + l);
         assertEquals(4, l.size());
@@ -2534,7 +2537,7 @@ public class PRFunctionExecutionDUnitTest extends
               }
             });
         List l = ((List)rc1.getResult());
-        getLogWriter().info(
+        LogWriterSupport.getLogWriter().info(
             "PRFunctionExecutionDUnitTest#testExecutionOnAllNodes_byName : Result size :"
                 + l.size() + " Result : " + l);
         assertEquals(4, l.size());
@@ -2609,7 +2612,7 @@ public class PRFunctionExecutionDUnitTest extends
                 "putCustomerPartitionedRegion : failed while doing put operation in CustomerPartitionedRegion ",
                 e);
           }
-          getLogWriter().fine("Customer :- { " + custid + " : " + customer + " }");
+          LogWriterSupport.getLogWriter().fine("Customer :- { " + custid + " : " + customer + " }");
         }
         
         Function function = new TestFunction(true,TestFunction.TEST_FUNCTION3);
@@ -2720,7 +2723,7 @@ public class PRFunctionExecutionDUnitTest extends
                 "putCustomerPartitionedRegion : failed while doing put operation in CustomerPartitionedRegion ",
                 e);
           }
-          getLogWriter().fine("Customer :- { " + custid + " : " + customer + " }");
+          LogWriterSupport.getLogWriter().fine("Customer :- { " + custid + " : " + customer + " }");
         }
 
         PartitionedRegion partitionedregion = (PartitionedRegion)getCache().getRegion(rName2);
@@ -2742,7 +2745,7 @@ public class PRFunctionExecutionDUnitTest extends
                   "putOrderPartitionedRegion : failed while doing put operation in OrderPartitionedRegion ",
                   e);
             }
-            getLogWriter().fine("Order :- { " + orderId + " : " + order + " }");
+            LogWriterSupport.getLogWriter().fine("Order :- { " + orderId + " : " + order + " }");
           }
         }
                 
@@ -3051,7 +3054,7 @@ public class PRFunctionExecutionDUnitTest extends
       ds.disconnect();
     }
     catch (Exception e) {
-      getLogWriter().info("Exception Occured : " + e.getMessage());
+      LogWriterSupport.getLogWriter().info("Exception Occured : " + e.getMessage());
       e.printStackTrace();
       Assert.fail("Test failed", e);
     }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/76e324b5/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRFunctionExecutionTimeOutDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRFunctionExecutionTimeOutDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRFunctionExecutionTimeOutDUnitTest.java
index 2d5e640..169ad3a 100755
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRFunctionExecutionTimeOutDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRFunctionExecutionTimeOutDUnitTest.java
@@ -667,7 +667,7 @@ public class PRFunctionExecutionTimeOutDUnitTest extends
    * @throws Exception
    */
   public void testLocalMultiKeyExecution_byName() throws Exception {
-    IgnoredException.addExpectedException("BucketMovedException");
+    IgnoredException.addIgnoredException("BucketMovedException");
     final String rName = getUniqueName();
     Host host = Host.getHost(0);
     VM localOnly = host.getVM(3);
@@ -798,7 +798,7 @@ public class PRFunctionExecutionTimeOutDUnitTest extends
     final VM datastore1 = host.getVM(1);
     final VM datastore2 = host.getVM(2);
     final VM datastore3 = host.getVM(3);
-    IgnoredException.addExpectedException("BucketMovedException");
+    IgnoredException.addIgnoredException("BucketMovedException");
     getCache();
     SerializableCallable dataStoreCreate = new SerializableCallable(
         "Create PR with Function Factory") {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/76e324b5/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRFunctionExecutionWithResultSenderDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRFunctionExecutionWithResultSenderDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRFunctionExecutionWithResultSenderDUnitTest.java
index df36f8f..6848345 100755
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRFunctionExecutionWithResultSenderDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRFunctionExecutionWithResultSenderDUnitTest.java
@@ -48,6 +48,7 @@ import com.gemstone.gemfire.internal.cache.PartitionedRegionDUnitTestCase;
 import com.gemstone.gemfire.internal.cache.PartitionedRegionTestHelper;
 import com.gemstone.gemfire.internal.cache.functions.TestFunction;
 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.VM;
 
@@ -584,7 +585,7 @@ public class PRFunctionExecutionWithResultSenderDUnitTest extends
         ResultCollector rc1 = dataSet.withArgs(Boolean.TRUE).execute(
             function.getId());
         List l = ((List)rc1.getResult());
-        getLogWriter().info(
+        LogWriterSupport.getLogWriter().info(
             "PRFunctionExecutionDUnitTest#testExecutionOnAllNodes_byName : Result size :"
                 + l.size() + " Result : " + l);
         assertEquals(4, l.size());

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/76e324b5/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRPerformanceTestDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRPerformanceTestDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRPerformanceTestDUnitTest.java
index 5e12a50..53b6257 100755
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRPerformanceTestDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRPerformanceTestDUnitTest.java
@@ -54,6 +54,7 @@ import com.gemstone.gemfire.internal.cache.PartitionedRegion;
 import com.gemstone.gemfire.internal.cache.PartitionedRegionDUnitTestCase;
 import com.gemstone.gemfire.test.dunit.Assert;
 import com.gemstone.gemfire.test.dunit.Host;
+import com.gemstone.gemfire.test.dunit.LogWriterSupport;
 import com.gemstone.gemfire.test.dunit.SerializableRunnable;
 import com.gemstone.gemfire.test.dunit.VM;
 
@@ -158,7 +159,7 @@ public class PRPerformanceTestDUnitTest extends
       }
     }
     if (!foundIt) {
-      getLogWriter().severe("Key " + key + " not found in any bucket");      
+      LogWriterSupport.getLogWriter().severe("Key " + key + " not found in any bucket");      
     }
     return foundIt;
   }
@@ -252,7 +253,7 @@ public class PRPerformanceTestDUnitTest extends
             list = (ArrayList)rc.getResult();
           }
           catch (Exception ex) {
-            getLogWriter().info("Exception Occured :" + ex.getMessage());
+            LogWriterSupport.getLogWriter().info("Exception Occured :" + ex.getMessage());
             Assert.fail("Test failed",ex);
           }
           Object val = list.get(0);
@@ -278,7 +279,7 @@ public class PRPerformanceTestDUnitTest extends
         }
         
         t.stop();        
-        getLogWriter().info("Time taken to iterate over " + vals.size()+ " no. of keys: " + t.getTimeInMs() + " ms");
+        LogWriterSupport.getLogWriter().info("Time taken to iterate over " + vals.size()+ " no. of keys: " + t.getTimeInMs() + " ms");
                 
         // Call the execute method for each key and see if this takes more time
 
@@ -305,7 +306,7 @@ public class PRPerformanceTestDUnitTest extends
         }
         t.stop();
         assertEquals(vals.size(),listOfKeys.size());            
-        getLogWriter().info("Time taken to iterate over " + vals.size()+ " no. of keys using FunctionExecution: " + t.getTimeInMs() + " ms");
+        LogWriterSupport.getLogWriter().info("Time taken to iterate over " + vals.size()+ " no. of keys using FunctionExecution: " + t.getTimeInMs() + " ms");
         
       }
     });

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/76e324b5/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRTransactionDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRTransactionDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRTransactionDUnitTest.java
index dd2fab3..6768d45 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRTransactionDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRTransactionDUnitTest.java
@@ -44,6 +44,8 @@ import com.gemstone.gemfire.internal.cache.execute.data.OrderId;
 import com.gemstone.gemfire.internal.cache.execute.data.Shipment;
 import com.gemstone.gemfire.internal.cache.execute.data.ShipmentId;
 import com.gemstone.gemfire.test.dunit.Assert;
+import com.gemstone.gemfire.test.dunit.Invoke;
+import com.gemstone.gemfire.test.dunit.LogWriterSupport;
 import com.gemstone.gemfire.test.dunit.SerializableCallable;
 
 /**
@@ -153,7 +155,7 @@ public class PRTransactionDUnitTest extends PRColocationDUnitTest {
         filter.clear();
         args.clear();
         args.add(new Integer(VERIFY_NON_COLOCATION));
-        getLogWriter().info("VERIFY_NON_COLOCATION");
+        LogWriterSupport.getLogWriter().info("VERIFY_NON_COLOCATION");
         args.add(custId);
         args.add(newCus);
         args.add(orderId);
@@ -165,7 +167,7 @@ public class PRTransactionDUnitTest extends PRColocationDUnitTest {
           fail("Expected exception was not thrown");
         }
         catch (FunctionException fe) {
-          getLogWriter().info("Caught Expected exception");
+          LogWriterSupport.getLogWriter().info("Caught Expected exception");
           if(fe.getCause() instanceof TransactionDataNotColocatedException) {
           }
           else {
@@ -176,7 +178,7 @@ public class PRTransactionDUnitTest extends PRColocationDUnitTest {
         }
         // verify that the transaction modifications are applied        
         args.set(0, new Integer(VERIFY_TX));
-        getLogWriter().info("VERIFY_TX");        
+        LogWriterSupport.getLogWriter().info("VERIFY_TX");        
         orderpr.put(orderId, order);
         assertNotNull(orderpr.get(orderId));
         e.withFilter(filter).withArgs(args).execute(txFunction.getId())
@@ -192,17 +194,17 @@ public class PRTransactionDUnitTest extends PRColocationDUnitTest {
             .getResult();
         // verify that the transaction is rolled back        
         args.set(0, new Integer(VERIFY_ROLLBACK));
-        getLogWriter().info("VERIFY_ROLLBACK");        
+        LogWriterSupport.getLogWriter().info("VERIFY_ROLLBACK");        
         e.withFilter(filter).withArgs(args).execute(txFunction.getId())
             .getResult();
         // verify destroy
         args.set(0, new Integer(VERIFY_DESTROY));
-        getLogWriter().info("VERIFY_DESTROY");
+        LogWriterSupport.getLogWriter().info("VERIFY_DESTROY");
         e.withFilter(filter).withArgs(args).execute(txFunction.getId())
             .getResult();
         // verify invalidate
         args.set(0, new Integer(VERIFY_INVALIDATE));
-        getLogWriter().info("VERIFY_INVALIDATE");
+        LogWriterSupport.getLogWriter().info("VERIFY_INVALIDATE");
         e.withFilter(filter).withArgs(args).execute(txFunction.getId())
             .getResult();
         return Boolean.TRUE;
@@ -401,7 +403,7 @@ public class PRTransactionDUnitTest extends PRColocationDUnitTest {
     orderPartitionedregion.getDataStore().dumpEntries(false);
     Iterator custIterator = customerPartitionedregion.getDataStore()
         .getEntries().iterator();
-    getLogWriter().info(
+    LogWriterSupport.getLogWriter().info(
         "Found " + customerPartitionedregion.getDataStore().getEntries().size()
             + " Customer entries in the partition");
     Region.Entry custEntry = null;
@@ -411,7 +413,7 @@ public class PRTransactionDUnitTest extends PRColocationDUnitTest {
       Customer cust = (Customer)custEntry.getValue();
       Iterator orderIterator = orderPartitionedregion.getDataStore()
           .getEntries().iterator();
-      getLogWriter().info(
+      LogWriterSupport.getLogWriter().info(
           "Found " + orderPartitionedregion.getDataStore().getEntries().size()
               + " Order entries in the partition");
       int orderPerCustomer = 0;
@@ -466,7 +468,7 @@ public class PRTransactionDUnitTest extends PRColocationDUnitTest {
         filter.clear();
         args.clear();
         args.add(new Integer(VERIFY_LISTENER_CALLBACK));
-        getLogWriter().info("VERIFY_LISTENER_CALLBACK");
+        LogWriterSupport.getLogWriter().info("VERIFY_LISTENER_CALLBACK");
         args.add(custId);
         args.add(newCus);
         args.add(orderId);
@@ -514,7 +516,7 @@ public class PRTransactionDUnitTest extends PRColocationDUnitTest {
         filter.clear();
         args.clear();
         args.add(new Integer(VERIFY_REP_READ));
-        getLogWriter().info("VERIFY_REP_READ");
+        LogWriterSupport.getLogWriter().info("VERIFY_REP_READ");
         args.add(custId);
         args.add(newCus);
         args.add(orderId);
@@ -559,7 +561,7 @@ public class PRTransactionDUnitTest extends PRColocationDUnitTest {
         Execution e = FunctionService.onRegion(customerPR);
         // for each customer, update order and shipment
         for (int iterations = 1; iterations <= totalIterations; iterations++) {
-          getLogWriter().info("running perfFunction");
+          LogWriterSupport.getLogWriter().info("running perfFunction");
           long startTime = 0;
           ArrayList args = new ArrayList();
           CustId custId = new CustId(iterations % 10);
@@ -600,7 +602,7 @@ public class PRTransactionDUnitTest extends PRColocationDUnitTest {
         Execution e = FunctionService.onRegion(customerPR);
         // for each customer, update order and shipment
         for (int iterations = 1; iterations <= totalIterations; iterations++) {
-          getLogWriter().info("Running perfFunction");
+          LogWriterSupport.getLogWriter().info("Running perfFunction");
           long startTime = 0;
           ArrayList args = new ArrayList();
           CustId custId = new CustId(iterations % 10);
@@ -636,7 +638,7 @@ public class PRTransactionDUnitTest extends PRColocationDUnitTest {
     double diff = (perfTime.longValue() - perfTxTime.longValue()) * 1.0;
     double percentDiff = (diff / perfTime.longValue()) * 100;
 
-    getLogWriter().info(
+    LogWriterSupport.getLogWriter().info(
         (totalIterations - warmupIterations) + " iterations of function took:"
             + +perfTime.longValue() + " Nanos, and transaction function took:"
             + perfTxTime.longValue() + " Nanos, difference :" + diff
@@ -680,7 +682,7 @@ public class PRTransactionDUnitTest extends PRColocationDUnitTest {
   
   public void tearDown2() throws Exception {
     try {
-      invokeInEveryVM(verifyNoTxState);
+      Invoke.invokeInEveryVM(verifyNoTxState);
     } finally {
       super.tearDown2();
     }
@@ -720,7 +722,7 @@ public class PRTransactionDUnitTest extends PRColocationDUnitTest {
         }
       }
       mgr.commit();
-      getLogWriter().info("COMMIT completed");
+      LogWriterSupport.getLogWriter().info("COMMIT completed");
     }
   }
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/76e324b5/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/SingleHopGetAllPutAllDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/SingleHopGetAllPutAllDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/SingleHopGetAllPutAllDUnitTest.java
index 9f4fbbc..9b6e6f0 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/SingleHopGetAllPutAllDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/SingleHopGetAllPutAllDUnitTest.java
@@ -32,7 +32,8 @@ import com.gemstone.gemfire.distributed.DistributedSystem;
 import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
 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.Wait;
+import com.gemstone.gemfire.test.dunit.WaitCriterion;
 
 public class SingleHopGetAllPutAllDUnitTest extends PRClientServerTestBase{
 
@@ -92,7 +93,7 @@ public class SingleHopGetAllPutAllDUnitTest extends PRClientServerTestBase{
       // check if the function was routed to pruned nodes
       Map resultMap = region.getAll(testKeyList);
       assertTrue(resultMap.equals(origVals));
-      pause(2000);
+      Wait.pause(2000);
       Map secondResultMap = region.getAll(testKeyList);
       assertTrue(secondResultMap.equals(origVals));
     }
@@ -120,7 +121,7 @@ public class SingleHopGetAllPutAllDUnitTest extends PRClientServerTestBase{
             + regionMetaData.size();
       }
     };
-    DistributedTestCase.waitForCriterion(wc, 5000, 200, true);
+    Wait.waitForCriterion(wc, 5000, 200, true);
     assertTrue(regionMetaData.containsKey(region.getFullPath()));
     final ClientPartitionAdvisor prMetaData = regionMetaData.get(region.getFullPath());
     wc = new WaitCriterion() {
@@ -134,7 +135,7 @@ public class SingleHopGetAllPutAllDUnitTest extends PRClientServerTestBase{
             + prMetaData.getBucketServerLocationsMap_TEST_ONLY().size();
       }
     };
-    DistributedTestCase.waitForCriterion(wc, 5000, 200, true);
+    Wait.waitForCriterion(wc, 5000, 200, true);
     for (Entry entry : prMetaData.getBucketServerLocationsMap_TEST_ONLY()
         .entrySet()) {
       assertEquals(2, ((List)entry.getValue()).size());
@@ -168,7 +169,7 @@ public class SingleHopGetAllPutAllDUnitTest extends PRClientServerTestBase{
       region.putAll(keysValuesMap);
       // check the listener
       // check how the function was executed
-      pause(2000);
+      Wait.pause(2000);
       region.putAll(keysValuesMap);
       
       // check if the client meta-data is in synch
@@ -177,7 +178,7 @@ public class SingleHopGetAllPutAllDUnitTest extends PRClientServerTestBase{
       // check if the function was routed to pruned nodes
       Map<String, String> resultMap = region.getAll(testKeysList);
       assertTrue(resultMap.equals(keysValuesMap));
-      pause(2000);
+      Wait.pause(2000);
       Map<String, String> secondResultMap = region.getAll(testKeysList);
       assertTrue(secondResultMap.equals(keysValuesMap));
 
@@ -188,7 +189,7 @@ public class SingleHopGetAllPutAllDUnitTest extends PRClientServerTestBase{
         noValueMap.put(key, null);
       }
       assertEquals(noValueMap, region.getAll(testKeysList));
-      pause(2000); // Why does this test keep pausing for 2 seconds and then do the exact same thing?
+      Wait.pause(2000); // Why does this test keep pausing for 2 seconds and then do the exact same thing?
       region.removeAll(testKeysList);
       assertEquals(noValueMap, region.getAll(testKeysList));
     }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/76e324b5/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/functions/DistributedRegionFunction.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/functions/DistributedRegionFunction.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/functions/DistributedRegionFunction.java
index 030980d..b8343ee 100755
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/functions/DistributedRegionFunction.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/functions/DistributedRegionFunction.java
@@ -24,8 +24,8 @@ import com.gemstone.gemfire.cache.execute.FunctionContext;
 import com.gemstone.gemfire.cache.execute.RegionFunctionContext;
 import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
 import com.gemstone.gemfire.internal.Assert;
-import com.gemstone.gemfire.test.dunit.DistributedTestCase;
-import com.gemstone.gemfire.test.dunit.DistributedTestCase.WaitCriterion;
+import com.gemstone.gemfire.test.dunit.Wait;
+import com.gemstone.gemfire.test.dunit.WaitCriterion;
 
 @SuppressWarnings("serial")
 public class DistributedRegionFunction extends FunctionAdapter {
@@ -65,7 +65,7 @@ public class DistributedRegionFunction extends FunctionAdapter {
           return excuse;
         }
       };
-      DistributedTestCase.waitForCriterion(wc, 12000, 500, false);
+      Wait.waitForCriterion(wc, 12000, 500, false);
     }
     long endTime = System.currentTimeMillis();
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/76e324b5/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/functions/TestFunction.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/functions/TestFunction.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/functions/TestFunction.java
index 95a9da9..e789973 100755
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/functions/TestFunction.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/functions/TestFunction.java
@@ -41,8 +41,8 @@ import com.gemstone.gemfire.internal.cache.execute.InternalFunctionInvocationTar
 import com.gemstone.gemfire.internal.cache.execute.MyFunctionExecutionException;
 import com.gemstone.gemfire.internal.cache.execute.RegionFunctionContextImpl;
 import com.gemstone.gemfire.internal.cache.xmlcache.Declarable2;
-import com.gemstone.gemfire.test.dunit.DistributedTestCase;
-import com.gemstone.gemfire.test.dunit.DistributedTestCase.WaitCriterion;
+import com.gemstone.gemfire.test.dunit.Wait;
+import com.gemstone.gemfire.test.dunit.WaitCriterion;
 
 import java.io.Serializable;
 import java.util.ArrayList;
@@ -797,7 +797,7 @@ public class TestFunction extends FunctionAdapter implements Declarable2 {
         return excuse;
       }
     };
-    DistributedTestCase.waitForCriterion(wc, 15000, 1000, false);
+    Wait.waitForCriterion(wc, 15000, 1000, false);
     if (context.getArguments() instanceof Boolean) {
       context.getResultSender().lastResult((Serializable) context.getArguments());
     }
@@ -911,7 +911,7 @@ public class TestFunction extends FunctionAdapter implements Declarable2 {
         return excuse;
       }
     };
-    DistributedTestCase.waitForCriterion(wc, 10000, 500, false);
+    Wait.waitForCriterion(wc, 10000, 500, false);
     rcontext.getResultSender().lastResult((Serializable) rcontext.getArguments());
   }
   

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/76e324b5/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/BlockingHARQAddOperationJUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/BlockingHARQAddOperationJUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/BlockingHARQAddOperationJUnitTest.java
index 04f7f60..6e3efcf 100755
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/BlockingHARQAddOperationJUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/BlockingHARQAddOperationJUnitTest.java
@@ -31,7 +31,8 @@ import org.junit.experimental.categories.Category;
 import com.gemstone.gemfire.cache.CacheException;
 import com.gemstone.gemfire.internal.cache.Conflatable;
 import com.gemstone.gemfire.internal.cache.EventID;
-import com.gemstone.gemfire.test.dunit.DistributedTestCase;
+import com.gemstone.gemfire.test.dunit.Threads;
+import com.gemstone.gemfire.test.dunit.Wait;
 import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
 
 /**
@@ -152,7 +153,7 @@ public class BlockingHARQAddOperationJUnitTest extends
     };
 
     takeThread.start();
-    DistributedTestCase.staticPause(20 * 1000);
+    Wait.staticPause(20 * 1000);
     if (!takeThread.isAlive()) {
       fail("take() thread died ");
     }
@@ -160,7 +161,7 @@ public class BlockingHARQAddOperationJUnitTest extends
     ConflatableObject c1 = new ConflatableObject(KEY1, VALUE1, id1,
         conflationEnabled, "region1");
     rq.put(c1);
-    DistributedTestCase.join(takeThread, 20 * 1000, null);
+    Threads.join(takeThread, 20 * 1000, null);
     assertEquals(1, takenObjects.size());
     Conflatable obj = (Conflatable)takenObjects.get(0);
     assertNotNull(obj);
@@ -220,7 +221,7 @@ public class BlockingHARQAddOperationJUnitTest extends
       rq.put(c);
     }
     for (int i = 0; i < totalTakeThreads; i++) {
-      DistributedTestCase.join(takeThreads[i], 20 * 1000, null);
+      Threads.join(takeThreads[i], 20 * 1000, null);
     }
 
     assertEquals(totalTakeThreads, takenObjects.size());

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/76e324b5/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/BlockingHARegionJUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/BlockingHARegionJUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/BlockingHARegionJUnitTest.java
index e7b5314..db5874c 100755
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/BlockingHARegionJUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/BlockingHARegionJUnitTest.java
@@ -32,8 +32,9 @@ import com.gemstone.gemfire.cache.CacheFactory;
 import com.gemstone.gemfire.distributed.DistributedSystem;
 import com.gemstone.gemfire.internal.cache.EventID;
 import com.gemstone.gemfire.internal.AvailablePort;
-import com.gemstone.gemfire.test.dunit.DistributedTestCase;
-import com.gemstone.gemfire.test.dunit.DistributedTestCase.WaitCriterion;
+import com.gemstone.gemfire.test.dunit.Threads;
+import com.gemstone.gemfire.test.dunit.Wait;
+import com.gemstone.gemfire.test.dunit.WaitCriterion;
 import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
 
 @Category(IntegrationTest.class)
@@ -76,8 +77,8 @@ public class BlockingHARegionJUnitTest
       thread1.start();
       thread2.start();
 
-      DistributedTestCase.join(thread1, 30 * 1000, null);
-      DistributedTestCase.join(thread2, 30 * 1000, null);
+      Threads.join(thread1, 30 * 1000, null);
+      Threads.join(thread2, 30 * 1000, null);
 
       if (exceptionOccured) {
         fail(" Test failed due to " + exceptionString);
@@ -124,7 +125,7 @@ public class BlockingHARegionJUnitTest
           return null;
         }
       };
-      DistributedTestCase.waitForCriterion(ev, 1000, 200, true);
+      Wait.waitForCriterion(ev, 1000, 200, true);
       assertTrue(thread1.isAlive()); //thread should still be alive (in wait state)
       
       Thread thread2 = new DoTake(hrq,1);
@@ -138,7 +139,7 @@ public class BlockingHARegionJUnitTest
         }
       };
       //sleep. take will proceed and so will sleeping put
-      DistributedTestCase.waitForCriterion(ev, 3 * 1000, 200, true);
+      Wait.waitForCriterion(ev, 3 * 1000, 200, true);
 
       // thread should have died since put should have proceeded
       ev = new WaitCriterion() {
@@ -149,10 +150,10 @@ public class BlockingHARegionJUnitTest
           return "thread1 still alive";
         }
       };
-      DistributedTestCase.waitForCriterion(ev, 30 * 1000, 1000, true);
+      Wait.waitForCriterion(ev, 30 * 1000, 1000, true);
       
-      DistributedTestCase.join(thread1, 30 * 1000, null); // for completeness
-      DistributedTestCase.join(thread2, 30 * 1000, null);
+      Threads.join(thread1, 30 * 1000, null); // for completeness
+      Threads.join(thread2, 30 * 1000, null);
       if (exceptionOccured) {
         fail(" Test failed due to " + exceptionString);
       }
@@ -204,7 +205,7 @@ public class BlockingHARegionJUnitTest
           return null;
         }
       };
-      DistributedTestCase.waitForCriterion(ev, 30 * 1000, 200, true);
+      Wait.waitForCriterion(ev, 30 * 1000, 200, true);
       
       assertTrue(thread1.isAlive());
       assertTrue(thread2.isAlive());
@@ -225,11 +226,11 @@ public class BlockingHARegionJUnitTest
       
       Thread.sleep(2000);
       
-      DistributedTestCase.join(thread1, 5 * 60 * 1000, null);
-      DistributedTestCase.join(thread2, 5 * 60 * 1000, null);
-      DistributedTestCase.join(thread3, 5 * 60 * 1000, null);
-      DistributedTestCase.join(thread4, 5 * 60 * 1000, null);
-      DistributedTestCase.join(thread5, 5 * 60 * 1000, null);
+      Threads.join(thread1, 5 * 60 * 1000, null);
+      Threads.join(thread2, 5 * 60 * 1000, null);
+      Threads.join(thread3, 5 * 60 * 1000, null);
+      Threads.join(thread4, 5 * 60 * 1000, null);
+      Threads.join(thread5, 5 * 60 * 1000, null);
       
       cache.close();
     }
@@ -282,11 +283,11 @@ public class BlockingHARegionJUnitTest
       thread9.start();
       thread10.start();
       
-      DistributedTestCase.join(thread6, 30 * 1000, null);
-      DistributedTestCase.join(thread7, 30 * 1000, null);
-      DistributedTestCase.join(thread8, 30 * 1000, null);
-      DistributedTestCase.join(thread9, 30 * 1000, null);
-      DistributedTestCase.join(thread10, 30 * 1000, null);
+      Threads.join(thread6, 30 * 1000, null);
+      Threads.join(thread7, 30 * 1000, null);
+      Threads.join(thread8, 30 * 1000, null);
+      Threads.join(thread9, 30 * 1000, null);
+      Threads.join(thread10, 30 * 1000, null);
       
       WaitCriterion ev = new WaitCriterion() {
         public boolean done() {
@@ -296,7 +297,7 @@ public class BlockingHARegionJUnitTest
           return null;
         }
       };
-      DistributedTestCase.waitForCriterion(ev, 30 * 1000, 200, true);
+      Wait.waitForCriterion(ev, 30 * 1000, 200, true);
       
       assertTrue(thread1.isAlive());
       assertTrue(thread2.isAlive());
@@ -319,11 +320,11 @@ public class BlockingHARegionJUnitTest
       Thread.sleep(2000);
       
       
-      DistributedTestCase.join(thread1, 30 * 1000, null);
-      DistributedTestCase.join(thread2, 30 * 1000, null);
-      DistributedTestCase.join(thread3, 30 * 1000, null);
-      DistributedTestCase.join(thread4, 30 * 1000, null);
-      DistributedTestCase.join(thread5, 30 * 1000, null);
+      Threads.join(thread1, 30 * 1000, null);
+      Threads.join(thread2, 30 * 1000, null);
+      Threads.join(thread3, 30 * 1000, null);
+      Threads.join(thread4, 30 * 1000, null);
+      Threads.join(thread5, 30 * 1000, null);
       
       cache.close();
     }
@@ -377,7 +378,7 @@ public class BlockingHARegionJUnitTest
         }
       };
       t1.start();
-      DistributedTestCase.join(t1, 20 * 1000, null);
+      Threads.join(t1, 20 * 1000, null);
       if (exceptionOccured) {
         fail(" Test failed due to " + exceptionString);
       }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/76e324b5/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/Bug36853EventsExpiryDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/Bug36853EventsExpiryDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/Bug36853EventsExpiryDUnitTest.java
index 1d72daa..fae4d1d 100755
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/Bug36853EventsExpiryDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/Bug36853EventsExpiryDUnitTest.java
@@ -37,6 +37,8 @@ import com.gemstone.gemfire.internal.AvailablePort;
 import com.gemstone.gemfire.internal.cache.tier.sockets.ConflationDUnitTest;
 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;
 
 /**
@@ -112,7 +114,7 @@ public class Bug36853EventsExpiryDUnitTest extends CacheTestCase
         "createServerCache")).intValue();
 
     client.invoke(Bug36853EventsExpiryDUnitTest.class, "createClientCache",
-        new Object[] { getServerHostName(host), new Integer(PORT2) });
+        new Object[] { NetworkSupport.getServerHostName(host), new Integer(PORT2) });
 
   }
 
@@ -178,11 +180,11 @@ public class Bug36853EventsExpiryDUnitTest extends CacheTestCase
       public void afterCreate(EntryEvent event)
       {
         String key = (String)event.getKey();
-        getLogWriter().info("client2 : afterCreate : key =" + key);
+        LogWriterSupport.getLogWriter().info("client2 : afterCreate : key =" + key);
         if (key.equals(LAST_KEY)) {
 
           synchronized (Bug36853EventsExpiryDUnitTest.class) {
-            getLogWriter().info(
+            LogWriterSupport.getLogWriter().info(
                 "Notifying client2 to proceed for validation");
             proceedForValidation = true;
             Bug36853EventsExpiryDUnitTest.class.notify();
@@ -240,8 +242,8 @@ public class Bug36853EventsExpiryDUnitTest extends CacheTestCase
    */
   public void testEventsExpiryBug() throws Exception
   {
-    IgnoredException.addExpectedException("Unexpected IOException");
-    IgnoredException.addExpectedException("Connection reset");
+    IgnoredException.addIgnoredException("Unexpected IOException");
+    IgnoredException.addIgnoredException("Connection reset");
     server.invoke(Bug36853EventsExpiryDUnitTest.class, "generateEvents");
     client.invoke(Bug36853EventsExpiryDUnitTest.class,
         "validateEventCountAtClient");
@@ -257,7 +259,7 @@ public class Bug36853EventsExpiryDUnitTest extends CacheTestCase
       synchronized (Bug36853EventsExpiryDUnitTest.class) {
         if (!proceedForValidation)
           try {
-            getLogWriter().info(
+            LogWriterSupport.getLogWriter().info(
                 "Client2 going in wait before starting validation");
             Bug36853EventsExpiryDUnitTest.class.wait(5000);
           }
@@ -266,13 +268,13 @@ public class Bug36853EventsExpiryDUnitTest extends CacheTestCase
           }
       }
     }
-    getLogWriter().info("Starting validation on client2");
+    LogWriterSupport.getLogWriter().info("Starting validation on client2");
     Assert.assertEquals(
         "Puts recieved by client not equal to the puts done at server.",
         TOTAL_PUTS, putsRecievedByClient);
-    getLogWriter()
+    LogWriterSupport.getLogWriter()
         .info("putsRecievedByClient = " + putsRecievedByClient);
-    getLogWriter().info("Validation complete on client2");
+    LogWriterSupport.getLogWriter().info("Validation complete on client2");
 
   }
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/76e324b5/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/Bug48571DUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/Bug48571DUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/Bug48571DUnitTest.java
index 2d599f8..4b82673 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/Bug48571DUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/Bug48571DUnitTest.java
@@ -39,9 +39,12 @@ import com.gemstone.gemfire.internal.cache.tier.sockets.CacheClientNotifier;
 import com.gemstone.gemfire.internal.cache.tier.sockets.CacheClientProxy;
 import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
 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;
+import com.gemstone.gemfire.test.dunit.Wait;
+import com.gemstone.gemfire.test.dunit.WaitCriterion;
 
 public class Bug48571DUnitTest extends DistributedTestCase {
 
@@ -84,7 +87,7 @@ public class Bug48571DUnitTest extends DistributedTestCase {
   }
 
   public void testStatsMatchWithSize() throws Exception {
-    IgnoredException.addExpectedException("Unexpected IOException||Connection reset");
+    IgnoredException.addIgnoredException("Unexpected IOException||Connection reset");
     // start a server
     int port = (Integer) server.invoke(Bug48571DUnitTest.class, "createServerCache");
     // create durable client, with durable RI
@@ -106,7 +109,7 @@ public class Bug48571DUnitTest extends DistributedTestCase {
 
   public static int createServerCache() throws Exception {
     Properties props = new Properties();
-    props.setProperty("locators", "localhost["+getDUnitLocatorPort()+"]");
+    props.setProperty("locators", "localhost["+DistributedTestSupport.getDUnitLocatorPort()+"]");
     props.setProperty("log-file", "server_" + OSProcess.getId() + ".log");
     props.setProperty("log-level", "info");
     props.setProperty("statistic-archive-file", "server_" + OSProcess.getId()
@@ -240,7 +243,7 @@ public class Bug48571DUnitTest extends DistributedTestCase {
         return "Did not receive last key.";
       }
     };
-    DistributedTestCase.waitForCriterion(wc, 60*1000, 500, true);
+    Wait.waitForCriterion(wc, 60*1000, 500, true);
   }
 
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/76e324b5/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/EventIdOptimizationDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/EventIdOptimizationDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/EventIdOptimizationDUnitTest.java
index fe1edb0..333086b 100755
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/EventIdOptimizationDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/EventIdOptimizationDUnitTest.java
@@ -43,6 +43,8 @@ import com.gemstone.gemfire.internal.cache.EntryEventImpl;
 import com.gemstone.gemfire.internal.cache.EventID;
 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.cache.client.internal.ServerRegionProxy;
 import com.gemstone.gemfire.cache.client.internal.Connection;
@@ -173,9 +175,9 @@ public class EventIdOptimizationDUnitTest extends DistributedTestCase
         "createServerCache")).intValue();
 
     client1.invoke(EventIdOptimizationDUnitTest.class, "createClientCache1",
-        new Object[] { getServerHostName(host), new Integer(PORT1) });
+        new Object[] { NetworkSupport.getServerHostName(host), new Integer(PORT1) });
     client2.invoke(EventIdOptimizationDUnitTest.class, "createClientCache2",
-        new Object[] { getServerHostName(host), new Integer(PORT2) });
+        new Object[] { NetworkSupport.getServerHostName(host), new Integer(PORT2) });
 
   }
 
@@ -452,7 +454,7 @@ public class EventIdOptimizationDUnitTest extends DistributedTestCase
       synchronized (EventIdOptimizationDUnitTest.class) {
         if (!proceedForValidation)
           try {
-            getLogWriter().info(
+            LogWriterSupport.getLogWriter().info(
                 "Client2 going in wait before starting validation");
             EventIdOptimizationDUnitTest.class.wait();
           }
@@ -461,12 +463,12 @@ public class EventIdOptimizationDUnitTest extends DistributedTestCase
           }
       }
     }
-    getLogWriter().info("Starting validation on client2");
+    LogWriterSupport.getLogWriter().info("Starting validation on client2");
     if (validationFailed) {
       fail("\n The following eventIds recieved by client2 were not present in the eventId array sent by client1 \n"
           + failureMsg);
     }
-    getLogWriter().info("Validation complete on client2, goin to unregister listeners");
+    LogWriterSupport.getLogWriter().info("Validation complete on client2, goin to unregister listeners");
     
     Region region = cache.getRegion(Region.SEPARATOR + REGION_NAME);
     if (region != null && !region.isDestroyed()) {
@@ -490,7 +492,7 @@ public class EventIdOptimizationDUnitTest extends DistributedTestCase
       }
     }
     
-    getLogWriter().info("Test completed, Unregistered the listeners");
+    LogWriterSupport.getLogWriter().info("Test completed, Unregistered the listeners");
   }
 
   /**
@@ -570,7 +572,7 @@ public class EventIdOptimizationDUnitTest extends DistributedTestCase
         && (eventIdAtClient2.getSequenceID() == eventIdForLastKey
             .getSequenceID())) {
       synchronized (EventIdOptimizationDUnitTest.class) {
-        getLogWriter().info("Notifying client2 to proceed for validation");
+        LogWriterSupport.getLogWriter().info("Notifying client2 to proceed for validation");
         proceedForValidation = true;
         EventIdOptimizationDUnitTest.class.notify();
       }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/76e324b5/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/FailoverDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/FailoverDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/FailoverDUnitTest.java
index c10bf55..c99bdad 100755
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/FailoverDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/FailoverDUnitTest.java
@@ -42,7 +42,10 @@ import com.gemstone.gemfire.internal.cache.tier.sockets.ConflationDUnitTest;
 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.PoolManager;
 import com.gemstone.gemfire.cache.client.internal.PoolImpl;
 
@@ -87,7 +90,7 @@ public class FailoverDUnitTest extends DistributedTestCase
     PORT2 =  ((Integer)vm1.invoke(FailoverDUnitTest.class, "createServerCache" )).intValue();
 
     CacheServerTestUtil.disableShufflingOfEndpoints();
-    createClientCache(getServerHostName(host), new Integer(PORT1),new Integer(PORT2));
+    createClientCache(NetworkSupport.getServerHostName(host), new Integer(PORT1),new Integer(PORT2));
     { // calculate the primary vm
       waitForPrimaryAndBackups(1);
       PoolImpl pool = (PoolImpl)PoolManager.find("FailoverPool");
@@ -189,7 +192,7 @@ public class FailoverDUnitTest extends DistributedTestCase
         return null;
       }
     };
-    DistributedTestCase.waitForCriterion(ev, 20 * 1000, 200, true);
+    Wait.waitForCriterion(ev, 20 * 1000, 200, true);
     assertNotNull(pool.getPrimary());
     assertTrue("backups="+pool.getRedundants() + " expected=" + numBackups,
                pool.getRedundants().size() >= numBackups);
@@ -272,7 +275,7 @@ public class FailoverDUnitTest extends DistributedTestCase
         return null;
       }
     };
-    DistributedTestCase.waitForCriterion(ev, 20 * 1000, 200, true);
+    Wait.waitForCriterion(ev, 20 * 1000, 200, true);
 
     assertEquals("value-1", r.getEntry("key-1").getValue());
     assertEquals("value-2", r.getEntry("key-2").getValue());
@@ -315,7 +318,7 @@ public class FailoverDUnitTest extends DistributedTestCase
         return null;
       }
     };
-    DistributedTestCase.waitForCriterion(ev, 20 * 1000, 200, true);
+    Wait.waitForCriterion(ev, 20 * 1000, 200, true);
     assertEquals("value-5", r.getEntry("key-5").getValue());
     assertEquals("value-4", r.getEntry("key-4").getValue());
   }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/76e324b5/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/HABugInPutDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/HABugInPutDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/HABugInPutDUnitTest.java
index c356816..565ec10 100755
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/HABugInPutDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/HABugInPutDUnitTest.java
@@ -36,6 +36,7 @@ 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;
 
 /**
@@ -96,9 +97,9 @@ public class HABugInPutDUnitTest extends DistributedTestCase
         .intValue();
 
     client1.invoke(HABugInPutDUnitTest.class, "createClientCache", new Object[] {
-        getServerHostName(host), new Integer(PORT1), new Integer(PORT2) });
+        NetworkSupport.getServerHostName(host), new Integer(PORT1), new Integer(PORT2) });
     client2.invoke(HABugInPutDUnitTest.class, "createClientCache", new Object[] {
-        getServerHostName(host), new Integer(PORT1), new Integer(PORT2) });
+        NetworkSupport.getServerHostName(host), new Integer(PORT1), new Integer(PORT2) });
     //Boolean.getBoolean("")
 
   }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/76e324b5/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/HAClearDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/HAClearDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/HAClearDUnitTest.java
index 2528b2b..cd0d5a6 100755
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/HAClearDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/HAClearDUnitTest.java
@@ -39,6 +39,8 @@ import com.gemstone.gemfire.internal.cache.LocalRegion;
 import com.gemstone.gemfire.internal.cache.tier.sockets.ConflationDUnitTest;
 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.cache.Region;
 
@@ -527,7 +529,7 @@ public class HAClearDUnitTest extends DistributedTestCase
       {
         Region region = cache.getRegion(Region.SEPARATOR + REGION_NAME);
         assertNotNull(region);
-        getLogWriter().info("Size of the region " + region.size());
+        LogWriterSupport.getLogWriter().info("Size of the region " + region.size());
         assertEquals(size, region.size());
       }
     };
@@ -542,7 +544,7 @@ public class HAClearDUnitTest extends DistributedTestCase
       public void run2() throws CacheException
       {
         Region region = cache.getRegion(Region.SEPARATOR + REGION_NAME);
-        getLogWriter().warning("Found region " + region);
+        LogWriterSupport.getLogWriter().warning("Found region " + region);
         assertNull(region);
       }
     };
@@ -559,14 +561,14 @@ public class HAClearDUnitTest extends DistributedTestCase
     PORT2 = ((Integer)server2.invoke(HAClearDUnitTest.class,
         "createServerCache")).intValue();
     client1.invoke(HAClearDUnitTest.class, "createClientCache", new Object[] {
-        getServerHostName(Host.getHost(0)),
+        NetworkSupport.getServerHostName(Host.getHost(0)),
         new Integer(PORT1), new Integer(PORT2), new Boolean(true),
         new Boolean(true) });
     client2.invoke(HAClearDUnitTest.class, "createClientCache", new Object[] {
-        getServerHostName(Host.getHost(0)),
+        NetworkSupport.getServerHostName(Host.getHost(0)),
         new Integer(PORT1), new Integer(PORT2), new Boolean(true),
         new Boolean(true) });
-    createClientCache(getServerHostName(Host.getHost(0)),
+    createClientCache(NetworkSupport.getServerHostName(Host.getHost(0)),
         new Integer(PORT1), new Integer(PORT2),
         new Boolean(true), new Boolean(true));
   }
@@ -616,7 +618,7 @@ public class HAClearDUnitTest extends DistributedTestCase
       factory.setCacheListener(new CacheListenerAdapter() {
         public void afterRegionClear(RegionEvent event)
         {
-          getLogWriter().info("-------> afterRegionClear received");
+          LogWriterSupport.getLogWriter().info("-------> afterRegionClear received");
           synchronized (HAClearDUnitTest.class) {
             gotClearCallback = true;
             HAClearDUnitTest.class.notifyAll();
@@ -626,7 +628,7 @@ public class HAClearDUnitTest extends DistributedTestCase
         public void afterRegionDestroy(RegionEvent event)
         {
           synchronized (HAClearDUnitTest.class) {
-            getLogWriter().info("-------> afterRegionDestroy received");
+            LogWriterSupport.getLogWriter().info("-------> afterRegionDestroy received");
             gotDestroyRegionCallback = true;
             HAClearDUnitTest.class.notifyAll();
           }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/76e324b5/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/HAConflationDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/HAConflationDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/HAConflationDUnitTest.java
index a86b50a..fd4b1c3 100755
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/HAConflationDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/HAConflationDUnitTest.java
@@ -39,8 +39,10 @@ import com.gemstone.gemfire.internal.AvailablePort;
 import com.gemstone.gemfire.internal.cache.CacheServerImpl;
 import com.gemstone.gemfire.internal.cache.tier.sockets.ConflationDUnitTest;
 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.DistributedTestCase.WaitCriterion;
+import com.gemstone.gemfire.test.dunit.Wait;
+import com.gemstone.gemfire.test.dunit.WaitCriterion;
 
 /**
  * This is Targetted conflation Dunit test.
@@ -112,7 +114,7 @@ public class HAConflationDUnitTest extends CacheTestCase
     server1.invoke(ConflationDUnitTest.class, "setIsSlowStart");
     server1.invoke(HAConflationDUnitTest.class, "makeDispatcherSlow");
     client1.invoke(HAConflationDUnitTest.class, "createClientCache",
-        new Object[] { getServerHostName(host), new Integer(PORT1), new Boolean(true) });
+        new Object[] { NetworkSupport.getServerHostName(host), new Integer(PORT1), new Boolean(true) });
 
   }
 
@@ -287,7 +289,7 @@ public class HAConflationDUnitTest extends CacheTestCase
             }
           };
           
-          waitForCriterion(w, 3 * 60 * 1000, interval, true);
+          Wait.waitForCriterion(w, 3 * 60 * 1000, interval, true);
       }
     };
     return checkEvents;



Mime
View raw message