geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kl...@apache.org
Subject [28/44] incubator-geode git commit: Refactor dunit
Date Tue, 02 Feb 2016 20:21:35 GMT
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/76e324b5/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionSingleHopDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionSingleHopDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionSingleHopDUnitTest.java
index 1d57733..12312c7 100755
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionSingleHopDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionSingleHopDUnitTest.java
@@ -67,10 +67,14 @@ import com.gemstone.gemfire.internal.cache.execute.data.ShipmentId;
 import com.gemstone.gemfire.internal.cache.tier.sockets.CacheServerTestUtil;
 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.DistributedTestSupport;
 import com.gemstone.gemfire.test.dunit.Host;
 import com.gemstone.gemfire.test.dunit.IgnoredException;
+import com.gemstone.gemfire.test.dunit.LogWriterSupport;
+import com.gemstone.gemfire.test.dunit.NetworkSupport;
 import com.gemstone.gemfire.test.dunit.VM;
+import com.gemstone.gemfire.test.dunit.Wait;
+import com.gemstone.gemfire.test.dunit.WaitCriterion;
 
 public class PartitionedRegionSingleHopDUnitTest extends CacheTestCase {
 
@@ -106,7 +110,7 @@ public class PartitionedRegionSingleHopDUnitTest extends CacheTestCase {
 
   public void setUp() throws Exception {
     super.setUp();
-    IgnoredException.addExpectedException("Connection refused");
+    IgnoredException.addIgnoredException("Connection refused");
     Host host = Host.getHost(0);
     member0 = host.getVM(0);
     member1 = host.getVM(1);
@@ -133,7 +137,7 @@ public class PartitionedRegionSingleHopDUnitTest extends CacheTestCase {
 
     }
     finally {
-      unregisterAllDataSerializersFromAllVms();
+      DistributedTestSupport.unregisterAllDataSerializersFromAllVms();
     }
   }
 
@@ -199,7 +203,7 @@ public class PartitionedRegionSingleHopDUnitTest extends CacheTestCase {
     attr.setConcurrencyChecksEnabled(true);
     region = cache.createRegion(PR_NAME, attr.create());
     assertNotNull(region);
-    getLogWriter().info(
+    LogWriterSupport.getLogWriter().info(
         "Partitioned Region " + PR_NAME + " created Successfully :"
             + region.toString());
 
@@ -213,7 +217,7 @@ public class PartitionedRegionSingleHopDUnitTest extends CacheTestCase {
     attr.setConcurrencyChecksEnabled(true);
     customerRegion = cache.createRegion("CUSTOMER", attr.create());
     assertNotNull(customerRegion);
-    getLogWriter().info(
+    LogWriterSupport.getLogWriter().info(
         "Partitioned Region CUSTOMER created Successfully :"
             + customerRegion.toString());
 
@@ -227,7 +231,7 @@ public class PartitionedRegionSingleHopDUnitTest extends CacheTestCase {
     attr.setConcurrencyChecksEnabled(true);
     orderRegion = cache.createRegion("ORDER", attr.create());
     assertNotNull(orderRegion);
-    getLogWriter().info(
+    LogWriterSupport.getLogWriter().info(
         "Partitioned Region ORDER created Successfully :"
             + orderRegion.toString());
 
@@ -241,7 +245,7 @@ public class PartitionedRegionSingleHopDUnitTest extends CacheTestCase {
     attr.setConcurrencyChecksEnabled(true);
     shipmentRegion = cache.createRegion("SHIPMENT", attr.create());
     assertNotNull(shipmentRegion);
-    getLogWriter().info(
+    LogWriterSupport.getLogWriter().info(
         "Partitioned Region SHIPMENT created Successfully :"
             + shipmentRegion.toString());
     return port;
@@ -440,7 +444,7 @@ public class PartitionedRegionSingleHopDUnitTest extends CacheTestCase {
         return "expected metadataservice to be called atleast once, but it was not called";
       }
     };
-    DistributedTestCase.waitForCriterion(wc, 60000, 1000, true);
+    Wait.waitForCriterion(wc, 60000, 1000, true);
 
     cms.satisfyRefreshMetadata_TEST_ONLY(false);
     region.put(new Integer(0), "create0");
@@ -457,7 +461,7 @@ public class PartitionedRegionSingleHopDUnitTest extends CacheTestCase {
         return "expected no metadata to be refreshed";
       }
     };
-    DistributedTestCase.waitForCriterion(wc, 60000, 1000, true);
+    Wait.waitForCriterion(wc, 60000, 1000, true);
 
   }
 
@@ -499,7 +503,7 @@ public class PartitionedRegionSingleHopDUnitTest extends CacheTestCase {
         return "expected metadataservice to be called atleast once, but it was not called";
       }
     };
-    DistributedTestCase.waitForCriterion(wc, 60000, 1000, true);
+    Wait.waitForCriterion(wc, 60000, 1000, true);
   }
 
   public void test_MetadataServiceCallAccuracy_FromGetOp() {
@@ -541,15 +545,15 @@ public class PartitionedRegionSingleHopDUnitTest extends CacheTestCase {
         return "expected metadataservice to be called atleast once, but it was not called";
       }
     };
-    DistributedTestCase.waitForCriterion(wc, 60000, 1000, true);
+    Wait.waitForCriterion(wc, 60000, 1000, true);
     printMetadata();
-    pause(5000);
+    Wait.pause(5000);
     cms.satisfyRefreshMetadata_TEST_ONLY(false);
     region.get(new Integer(0));
     region.get(new Integer(1));
     region.get(new Integer(2));
     region.get(new Integer(3));
-    pause(5000);
+    Wait.pause(5000);
     assertFalse(cms.isRefreshMetadataTestOnly());
 
   }
@@ -593,7 +597,7 @@ public class PartitionedRegionSingleHopDUnitTest extends CacheTestCase {
         return "expected metadataservice to be called atleast once, but it was not called";
       }
     };
-    DistributedTestCase.waitForCriterion(wc, 60000, 1000, true);
+    Wait.waitForCriterion(wc, 60000, 1000, true);
 
     // kill server
     member0.invoke(PartitionedRegionSingleHopDUnitTest.class, "stopServer");
@@ -606,7 +610,7 @@ public class PartitionedRegionSingleHopDUnitTest extends CacheTestCase {
 
   public void test_SingleHopWithHAWithLocator() {
     int port3 = AvailablePort.getRandomAvailablePort(AvailablePort.SOCKET);
-    final String host0 = getServerHostName(member3.getHost());
+    final String host0 = NetworkSupport.getServerHostName(member3.getHost());
     final String locator = host0 + "[" + port3 + "]";
     member3.invoke(PartitionedRegionSingleHopDUnitTest.class,
         "startLocatorInVM", new Object[] { port3 });
@@ -671,7 +675,7 @@ public class PartitionedRegionSingleHopDUnitTest extends CacheTestCase {
     region.get(new Integer(1));
     region.get(new Integer(2));
     region.get(new Integer(3));
-    pause(5000);
+    Wait.pause(5000);
     assertFalse(cms.isRefreshMetadataTestOnly());
     printMetadata();
 
@@ -680,7 +684,7 @@ public class PartitionedRegionSingleHopDUnitTest extends CacheTestCase {
     region.get(new Integer(1));
     region.get(new Integer(2));
     region.get(new Integer(3));
-    pause(5000);
+    Wait.pause(5000);
     assertFalse(cms.isRefreshMetadataTestOnly());
   }
 
@@ -724,7 +728,7 @@ public class PartitionedRegionSingleHopDUnitTest extends CacheTestCase {
     region.put(new Integer(3), "create3");
     final boolean metadataRefreshed_get4 = cms
         .isRefreshMetadataTestOnly();
-    pause(5000);
+    Wait.pause(5000);
     assertFalse(metadataRefreshed_get1 || metadataRefreshed_get2
             || metadataRefreshed_get3 || metadataRefreshed_get4);
 
@@ -734,7 +738,7 @@ public class PartitionedRegionSingleHopDUnitTest extends CacheTestCase {
     region.put(new Integer(1), "create1");
     region.put(new Integer(2), "create2");
     region.put(new Integer(3), "create3");
-    pause(5000);
+    Wait.pause(5000);
     assertFalse(cms.isRefreshMetadataTestOnly());
 
   }
@@ -762,7 +766,7 @@ public class PartitionedRegionSingleHopDUnitTest extends CacheTestCase {
     region.destroy(new Integer(1));
     region.destroy(new Integer(2));
     region.destroy(new Integer(3));
-    pause(5000);
+    Wait.pause(5000);
     assertFalse(cms.isRefreshMetadataTestOnly());
   }
 
@@ -782,7 +786,7 @@ public class PartitionedRegionSingleHopDUnitTest extends CacheTestCase {
     createClient(port0, port1, port2, port3);
     putIntoPartitionedRegions();    
     getFromPartitionedRegions();
-    pause(5000);
+    Wait.pause(5000);
     ClientMetadataService cms = ((GemFireCacheImpl)cache).getClientMetadataService();
     Map<String, ClientPartitionAdvisor> regionMetaData = cms.getClientPRMetadata_TEST_ONLY();    
     assertEquals(4, regionMetaData.size());
@@ -799,7 +803,7 @@ public class PartitionedRegionSingleHopDUnitTest extends CacheTestCase {
     }
     member0.invoke(PartitionedRegionSingleHopDUnitTest.class, "stopServer");
     member1.invoke(PartitionedRegionSingleHopDUnitTest.class, "stopServer");
-    pause(5000);//make sure that ping detects the dead servers
+    Wait.pause(5000);//make sure that ping detects the dead servers
     getFromPartitionedRegions();
     verifyDeadServer(regionMetaData, customerRegion, port0, port1);
     verifyDeadServer(regionMetaData, region, port0, port1);
@@ -807,7 +811,7 @@ public class PartitionedRegionSingleHopDUnitTest extends CacheTestCase {
   
   public void testMetadataFetchOnlyThroughFunctions() {
     //Workaround for 52004
-    IgnoredException.addExpectedException("InternalFunctionInvocationTargetException");
+    IgnoredException.addIgnoredException("InternalFunctionInvocationTargetException");
     Integer port0 = (Integer)member0.invoke(
         PartitionedRegionSingleHopDUnitTest.class, "createServer",
         new Object[] { 3, 4 });
@@ -834,7 +838,7 @@ public class PartitionedRegionSingleHopDUnitTest extends CacheTestCase {
         return "expected no metadata to be refreshed";
       }
     };
-    DistributedTestCase.waitForCriterion(wc, 60000, 1000, true);
+    Wait.waitForCriterion(wc, 60000, 1000, true);
     
     assertEquals(1, regionMetaData.size());
     assertTrue(regionMetaData.containsKey(region.getFullPath()));
@@ -868,7 +872,7 @@ public class PartitionedRegionSingleHopDUnitTest extends CacheTestCase {
         return "expected no metadata to be refreshed";
       }
     };
-    DistributedTestCase.waitForCriterion(wc, 60000, 1000, true);
+    Wait.waitForCriterion(wc, 60000, 1000, true);
 //    assertEquals(4/*numBuckets*/, prMetaData.getBucketServerLocationsMap_TEST_ONLY().size());    
   }
 
@@ -898,7 +902,7 @@ public class PartitionedRegionSingleHopDUnitTest extends CacheTestCase {
         return "expected no metadata to be refreshed";
       }
     };
-    DistributedTestCase.waitForCriterion(wc, 60000, 1000, true);
+    Wait.waitForCriterion(wc, 60000, 1000, true);
     
     assertTrue(regionMetaData.containsKey(region.getFullPath()));
     
@@ -912,7 +916,7 @@ public class PartitionedRegionSingleHopDUnitTest extends CacheTestCase {
         return "expected no metadata to be refreshed";
       }
     };
-    DistributedTestCase.waitForCriterion(wc, 60000, 1000, true);  
+    Wait.waitForCriterion(wc, 60000, 1000, true);  
   }
   
   
@@ -957,7 +961,7 @@ public class PartitionedRegionSingleHopDUnitTest extends CacheTestCase {
         return "expected no metadata to be refreshed";
       }
     };
-    DistributedTestCase.waitForCriterion(wc, 60000, 1000, true); 
+    Wait.waitForCriterion(wc, 60000, 1000, true); 
     for (Entry entry : clientMap.entrySet()) {
       assertEquals(4, ((List)entry.getValue()).size());
     }
@@ -992,7 +996,7 @@ public class PartitionedRegionSingleHopDUnitTest extends CacheTestCase {
         for (Entry entry : clientMap.entrySet()) {
           List list = (List)entry.getValue();
           if(list.size()<4){
-            getLogWriter().info("still waiting for 4 bucket owners in " + entry.getKey() + ": " + list);
+            LogWriterSupport.getLogWriter().info("still waiting for 4 bucket owners in " + entry.getKey() + ": " + list);
             finished = false;
             break;
           }
@@ -1003,7 +1007,7 @@ public class PartitionedRegionSingleHopDUnitTest extends CacheTestCase {
         return "bucket copies are not created";
       }
     };
-    DistributedTestCase.waitForCriterion(wc, 60000, 400, true);
+    Wait.waitForCriterion(wc, 60000, 400, true);
     cms = ((GemFireCacheImpl)cache).getClientMetadataService();
     cms.getClientPRMetadata((LocalRegion)region);
     
@@ -1022,7 +1026,7 @@ public class PartitionedRegionSingleHopDUnitTest extends CacheTestCase {
         return "expected no metadata to be refreshed";
       }
     };
-    DistributedTestCase.waitForCriterion(wc, 60000, 1000, true); 
+    Wait.waitForCriterion(wc, 60000, 1000, true); 
     for (Entry entry : clientMap.entrySet()) {
       assertEquals(4, ((List)entry.getValue()).size());
     }
@@ -1079,12 +1083,12 @@ public class PartitionedRegionSingleHopDUnitTest extends CacheTestCase {
         return "expected no metadata to be refreshed";
       }
     };
-    DistributedTestCase.waitForCriterion(wc, 60000, 1000, true); 
+    Wait.waitForCriterion(wc, 60000, 1000, true); 
     for (Entry entry : clientMap.entrySet()) {
       assertEquals(2, ((List)entry.getValue()).size());
     }
     final Map<Integer, List<BucketServerLocation66>> fclientMap = clientMap;
-    waitForCriterion(new WaitCriterion() {
+    Wait.waitForCriterion(new WaitCriterion() {
 
       public boolean done() {
         try {
@@ -1093,7 +1097,7 @@ public class PartitionedRegionSingleHopDUnitTest extends CacheTestCase {
           member2.invoke(PartitionedRegionSingleHopDUnitTest.class, "verifyMetadata", new Object[]{fclientMap});
           member3.invoke(PartitionedRegionSingleHopDUnitTest.class, "verifyMetadata", new Object[]{fclientMap});
         } catch (Exception e) {
-          getLogWriter().info("verification failed", e);
+          LogWriterSupport.getLogWriter().info("verification failed", e);
           return false;
         }
         return true;
@@ -1131,7 +1135,7 @@ public class PartitionedRegionSingleHopDUnitTest extends CacheTestCase {
         return "expected metadata is ready";
       }
     };
-    DistributedTestCase.waitForCriterion(wc, 60000, 1000, true);
+    Wait.waitForCriterion(wc, 60000, 1000, true);
     
     assertEquals(1, regionMetaData.size());
     assertTrue(regionMetaData.containsKey(region.getFullPath()));
@@ -1165,7 +1169,7 @@ public class PartitionedRegionSingleHopDUnitTest extends CacheTestCase {
         return "expected no metadata to be refreshed";
       }
     };
-    DistributedTestCase.waitForCriterion(wc, 60000, 1000, true); 
+    Wait.waitForCriterion(wc, 60000, 1000, true); 
     for (Entry entry : clientMap.entrySet()) {
       assertEquals(2, ((List)entry.getValue()).size());
     }
@@ -1215,7 +1219,7 @@ public class PartitionedRegionSingleHopDUnitTest extends CacheTestCase {
             + bucketId + " size : " + size + " the list is " + globalList;
       }
     };
-    DistributedTestCase.waitForCriterion(wc, 60000, 400, true);
+    Wait.waitForCriterion(wc, 60000, 400, true);
   }
 
   //TODO This is failing in WAN_Dev_Dec11 branch after downmerge from trunk revision 34709
@@ -1249,7 +1253,7 @@ public class PartitionedRegionSingleHopDUnitTest extends CacheTestCase {
     member1.invoke(PartitionedRegionSingleHopDUnitTest.class, "closeCache");
     member2.invoke(PartitionedRegionSingleHopDUnitTest.class, "closeCache");
     member3.invoke(PartitionedRegionSingleHopDUnitTest.class, "closeCache");
-    pause(1000); //let client detect that servers are dead through ping
+    Wait.pause(1000); //let client detect that servers are dead through ping
     AsyncInvocation m3 = member3.invokeAsync(PartitionedRegionSingleHopDUnitTest.class, "createPersistentPrsAndServerOnPort",new Object[] { 3, 4,port3 });
     AsyncInvocation m2 = member2.invokeAsync(PartitionedRegionSingleHopDUnitTest.class, "createPersistentPrsAndServerOnPort",new Object[] { 3, 4,port2 });
     AsyncInvocation m1 = member1.invokeAsync(PartitionedRegionSingleHopDUnitTest.class, "createPersistentPrsAndServerOnPort",new Object[] { 3, 4,port1 });
@@ -1335,7 +1339,7 @@ public class PartitionedRegionSingleHopDUnitTest extends CacheTestCase {
             + pr.getDataStore().getAllLocalBuckets().size();
       }
     };
-    DistributedTestCase.waitForCriterion(wc, 60000, 400, true);
+    Wait.waitForCriterion(wc, 60000, 400, true);
   }
   
   public static void waitForBucketsCreation(){
@@ -1351,7 +1355,7 @@ public class PartitionedRegionSingleHopDUnitTest extends CacheTestCase {
         return "bucket copies are not created";
       }
     };
-    DistributedTestCase.waitForCriterion(wc, 60000, 400, true);
+    Wait.waitForCriterion(wc, 60000, 400, true);
   }
   
   private void verifyDeadServer(Map<String, ClientPartitionAdvisor> regionMetaData, Region region, int port0, int port1) {
@@ -1417,7 +1421,7 @@ public class PartitionedRegionSingleHopDUnitTest extends CacheTestCase {
     region = cache.createRegion(PR_NAME, attr.create());
 
     assertNotNull(region);
-    getLogWriter().info(
+    LogWriterSupport.getLogWriter().info(
         "Partitioned Region " + PR_NAME + " created Successfully :"
             + region.toString());
 
@@ -1431,7 +1435,7 @@ public class PartitionedRegionSingleHopDUnitTest extends CacheTestCase {
     attr.setConcurrencyChecksEnabled(true);
     customerRegion = cache.createRegion("CUSTOMER", attr.create());
     assertNotNull(customerRegion);
-    getLogWriter().info(
+    LogWriterSupport.getLogWriter().info(
         "Partitioned Region CUSTOMER created Successfully :"
             + customerRegion.toString());
 
@@ -1444,7 +1448,7 @@ public class PartitionedRegionSingleHopDUnitTest extends CacheTestCase {
     attr.setConcurrencyChecksEnabled(true);
     orderRegion = cache.createRegion("ORDER", attr.create());
     assertNotNull(orderRegion);
-    getLogWriter().info(
+    LogWriterSupport.getLogWriter().info(
         "Partitioned Region ORDER created Successfully :"
             + orderRegion.toString());
 
@@ -1457,7 +1461,7 @@ public class PartitionedRegionSingleHopDUnitTest extends CacheTestCase {
     attr.setConcurrencyChecksEnabled(true);
     shipmentRegion = cache.createRegion("SHIPMENT", attr.create());
     assertNotNull(shipmentRegion);
-    getLogWriter().info(
+    LogWriterSupport.getLogWriter().info(
         "Partitioned Region SHIPMENT created Successfully :"
             + shipmentRegion.toString());
     replicatedRegion = cache.createRegion("rr", new AttributesFactory().create());
@@ -1487,7 +1491,7 @@ public class PartitionedRegionSingleHopDUnitTest extends CacheTestCase {
     attr.setConcurrencyChecksEnabled(true);
     region = cache.createRegion(PR_NAME, attr.create());
     assertNotNull(region);
-    getLogWriter().info(
+    LogWriterSupport.getLogWriter().info(
         "Partitioned Region " + PR_NAME + " created Successfully :"
             + region.toString());
 
@@ -1501,7 +1505,7 @@ public class PartitionedRegionSingleHopDUnitTest extends CacheTestCase {
     attr.setConcurrencyChecksEnabled(true);
     customerRegion = cache.createRegion("CUSTOMER", attr.create());
     assertNotNull(customerRegion);
-    getLogWriter().info(
+    LogWriterSupport.getLogWriter().info(
         "Partitioned Region CUSTOMER created Successfully :"
             + customerRegion.toString());
 
@@ -1515,7 +1519,7 @@ public class PartitionedRegionSingleHopDUnitTest extends CacheTestCase {
     attr.setConcurrencyChecksEnabled(true);
     orderRegion = cache.createRegion("ORDER", attr.create());
     assertNotNull(orderRegion);
-    getLogWriter().info(
+    LogWriterSupport.getLogWriter().info(
         "Partitioned Region ORDER created Successfully :"
             + orderRegion.toString());
 
@@ -1529,7 +1533,7 @@ public class PartitionedRegionSingleHopDUnitTest extends CacheTestCase {
     attr.setConcurrencyChecksEnabled(true);
     shipmentRegion = cache.createRegion("SHIPMENT", attr.create());
     assertNotNull(shipmentRegion);
-    getLogWriter().info(
+    LogWriterSupport.getLogWriter().info(
         "Partitioned Region SHIPMENT created Successfully :"
             + shipmentRegion.toString());    
     
@@ -1557,7 +1561,7 @@ public class PartitionedRegionSingleHopDUnitTest extends CacheTestCase {
 //    attr.setConcurrencyChecksEnabled(true);
     region = cache.createRegion(PR_NAME, attr.create());
     assertNotNull(region);
-    getLogWriter().info(
+    LogWriterSupport.getLogWriter().info(
         "Partitioned Region " + PR_NAME + " created Successfully :"
             + region.toString());
 
@@ -1573,7 +1577,7 @@ public class PartitionedRegionSingleHopDUnitTest extends CacheTestCase {
 //    attr.setConcurrencyChecksEnabled(true);
     customerRegion = cache.createRegion("CUSTOMER", attr.create());
     assertNotNull(customerRegion);
-    getLogWriter().info(
+    LogWriterSupport.getLogWriter().info(
         "Partitioned Region CUSTOMER created Successfully :"
             + customerRegion.toString());
 
@@ -1589,7 +1593,7 @@ public class PartitionedRegionSingleHopDUnitTest extends CacheTestCase {
 //    attr.setConcurrencyChecksEnabled(true);
     orderRegion = cache.createRegion("ORDER", attr.create());
     assertNotNull(orderRegion);
-    getLogWriter().info(
+    LogWriterSupport.getLogWriter().info(
         "Partitioned Region ORDER created Successfully :"
             + orderRegion.toString());
 
@@ -1605,7 +1609,7 @@ public class PartitionedRegionSingleHopDUnitTest extends CacheTestCase {
 //    attr.setConcurrencyChecksEnabled(true);
     shipmentRegion = cache.createRegion("SHIPMENT", attr.create());
     assertNotNull(shipmentRegion);
-    getLogWriter().info(
+    LogWriterSupport.getLogWriter().info(
         "Partitioned Region SHIPMENT created Successfully :"
             + shipmentRegion.toString());    
     
@@ -1641,7 +1645,7 @@ public class PartitionedRegionSingleHopDUnitTest extends CacheTestCase {
 //    attr.setConcurrencyChecksEnabled(true);
     region = cache.createRegion(PR_NAME, attr.create());
     assertNotNull(region);
-    getLogWriter().info(
+    LogWriterSupport.getLogWriter().info(
         "Partitioned Region " + PR_NAME + " created Successfully :"
             + region.toString());
 
@@ -1657,7 +1661,7 @@ public class PartitionedRegionSingleHopDUnitTest extends CacheTestCase {
 //    attr.setConcurrencyChecksEnabled(true);
     customerRegion = cache.createRegion("CUSTOMER", attr.create());
     assertNotNull(customerRegion);
-    getLogWriter().info(
+    LogWriterSupport.getLogWriter().info(
         "Partitioned Region CUSTOMER created Successfully :"
             + customerRegion.toString());
 
@@ -1673,7 +1677,7 @@ public class PartitionedRegionSingleHopDUnitTest extends CacheTestCase {
 //    attr.setConcurrencyChecksEnabled(true);
     orderRegion = cache.createRegion("ORDER", attr.create());
     assertNotNull(orderRegion);
-    getLogWriter().info(
+    LogWriterSupport.getLogWriter().info(
         "Partitioned Region ORDER created Successfully :"
             + orderRegion.toString());
 
@@ -1689,7 +1693,7 @@ public class PartitionedRegionSingleHopDUnitTest extends CacheTestCase {
 //    attr.setConcurrencyChecksEnabled(true);
     shipmentRegion = cache.createRegion("SHIPMENT", attr.create());
     assertNotNull(shipmentRegion);
-    getLogWriter().info(
+    LogWriterSupport.getLogWriter().info(
         "Partitioned Region SHIPMENT created Successfully :"
             + shipmentRegion.toString());    
     
@@ -1727,7 +1731,7 @@ public class PartitionedRegionSingleHopDUnitTest extends CacheTestCase {
     attr.setConcurrencyChecksEnabled(true);
     region = cache.createRegion(PR_NAME, attr.create());
     assertNotNull(region);
-    getLogWriter().info(
+    LogWriterSupport.getLogWriter().info(
         "Partitioned Region " + PR_NAME + " created Successfully :"
             + region.toString());
 
@@ -1741,7 +1745,7 @@ public class PartitionedRegionSingleHopDUnitTest extends CacheTestCase {
     attr.setConcurrencyChecksEnabled(true);
     customerRegion = cache.createRegion("CUSTOMER", attr.create());
     assertNotNull(customerRegion);
-    getLogWriter().info(
+    LogWriterSupport.getLogWriter().info(
         "Partitioned Region CUSTOMER created Successfully :"
             + customerRegion.toString());
 
@@ -1755,7 +1759,7 @@ public class PartitionedRegionSingleHopDUnitTest extends CacheTestCase {
     attr.setConcurrencyChecksEnabled(true);
     orderRegion = cache.createRegion("ORDER", attr.create());
     assertNotNull(orderRegion);
-    getLogWriter().info(
+    LogWriterSupport.getLogWriter().info(
         "Partitioned Region ORDER created Successfully :"
             + orderRegion.toString());
 
@@ -1769,7 +1773,7 @@ public class PartitionedRegionSingleHopDUnitTest extends CacheTestCase {
     attr.setConcurrencyChecksEnabled(true);
     shipmentRegion = cache.createRegion("SHIPMENT", attr.create());
     assertNotNull(shipmentRegion);
-    getLogWriter().info(
+    LogWriterSupport.getLogWriter().info(
         "Partitioned Region SHIPMENT created Successfully :"
             + shipmentRegion.toString());    
     
@@ -1805,7 +1809,7 @@ public class PartitionedRegionSingleHopDUnitTest extends CacheTestCase {
     attr.setConcurrencyChecksEnabled(true);
     region = cache.createRegion(PR_NAME, attr.create());
     assertNotNull(region);
-    getLogWriter().info(
+    LogWriterSupport.getLogWriter().info(
         "Partitioned Region " + PR_NAME + " created Successfully :"
             + region.toString());
 
@@ -1818,7 +1822,7 @@ public class PartitionedRegionSingleHopDUnitTest extends CacheTestCase {
     attr.setConcurrencyChecksEnabled(true);
     customerRegion = cache.createRegion("CUSTOMER", attr.create());
     assertNotNull(customerRegion);
-    getLogWriter().info(
+    LogWriterSupport.getLogWriter().info(
         "Partitioned Region CUSTOMER created Successfully :"
             + customerRegion.toString());
 
@@ -1831,7 +1835,7 @@ public class PartitionedRegionSingleHopDUnitTest extends CacheTestCase {
     attr.setConcurrencyChecksEnabled(true);
     orderRegion = cache.createRegion("ORDER", attr.create());
     assertNotNull(orderRegion);
-    getLogWriter().info(
+    LogWriterSupport.getLogWriter().info(
         "Partitioned Region ORDER created Successfully :"
             + orderRegion.toString());
 
@@ -1844,7 +1848,7 @@ public class PartitionedRegionSingleHopDUnitTest extends CacheTestCase {
     attr.setConcurrencyChecksEnabled(true);
     shipmentRegion = cache.createRegion("SHIPMENT", attr.create());
     assertNotNull(shipmentRegion);
-    getLogWriter().info(
+    LogWriterSupport.getLogWriter().info(
         "Partitioned Region SHIPMENT created Successfully :"
             + shipmentRegion.toString());
     replicatedRegion = cache.createRegion("rr", new AttributesFactory().create());
@@ -1960,7 +1964,7 @@ public class PartitionedRegionSingleHopDUnitTest extends CacheTestCase {
     RegionAttributes attrs = factory.create();
     region = cache.createRegion(PR_NAME, attrs);
     assertNotNull(region);
-    getLogWriter().info(
+    LogWriterSupport.getLogWriter().info(
         "Distributed Region " + PR_NAME + " created Successfully :"
             + region.toString());
 
@@ -1971,7 +1975,7 @@ public class PartitionedRegionSingleHopDUnitTest extends CacheTestCase {
     attrs = factory.create();
     customerRegion = cache.createRegion("CUSTOMER", attrs);
     assertNotNull(customerRegion);
-    getLogWriter().info(
+    LogWriterSupport.getLogWriter().info(
         "Distributed Region CUSTOMER created Successfully :"
             + customerRegion.toString());
 
@@ -1982,7 +1986,7 @@ public class PartitionedRegionSingleHopDUnitTest extends CacheTestCase {
     attrs = factory.create();
     orderRegion = cache.createRegion("ORDER", attrs);
     assertNotNull(orderRegion);
-    getLogWriter().info(
+    LogWriterSupport.getLogWriter().info(
         "Distributed Region ORDER created Successfully :"
             + orderRegion.toString());
 
@@ -1993,7 +1997,7 @@ public class PartitionedRegionSingleHopDUnitTest extends CacheTestCase {
     attrs = factory.create();
     shipmentRegion = cache.createRegion("SHIPMENT", attrs);
     assertNotNull(shipmentRegion);
-    getLogWriter().info(
+    LogWriterSupport.getLogWriter().info(
         "Distributed Region SHIPMENT created Successfully :"
             + shipmentRegion.toString());
     factory = new AttributesFactory();
@@ -2254,7 +2258,7 @@ public class PartitionedRegionSingleHopDUnitTest extends CacheTestCase {
         return "expected PRAdvisor to be ready";
       }
     };
-    DistributedTestCase.waitForCriterion(wc, 60000, 1000, true);
+    Wait.waitForCriterion(wc, 60000, 1000, true);
     
     assertEquals(4, regionMetaData.size());
     assertTrue(regionMetaData.containsKey(region.getFullPath()));
@@ -2268,7 +2272,7 @@ public class PartitionedRegionSingleHopDUnitTest extends CacheTestCase {
         return "expected no metadata to be refreshed";
       }
     };
-    DistributedTestCase.waitForCriterion(wc, 60000, 1000, true);
+    Wait.waitForCriterion(wc, 60000, 1000, true);
   }
 }
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/76e324b5/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionSingleHopWithServerGroupDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionSingleHopWithServerGroupDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionSingleHopWithServerGroupDUnitTest.java
index 711909d..1501e76 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionSingleHopWithServerGroupDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionSingleHopWithServerGroupDUnitTest.java
@@ -42,11 +42,16 @@ import com.gemstone.gemfire.internal.cache.execute.data.OrderId;
 import com.gemstone.gemfire.internal.cache.execute.data.ShipmentId;
 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.DistributedTestSupport;
 import com.gemstone.gemfire.test.dunit.Host;
 import com.gemstone.gemfire.test.dunit.IgnoredException;
+import com.gemstone.gemfire.test.dunit.Invoke;
+import com.gemstone.gemfire.test.dunit.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.Wait;
+import com.gemstone.gemfire.test.dunit.WaitCriterion;
 
 import java.io.File;
 import java.io.IOException;
@@ -117,7 +122,7 @@ public class PartitionedRegionSingleHopWithServerGroupDUnitTest extends CacheTes
     member1 = host.getVM(1);
     member2 = host.getVM(2);
     member3 = host.getVM(3);
-    IgnoredException.addExpectedException("java.net.SocketException");
+    IgnoredException.addIgnoredException("java.net.SocketException");
   }
   
   public void tearDown2() throws Exception {
@@ -136,7 +141,7 @@ public class PartitionedRegionSingleHopWithServerGroupDUnitTest extends CacheTes
       member1 = null;
       member2 = null;
       member3 = null;
-      invokeInEveryVM(new SerializableRunnable() { public void run() {
+      Invoke.invokeInEveryVM(new SerializableRunnable() { public void run() {
         cache = null;
         orderRegion = null;
         orderRegion2 = null;
@@ -151,7 +156,7 @@ public class PartitionedRegionSingleHopWithServerGroupDUnitTest extends CacheTes
 
     }
     finally {
-      unregisterAllDataSerializersFromAllVms();
+      DistributedTestSupport.unregisterAllDataSerializersFromAllVms();
     }
   }
 
@@ -171,7 +176,7 @@ public class PartitionedRegionSingleHopWithServerGroupDUnitTest extends CacheTes
 
   public void test_SingleHopWith2ServerGroup() {
     int port3 = AvailablePort.getRandomAvailablePort(AvailablePort.SOCKET);
-    final String host0 = getServerHostName(member3.getHost());
+    final String host0 = NetworkSupport.getServerHostName(member3.getHost());
     final String locator = host0 + "[" + port3 + "]";
     member3.invoke(PartitionedRegionSingleHopWithServerGroupDUnitTest.class,
         "startLocatorInVM", new Object[] { port3 });
@@ -205,7 +210,7 @@ public class PartitionedRegionSingleHopWithServerGroupDUnitTest extends CacheTes
 
   public void test_SingleHopWith2ServerGroup2() {
     int port3 = AvailablePort.getRandomAvailablePort(AvailablePort.SOCKET);
-    final String host0 = getServerHostName(member3.getHost());
+    final String host0 = NetworkSupport.getServerHostName(member3.getHost());
     final String locator = host0 + "[" + port3 + "]";
     member3.invoke(PartitionedRegionSingleHopWithServerGroupDUnitTest.class,
         "startLocatorInVM", new Object[] { port3 });
@@ -239,7 +244,7 @@ public class PartitionedRegionSingleHopWithServerGroupDUnitTest extends CacheTes
   
   public void test_SingleHopWith2ServerGroup2WithoutSystemProperty() {
     int port3 = AvailablePort.getRandomAvailablePort(AvailablePort.SOCKET);
-    final String host0 = getServerHostName(member3.getHost());
+    final String host0 = NetworkSupport.getServerHostName(member3.getHost());
     final String locator = host0 + "[" + port3 + "]";
     member3.invoke(PartitionedRegionSingleHopWithServerGroupDUnitTest.class,
         "startLocatorInVM", new Object[] { port3 });
@@ -268,7 +273,7 @@ public class PartitionedRegionSingleHopWithServerGroupDUnitTest extends CacheTes
 
   public void test_SingleHopWithServerGroupAccessor() {
     int port3 = AvailablePort.getRandomAvailablePort(AvailablePort.SOCKET);
-    final String host0 = getServerHostName(member3.getHost());
+    final String host0 = NetworkSupport.getServerHostName(member3.getHost());
     final String locator = host0 + "[" + port3 + "]";
     member3.invoke(PartitionedRegionSingleHopWithServerGroupDUnitTest.class,
         "startLocatorInVM", new Object[] { port3 });
@@ -301,7 +306,7 @@ public class PartitionedRegionSingleHopWithServerGroupDUnitTest extends CacheTes
   
   public void test_SingleHopWithServerGroupOneServerInTwoGroups() {
     int port3 = AvailablePort.getRandomAvailablePort(AvailablePort.SOCKET);
-    final String host0 = getServerHostName(member3.getHost());
+    final String host0 = NetworkSupport.getServerHostName(member3.getHost());
     final String locator = host0 + "[" + port3 + "]";
     member3.invoke(PartitionedRegionSingleHopWithServerGroupDUnitTest.class,
         "startLocatorInVM", new Object[] { port3 });
@@ -340,7 +345,7 @@ public class PartitionedRegionSingleHopWithServerGroupDUnitTest extends CacheTes
   
   public void test_SingleHopWithServerGroupWithOneDefaultServer() {
     int port3 = AvailablePort.getRandomAvailablePort(AvailablePort.SOCKET);
-    final String host0 = getServerHostName(member3.getHost());
+    final String host0 = NetworkSupport.getServerHostName(member3.getHost());
     final String locator = host0 + "[" + port3 + "]";
     member3.invoke(PartitionedRegionSingleHopWithServerGroupDUnitTest.class,
         "startLocatorInVM", new Object[] { port3 });
@@ -373,7 +378,7 @@ public class PartitionedRegionSingleHopWithServerGroupDUnitTest extends CacheTes
   
   public void test_SingleHopWithServerGroupClientServerGroupNull() {
     int port3 = AvailablePort.getRandomAvailablePort(AvailablePort.SOCKET);
-    final String host0 = getServerHostName(member3.getHost());
+    final String host0 = NetworkSupport.getServerHostName(member3.getHost());
     final String locator = host0 + "[" + port3 + "]";
     member3.invoke(PartitionedRegionSingleHopWithServerGroupDUnitTest.class,
         "startLocatorInVM", new Object[] { port3 });
@@ -406,7 +411,7 @@ public class PartitionedRegionSingleHopWithServerGroupDUnitTest extends CacheTes
   
   public void test_SingleHopWithServerGroupTwoClientServerGroup() {
     int port3 = AvailablePort.getRandomAvailablePort(AvailablePort.SOCKET);
-    final String host0 = getServerHostName(member3.getHost());
+    final String host0 = NetworkSupport.getServerHostName(member3.getHost());
     final String locator = host0 + "[" + port3 + "]";
     member3.invoke(PartitionedRegionSingleHopWithServerGroupDUnitTest.class,
         "startLocatorInVM", new Object[] { port3 });
@@ -453,7 +458,7 @@ public class PartitionedRegionSingleHopWithServerGroupDUnitTest extends CacheTes
   
   public void test_SingleHopWithServerGroupTwoClientServerGroup2() {
     int port3 = AvailablePort.getRandomAvailablePort(AvailablePort.SOCKET);
-    final String host0 = getServerHostName(member3.getHost());
+    final String host0 = NetworkSupport.getServerHostName(member3.getHost());
     final String locator = host0 + "[" + port3 + "]";
     member3.invoke(PartitionedRegionSingleHopWithServerGroupDUnitTest.class,
         "startLocatorInVM", new Object[] { port3 });
@@ -497,7 +502,7 @@ public class PartitionedRegionSingleHopWithServerGroupDUnitTest extends CacheTes
   
   public void test_SingleHopWithServerGroupTwoClientOneWithOneWithoutServerGroup() {
     int port3 = AvailablePort.getRandomAvailablePort(AvailablePort.SOCKET);
-    final String host0 = getServerHostName(member3.getHost());
+    final String host0 = NetworkSupport.getServerHostName(member3.getHost());
     final String locator = host0 + "[" + port3 + "]";
     member3.invoke(PartitionedRegionSingleHopWithServerGroupDUnitTest.class,
         "startLocatorInVM", new Object[] { port3 });
@@ -536,7 +541,7 @@ public class PartitionedRegionSingleHopWithServerGroupDUnitTest extends CacheTes
   
   public void test_SingleHopWithServerGroup2ClientInOneVMServerGroup() {
     int port3 = AvailablePort.getRandomAvailablePort(AvailablePort.SOCKET);
-    final String host0 = getServerHostName(member3.getHost());
+    final String host0 = NetworkSupport.getServerHostName(member3.getHost());
     final String locator = host0 + "[" + port3 + "]";
     member3.invoke(PartitionedRegionSingleHopWithServerGroupDUnitTest.class,
         "startLocatorInVM", new Object[] { port3 });
@@ -580,7 +585,7 @@ public class PartitionedRegionSingleHopWithServerGroupDUnitTest extends CacheTes
 
   public void test_SingleHopWithServerGroupColocatedRegionsInDifferentGroup() {
     int port3 = AvailablePort.getRandomAvailablePort(AvailablePort.SOCKET);
-    final String host0 = getServerHostName(member3.getHost());
+    final String host0 = NetworkSupport.getServerHostName(member3.getHost());
     final String locator = host0 + "[" + port3 + "]";
     member3.invoke(PartitionedRegionSingleHopWithServerGroupDUnitTest.class,
         "startLocatorInVM", new Object[] { port3 });
@@ -628,7 +633,7 @@ public class PartitionedRegionSingleHopWithServerGroupDUnitTest extends CacheTes
       }
     };
     
-    DistributedTestCase.waitForCriterion(wc, 60000, 1000, true);
+    Wait.waitForCriterion(wc, 60000, 1000, true);
     
     if (numRegions != 0) {
       assertTrue(regionMetaData.containsKey(region.getFullPath()));
@@ -669,7 +674,7 @@ public class PartitionedRegionSingleHopWithServerGroupDUnitTest extends CacheTes
       }
     };
 
-    DistributedTestCase.waitForCriterion(wc, 120000, 1000, true);
+    Wait.waitForCriterion(wc, 120000, 1000, true);
     
     assertTrue(regionMetaData.containsKey(region.getFullPath()));
     ClientPartitionAdvisor prMetaData = regionMetaData.get(region
@@ -749,7 +754,7 @@ public class PartitionedRegionSingleHopWithServerGroupDUnitTest extends CacheTes
       }
     };
     
-    DistributedTestCase.waitForCriterion(wc, 120000, 1000, true);
+    Wait.waitForCriterion(wc, 120000, 1000, true);
     
     if (numRegions != 0) {
       assertTrue(regionMetaData.containsKey(region.getFullPath()));
@@ -821,7 +826,7 @@ public class PartitionedRegionSingleHopWithServerGroupDUnitTest extends CacheTes
     attr.setPartitionAttributes(paf.create());
     region = cache.createRegion(PR_NAME, attr.create());
     assertNotNull(region);
-    getLogWriter().info(
+    LogWriterSupport.getLogWriter().info(
         "Partitioned Region " + PR_NAME + " created Successfully :"
             + region.toString());
 
@@ -834,7 +839,7 @@ public class PartitionedRegionSingleHopWithServerGroupDUnitTest extends CacheTes
     attr.setPartitionAttributes(paf.create());
     customerRegion = cache.createRegion("CUSTOMER", attr.create());
     assertNotNull(customerRegion);
-    getLogWriter().info(
+    LogWriterSupport.getLogWriter().info(
         "Partitioned Region CUSTOMER created Successfully :"
             + customerRegion.toString());
 
@@ -847,7 +852,7 @@ public class PartitionedRegionSingleHopWithServerGroupDUnitTest extends CacheTes
     attr.setPartitionAttributes(paf.create());
     orderRegion = cache.createRegion("ORDER", attr.create());
     assertNotNull(orderRegion);
-    getLogWriter().info(
+    LogWriterSupport.getLogWriter().info(
         "Partitioned Region ORDER created Successfully :"
             + orderRegion.toString());
 
@@ -860,7 +865,7 @@ public class PartitionedRegionSingleHopWithServerGroupDUnitTest extends CacheTes
     attr.setPartitionAttributes(paf.create());
     shipmentRegion = cache.createRegion("SHIPMENT", attr.create());
     assertNotNull(shipmentRegion);
-    getLogWriter().info(
+    LogWriterSupport.getLogWriter().info(
         "Partitioned Region SHIPMENT created Successfully :"
             + shipmentRegion.toString());
     return port;
@@ -907,7 +912,7 @@ public class PartitionedRegionSingleHopWithServerGroupDUnitTest extends CacheTes
     attr.setPartitionAttributes(paf.create());
     region = cache.createRegion(PR_NAME, attr.create());
     assertNotNull(region);
-    getLogWriter().info(
+    LogWriterSupport.getLogWriter().info(
         "Partitioned Region " + PR_NAME + " created Successfully :"
             + region.toString());
 
@@ -920,7 +925,7 @@ public class PartitionedRegionSingleHopWithServerGroupDUnitTest extends CacheTes
     attr.setPartitionAttributes(paf.create());
     customerRegion = cache.createRegion("CUSTOMER", attr.create());
     assertNotNull(customerRegion);
-    getLogWriter().info(
+    LogWriterSupport.getLogWriter().info(
         "Partitioned Region CUSTOMER created Successfully :"
             + customerRegion.toString());
 
@@ -933,7 +938,7 @@ public class PartitionedRegionSingleHopWithServerGroupDUnitTest extends CacheTes
     attr.setPartitionAttributes(paf.create());
     orderRegion = cache.createRegion("ORDER", attr.create());
     assertNotNull(orderRegion);
-    getLogWriter().info(
+    LogWriterSupport.getLogWriter().info(
         "Partitioned Region ORDER created Successfully :"
             + orderRegion.toString());
 
@@ -946,7 +951,7 @@ public class PartitionedRegionSingleHopWithServerGroupDUnitTest extends CacheTes
     attr.setPartitionAttributes(paf.create());
     shipmentRegion = cache.createRegion("SHIPMENT", attr.create());
     assertNotNull(shipmentRegion);
-    getLogWriter().info(
+    LogWriterSupport.getLogWriter().info(
         "Partitioned Region SHIPMENT created Successfully :"
             + shipmentRegion.toString());
     return port;
@@ -993,7 +998,7 @@ public class PartitionedRegionSingleHopWithServerGroupDUnitTest extends CacheTes
     attr.setPartitionAttributes(paf.create());
     region = cache.createRegion(PR_NAME, attr.create());
     assertNotNull(region);
-    getLogWriter().info(
+    LogWriterSupport.getLogWriter().info(
         "Partitioned Region " + PR_NAME + " created Successfully :"
             + region.toString());
 
@@ -1006,7 +1011,7 @@ public class PartitionedRegionSingleHopWithServerGroupDUnitTest extends CacheTes
     attr.setPartitionAttributes(paf.create());
     customerRegion = cache.createRegion("CUSTOMER", attr.create());
     assertNotNull(customerRegion);
-    getLogWriter().info(
+    LogWriterSupport.getLogWriter().info(
         "Partitioned Region CUSTOMER created Successfully :"
             + customerRegion.toString());
 
@@ -1019,7 +1024,7 @@ public class PartitionedRegionSingleHopWithServerGroupDUnitTest extends CacheTes
     attr.setPartitionAttributes(paf.create());
     orderRegion = cache.createRegion("ORDER", attr.create());
     assertNotNull(orderRegion);
-    getLogWriter().info(
+    LogWriterSupport.getLogWriter().info(
         "Partitioned Region ORDER created Successfully :"
             + orderRegion.toString());
 
@@ -1032,7 +1037,7 @@ public class PartitionedRegionSingleHopWithServerGroupDUnitTest extends CacheTes
     attr.setPartitionAttributes(paf.create());
     shipmentRegion = cache.createRegion("SHIPMENT", attr.create());
     assertNotNull(shipmentRegion);
-    getLogWriter().info(
+    LogWriterSupport.getLogWriter().info(
         "Partitioned Region SHIPMENT created Successfully :"
             + shipmentRegion.toString());
     
@@ -1045,7 +1050,7 @@ public class PartitionedRegionSingleHopWithServerGroupDUnitTest extends CacheTes
     attr.setPartitionAttributes(paf.create());
     region2 = cache.createRegion(PR_NAME2, attr.create());
     assertNotNull(region2);
-    getLogWriter().info(
+    LogWriterSupport.getLogWriter().info(
         "Partitioned Region " + PR_NAME2 + " created Successfully :"
             + region2.toString());
 
@@ -1058,7 +1063,7 @@ public class PartitionedRegionSingleHopWithServerGroupDUnitTest extends CacheTes
     attr.setPartitionAttributes(paf.create());
     customerRegion2 = cache.createRegion(CUSTOMER2, attr.create());
     assertNotNull(customerRegion2);
-    getLogWriter().info(
+    LogWriterSupport.getLogWriter().info(
         "Partitioned Region CUSTOMER2 created Successfully :"
             + customerRegion2.toString());
 
@@ -1071,7 +1076,7 @@ public class PartitionedRegionSingleHopWithServerGroupDUnitTest extends CacheTes
     attr.setPartitionAttributes(paf.create());
     orderRegion2 = cache.createRegion(ORDER2, attr.create());
     assertNotNull(orderRegion2);
-    getLogWriter().info(
+    LogWriterSupport.getLogWriter().info(
         "Partitioned Region ORDER2 created Successfully :"
             + orderRegion2.toString());
 
@@ -1084,7 +1089,7 @@ public class PartitionedRegionSingleHopWithServerGroupDUnitTest extends CacheTes
     attr.setPartitionAttributes(paf.create());
     shipmentRegion2 = cache.createRegion(SHIPMENT2, attr.create());
     assertNotNull(shipmentRegion2);
-    getLogWriter().info(
+    LogWriterSupport.getLogWriter().info(
         "Partitioned Region SHIPMENT2 created Successfully :"
             + shipmentRegion2.toString());
     
@@ -1187,7 +1192,7 @@ public class PartitionedRegionSingleHopWithServerGroupDUnitTest extends CacheTes
     RegionAttributes attrs = factory.create();
     region = cache.createRegion(PR_NAME, attrs);
     assertNotNull(region);
-    getLogWriter().info(
+    LogWriterSupport.getLogWriter().info(
         "Distributed Region " + PR_NAME + " created Successfully :"
             + region.toString());
 
@@ -1196,7 +1201,7 @@ public class PartitionedRegionSingleHopWithServerGroupDUnitTest extends CacheTes
     attrs = factory.create();
     customerRegion = cache.createRegion("CUSTOMER", attrs);
     assertNotNull(customerRegion);
-    getLogWriter().info(
+    LogWriterSupport.getLogWriter().info(
         "Distributed Region CUSTOMER created Successfully :"
             + customerRegion.toString());
 
@@ -1205,7 +1210,7 @@ public class PartitionedRegionSingleHopWithServerGroupDUnitTest extends CacheTes
     attrs = factory.create();
     orderRegion = cache.createRegion("ORDER", attrs);
     assertNotNull(orderRegion);
-    getLogWriter().info(
+    LogWriterSupport.getLogWriter().info(
         "Distributed Region ORDER created Successfully :"
             + orderRegion.toString());
 
@@ -1214,7 +1219,7 @@ public class PartitionedRegionSingleHopWithServerGroupDUnitTest extends CacheTes
     attrs = factory.create();
     shipmentRegion = cache.createRegion("SHIPMENT", attrs);
     assertNotNull(shipmentRegion);
-    getLogWriter().info(
+    LogWriterSupport.getLogWriter().info(
         "Distributed Region SHIPMENT created Successfully :"
             + shipmentRegion.toString());
   }
@@ -1226,7 +1231,7 @@ public class PartitionedRegionSingleHopWithServerGroupDUnitTest extends CacheTes
     RegionAttributes attrs = factory.create();
     region = cache.createRegion(PR_NAME, attrs);
     assertNotNull(region);
-    getLogWriter().info(
+    LogWriterSupport.getLogWriter().info(
         "Distributed Region " + PR_NAME + " created Successfully :"
             + region.toString());
 
@@ -1235,7 +1240,7 @@ public class PartitionedRegionSingleHopWithServerGroupDUnitTest extends CacheTes
     attrs = factory.create();
     customerRegion = cache.createRegion("CUSTOMER", attrs);
     assertNotNull(customerRegion);
-    getLogWriter().info(
+    LogWriterSupport.getLogWriter().info(
         "Distributed Region CUSTOMER created Successfully :"
             + customerRegion.toString());
 
@@ -1244,7 +1249,7 @@ public class PartitionedRegionSingleHopWithServerGroupDUnitTest extends CacheTes
     attrs = factory.create();
     orderRegion = cache.createRegion("ORDER", attrs);
     assertNotNull(orderRegion);
-    getLogWriter().info(
+    LogWriterSupport.getLogWriter().info(
         "Distributed Region ORDER created Successfully :"
             + orderRegion.toString());
 
@@ -1253,7 +1258,7 @@ public class PartitionedRegionSingleHopWithServerGroupDUnitTest extends CacheTes
     attrs = factory.create();
     shipmentRegion = cache.createRegion("SHIPMENT", attrs);
     assertNotNull(shipmentRegion);
-    getLogWriter().info(
+    LogWriterSupport.getLogWriter().info(
         "Distributed Region SHIPMENT created Successfully :"
             + shipmentRegion.toString());
     
@@ -1264,7 +1269,7 @@ public class PartitionedRegionSingleHopWithServerGroupDUnitTest extends CacheTes
     attrs = factory.create();
     region2 = cache.createRegion(PR_NAME2, attrs);
     assertNotNull(region2);
-    getLogWriter().info(
+    LogWriterSupport.getLogWriter().info(
         "Distributed Region " + PR_NAME2 + " created Successfully :"
             + region2.toString());
 
@@ -1273,7 +1278,7 @@ public class PartitionedRegionSingleHopWithServerGroupDUnitTest extends CacheTes
     attrs = factory.create();
     customerRegion2 = cache.createRegion(CUSTOMER2, attrs);
     assertNotNull(customerRegion2);
-    getLogWriter().info(
+    LogWriterSupport.getLogWriter().info(
         "Distributed Region CUSTOMER2 created Successfully :"
             + customerRegion2.toString());
 
@@ -1282,7 +1287,7 @@ public class PartitionedRegionSingleHopWithServerGroupDUnitTest extends CacheTes
     attrs = factory.create();
     orderRegion2 = cache.createRegion(ORDER2, attrs);
     assertNotNull(orderRegion2);
-    getLogWriter().info(
+    LogWriterSupport.getLogWriter().info(
         "Distributed Region ORDER2 created Successfully :"
             + orderRegion2.toString());
 
@@ -1291,7 +1296,7 @@ public class PartitionedRegionSingleHopWithServerGroupDUnitTest extends CacheTes
     attrs = factory.create();
     shipmentRegion2 = cache.createRegion(SHIPMENT2, attrs);
     assertNotNull(shipmentRegion2);
-    getLogWriter().info(
+    LogWriterSupport.getLogWriter().info(
         "Distributed Region SHIPMENT2 created Successfully :"
             + shipmentRegion2.toString());
   }
@@ -1303,7 +1308,7 @@ public class PartitionedRegionSingleHopWithServerGroupDUnitTest extends CacheTes
     RegionAttributes attrs = factory.create();
     region = cache.createRegion(PR_NAME, attrs);
     assertNotNull(region);
-    getLogWriter().info(
+    LogWriterSupport.getLogWriter().info(
         "Distributed Region " + PR_NAME + " created Successfully :"
             + region.toString());
 
@@ -1312,7 +1317,7 @@ public class PartitionedRegionSingleHopWithServerGroupDUnitTest extends CacheTes
     attrs = factory.create();
     customerRegion = cache.createRegion("CUSTOMER", attrs);
     assertNotNull(customerRegion);
-    getLogWriter().info(
+    LogWriterSupport.getLogWriter().info(
         "Distributed Region CUSTOMER created Successfully :"
             + customerRegion.toString());
 
@@ -1321,7 +1326,7 @@ public class PartitionedRegionSingleHopWithServerGroupDUnitTest extends CacheTes
     attrs = factory.create();
     orderRegion = cache.createRegion("ORDER", attrs);
     assertNotNull(orderRegion);
-    getLogWriter().info(
+    LogWriterSupport.getLogWriter().info(
         "Distributed Region ORDER created Successfully :"
             + orderRegion.toString());
 
@@ -1330,7 +1335,7 @@ public class PartitionedRegionSingleHopWithServerGroupDUnitTest extends CacheTes
     attrs = factory.create();
     shipmentRegion = cache.createRegion("SHIPMENT", attrs);
     assertNotNull(shipmentRegion);
-    getLogWriter().info(
+    LogWriterSupport.getLogWriter().info(
         "Distributed Region SHIPMENT created Successfully :"
             + shipmentRegion.toString());
     
@@ -1362,7 +1367,7 @@ public class PartitionedRegionSingleHopWithServerGroupDUnitTest extends CacheTes
     region = cache.createRegion(PR_NAME, attr.create());
 
     assertNotNull(region);
-    getLogWriter().info(
+    LogWriterSupport.getLogWriter().info(
         "Partitioned Region " + PR_NAME + " created Successfully :"
             + region.toString());
 
@@ -1375,7 +1380,7 @@ public class PartitionedRegionSingleHopWithServerGroupDUnitTest extends CacheTes
     attr.setPartitionAttributes(paf.create());
     customerRegion = cache.createRegion("CUSTOMER", attr.create());
     assertNotNull(customerRegion);
-    getLogWriter().info(
+    LogWriterSupport.getLogWriter().info(
         "Partitioned Region CUSTOMER created Successfully :"
             + customerRegion.toString());
 
@@ -1387,7 +1392,7 @@ public class PartitionedRegionSingleHopWithServerGroupDUnitTest extends CacheTes
     attr.setPartitionAttributes(paf.create());
     orderRegion = cache.createRegion("ORDER", attr.create());
     assertNotNull(orderRegion);
-    getLogWriter().info(
+    LogWriterSupport.getLogWriter().info(
         "Partitioned Region ORDER created Successfully :"
             + orderRegion.toString());
 
@@ -1399,7 +1404,7 @@ public class PartitionedRegionSingleHopWithServerGroupDUnitTest extends CacheTes
     attr.setPartitionAttributes(paf.create());
     shipmentRegion = cache.createRegion("SHIPMENT", attr.create());
     assertNotNull(shipmentRegion);
-    getLogWriter().info(
+    LogWriterSupport.getLogWriter().info(
         "Partitioned Region SHIPMENT created Successfully :"
             + shipmentRegion.toString());
     return port;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/76e324b5/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionSizeDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionSizeDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionSizeDUnitTest.java
index 735acfd..05f595c 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionSizeDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionSizeDUnitTest.java
@@ -33,10 +33,11 @@ import com.gemstone.gemfire.internal.OSProcess;
 import com.gemstone.gemfire.internal.logging.InternalLogWriter;
 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.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;
 
 /**
@@ -119,7 +120,7 @@ public class PartitionedRegionSizeDUnitTest extends
       public void run2()
       {
         Cache cache = getCache();
-        final int oldLevel = setLogLevel(getLogWriter(), InternalLogWriter.WARNING_LEVEL);
+        final int oldLevel = setLogLevel(LogWriterSupport.getLogWriter(), InternalLogWriter.WARNING_LEVEL);
         for (int j = 0; j < MAX_REGIONS; j++) {
           Region pr = cache.getRegion(Region.SEPARATOR + PR_PREFIX
               + "DistAckSync" + j);
@@ -129,7 +130,7 @@ public class PartitionedRegionSizeDUnitTest extends
             pr.put(key, value);
           }
         }
-        setLogLevel(getLogWriter(), oldLevel);
+        setLogLevel(LogWriterSupport.getLogWriter(), oldLevel);
 
       }
     });
@@ -221,7 +222,7 @@ public class PartitionedRegionSizeDUnitTest extends
       public void run2()
       {
         Cache cache = getCache();
-        final int oldLevel = setLogLevel(getLogWriter(), InternalLogWriter.WARNING_LEVEL);
+        final int oldLevel = setLogLevel(LogWriterSupport.getLogWriter(), InternalLogWriter.WARNING_LEVEL);
         for (int j = 0; j < MAX_REGIONS; j++) {
           Region pr = cache.getRegion(Region.SEPARATOR + PR_PREFIX
               + "DistAckASync" + j);
@@ -231,11 +232,11 @@ public class PartitionedRegionSizeDUnitTest extends
             pr.put(key, value);
           }
         }
-        setLogLevel(getLogWriter(), oldLevel);
+        setLogLevel(LogWriterSupport.getLogWriter(), oldLevel);
       }
     });
 
-    DistributedTestCase.join(async0, 30 * 1000, getLogWriter());
+    Threads.join(async0, 30 * 1000, LogWriterSupport.getLogWriter());
 
 	if (async0.exceptionOccurred()) {
           Assert.fail("Exception during async0", async0.getException());
@@ -325,7 +326,7 @@ public class PartitionedRegionSizeDUnitTest extends
       public void run2()
       {
         Cache cache = getCache();
-        final int oldLevel = setLogLevel(getLogWriter(), InternalLogWriter.WARNING_LEVEL);
+        final int oldLevel = setLogLevel(LogWriterSupport.getLogWriter(), InternalLogWriter.WARNING_LEVEL);
         for (int j = 0; j < MAX_REGIONS; j++) {
           Region pr = cache.getRegion(Region.SEPARATOR + PR_PREFIX
               + "DistAckSyncChangingVMCount" + j);
@@ -335,7 +336,7 @@ public class PartitionedRegionSizeDUnitTest extends
             pr.put(key, value);
           }
         }
-        setLogLevel(getLogWriter(), oldLevel);
+        setLogLevel(LogWriterSupport.getLogWriter(), oldLevel);
       }
     });
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/76e324b5/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionStatsDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionStatsDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionStatsDUnitTest.java
index 79b0ec8..2a9a040 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionStatsDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionStatsDUnitTest.java
@@ -34,6 +34,8 @@ import com.gemstone.gemfire.test.dunit.Assert;
 import com.gemstone.gemfire.test.dunit.Host;
 import com.gemstone.gemfire.test.dunit.SerializableRunnable;
 import com.gemstone.gemfire.test.dunit.VM;
+import com.gemstone.gemfire.test.dunit.Wait;
+import com.gemstone.gemfire.test.dunit.WaitCriterion;
 
 /**
  * @author tapshank, Created on Jan 19, 2006
@@ -518,7 +520,7 @@ public class PartitionedRegionStatsDUnitTest extends
         Cache cache = getCache();
         PartitionedRegion region = (PartitionedRegion) cache.getRegion("region1");
         final PartitionedRegionStats stats = region.getPrStats();
-        waitForCriterion(new WaitCriterion() {
+        Wait.waitForCriterion(new WaitCriterion() {
           
           @Override
           public boolean done() {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/76e324b5/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionTestUtilsDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionTestUtilsDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionTestUtilsDUnitTest.java
index 68f5ae0..a30ff47 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionTestUtilsDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionTestUtilsDUnitTest.java
@@ -38,6 +38,7 @@ import com.gemstone.gemfire.cache30.CacheSerializableRunnable;
 import com.gemstone.gemfire.distributed.DistributedMember;
 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.VM;
 
 /**
@@ -91,7 +92,7 @@ public class PartitionedRegionTestUtilsDUnitTest extends
         GsRandom rand = new GsRandom(123);
         // Assert that its empty
         for(int i=0; i<5; i++) {
-          getLogWriter().info("Invocation " + i + " of getSomeKeys");
+          LogWriterSupport.getLogWriter().info("Invocation " + i + " of getSomeKeys");
           try {
             Set s = null;
             s = pr.getSomeKeys(rand);
@@ -111,17 +112,17 @@ public class PartitionedRegionTestUtilsDUnitTest extends
         
         // Assert not empty and has value in an accepable range
         for(int i=0; i<5; i++) {
-          getLogWriter().info("Invocation " + i + " of getSomeKeys");
+          LogWriterSupport.getLogWriter().info("Invocation " + i + " of getSomeKeys");
           try {
             Set s = null;
             s = pr.getSomeKeys(rand);
             assertNotNull(s);
             assertFalse(s.isEmpty());
             Integer val;
-            getLogWriter().info("Invocation " + i + " got " + s.size() + " keys");
+            LogWriterSupport.getLogWriter().info("Invocation " + i + " got " + s.size() + " keys");
             for (Iterator it = s.iterator(); it.hasNext(); ) {
               Object key = it.next();
-              getLogWriter().info("Key: " + key);
+              LogWriterSupport.getLogWriter().info("Key: " + key);
               val = (Integer) pr.get(key);
               assertNotNull(val);
               assertTrue(val.intValue() >= 0);

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/76e324b5/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionWithSameNameDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionWithSameNameDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionWithSameNameDUnitTest.java
index 328abb7..807a91f 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionWithSameNameDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionWithSameNameDUnitTest.java
@@ -39,6 +39,7 @@ import com.gemstone.gemfire.cache.Scope;
 import com.gemstone.gemfire.cache30.CacheSerializableRunnable;
 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;
 
@@ -107,7 +108,7 @@ public class PartitionedRegionWithSameNameDUnitTest extends
     firstCreationFlag = true;
     createPartitionRegion(vmList, startIndexForRegion, endIndexForRegion,
         localMaxMemory, redundancy, firstCreationFlag, multipleVMFlag);
-    getLogWriter()
+    LogWriterSupport.getLogWriter()
         .info(
             "testNameWithPartitionRegionFirstOnSameVM() - Partition Regions successfully created ");
     // creating distributed region on same vm with same name as previouslu
@@ -118,7 +119,7 @@ public class PartitionedRegionWithSameNameDUnitTest extends
     vmList = addNodeToList(startIndexForNode, endIndexForNode);
     createDistributedRegion(vmList, startIndexForRegion, endIndexForRegion,
         Scope.DISTRIBUTED_ACK, firstCreationFlag, multipleVMFlag);
-    getLogWriter()
+    LogWriterSupport.getLogWriter()
         .info(
             "testNameWithPartitionRegionFirstOnSameVM() - test completed successfully ");
   }
@@ -159,7 +160,7 @@ public class PartitionedRegionWithSameNameDUnitTest extends
     createPartitionRegion(vmList, startIndexForRegion, endIndexForRegion,
         localMaxMemory, redundancy, firstCreationFlag, multipleVMFlag);
 
-    getLogWriter()
+    LogWriterSupport.getLogWriter()
         .info(
             "testNameWithPartitionRegionFirstOnSameVM() - test completed successfully ");
   }
@@ -196,7 +197,7 @@ public class PartitionedRegionWithSameNameDUnitTest extends
     firstCreationFlag = true;
     createPartitionRegion(vmList, startIndexForRegion, endIndexForRegion,
         localMaxMemory, redundancy, firstCreationFlag, multipleVMFlag);
-    getLogWriter()
+    LogWriterSupport.getLogWriter()
         .info(
             "testNameWithPartitionRegionFirstOnDifferentVM() - Partition Regions successfully created ");
     // creating distrubuted region with the scope = DISTRIBUTED_ACK on
@@ -209,7 +210,7 @@ public class PartitionedRegionWithSameNameDUnitTest extends
     vmList = addNodeToList(startIndexForNode, endIndexForNode);
     createDistributedRegion(vmList, startIndexForRegion, endIndexForRegion,
         Scope.DISTRIBUTED_ACK, firstCreationFlag, multipleVMFlag);
-    getLogWriter()
+    LogWriterSupport.getLogWriter()
         .info(
             "testNameWithPartitionRegionFirstOnDifferentVM() - test completed successfully ");
   }
@@ -251,7 +252,7 @@ public class PartitionedRegionWithSameNameDUnitTest extends
     createPartitionRegion(vmList, startIndexForRegion, endIndexForRegion,
         localMaxMemory, redundancy, firstCreationFlag, multipleVMFlag);
 
-    getLogWriter()
+    LogWriterSupport.getLogWriter()
         .info(
             "testNameWithLocalRegionFirstOnDifferentVM() - test completed successfully ");
   }
@@ -292,7 +293,7 @@ public class PartitionedRegionWithSameNameDUnitTest extends
     firstCreationFlag = true;
     createPartitionRegion(vmList, startIndexForRegion, endIndexForRegion,
         localMaxMemory, redundancy, firstCreationFlag, multipleVMFlag);
-    getLogWriter()
+    LogWriterSupport.getLogWriter()
         .info(
             "testPartitionRegionVsLocalRegionFirst() - test completed successfully ");
   }
@@ -334,7 +335,7 @@ public class PartitionedRegionWithSameNameDUnitTest extends
     firstCreationFlag = true;
     createDistributedRegion(vmList, startIndexForRegion, endIndexForRegion,
         Scope.LOCAL, firstCreationFlag, multipleVMFlag);
-    getLogWriter()
+    LogWriterSupport.getLogWriter()
         .info(
             "testPartitionRegionVsLocalRegionSecond() - test completed successfully ");
   }
@@ -366,12 +367,12 @@ public class PartitionedRegionWithSameNameDUnitTest extends
     firstCreationFlag = true;
     createPartitionRegion(vmList, startIndexForRegion, endIndexForRegion,
         localMaxMemory, redundancy, firstCreationFlag, multipleVMFlag);
-    getLogWriter()
+    LogWriterSupport.getLogWriter()
         .info(
             "testWithPartitionedRegionAsParentRegionAndDistributedSubRegion() - Parent region as partitioned region is created ");
     // create subregion of partition region
     createSubRegionOfPartitionedRegion(vmList, DISTRIBUTED_REGION);
-    getLogWriter()
+    LogWriterSupport.getLogWriter()
         .info(
             "testWithPartitionedRegionAsParentRegionAndDistributedSubRegion() completed Successfully ");
   }
@@ -404,12 +405,12 @@ public class PartitionedRegionWithSameNameDUnitTest extends
     firstCreationFlag = true;
     createPartitionRegion(vmList, startIndexForRegion, endIndexForRegion,
         localMaxMemory, redundancy, firstCreationFlag, multipleVMFlag);
-    getLogWriter()
+    LogWriterSupport.getLogWriter()
         .info(
             "testWithPartitionedRegionAsParentRegionAndPartitionedSubRegion() - Parent region as partitioned region is created ");
     // create subregion of partition region
     createSubRegionOfPartitionedRegion(vmList, PARTITIONED_REGION);
-    getLogWriter()
+    LogWriterSupport.getLogWriter()
         .info(
             "testWithPartitionedRegionAsParentRegionAndPartitionedSubRegion() completed Successfully ");
   }
@@ -441,7 +442,7 @@ public class PartitionedRegionWithSameNameDUnitTest extends
     firstCreationFlag = true;
     createDistributedRegion(vmList, startIndexForRegion, endIndexForRegion,
         Scope.DISTRIBUTED_ACK, firstCreationFlag, multipleVMFlag);
-    getLogWriter().info(
+    LogWriterSupport.getLogWriter().info(
         "testWithSubRegionPartitionedRegionFirst() - Parent region is created");
     // creating distributed region as subregion of parent on vm0
     prPrefix = "child_region";
@@ -449,7 +450,7 @@ public class PartitionedRegionWithSameNameDUnitTest extends
     endIndexForNode = 1;
     vmList = addNodeToList(startIndexForNode, endIndexForNode);
     createPartitionedSubRegion(vmList, firstCreationFlag);
-    getLogWriter()
+    LogWriterSupport.getLogWriter()
         .info(
             "testWithSubRegionPartitionedRegionFirst() - Partitioned sub region on vm0 ");
     // creating partiton region as subregion of parent region with the same name
@@ -458,7 +459,7 @@ public class PartitionedRegionWithSameNameDUnitTest extends
     endIndexForNode = 4;
     vmList = addNodeToList(startIndexForNode, endIndexForNode);
     createDistributedSubRegion(vmList, firstCreationFlag);
-    getLogWriter().info(
+    LogWriterSupport.getLogWriter().info(
         "testWithSubRegionPartitionedRegionFirst() completed successfully ");
 
   }
@@ -490,7 +491,7 @@ public class PartitionedRegionWithSameNameDUnitTest extends
     firstCreationFlag = true;
     createDistributedRegion(vmList, startIndexForRegion, endIndexForRegion,
         Scope.DISTRIBUTED_ACK, firstCreationFlag, multipleVMFlag);
-    getLogWriter().info(
+    LogWriterSupport.getLogWriter().info(
         "testWithSubRegionDistributedRegionFirst() - Parent region is created");
     // creating distributed region as subregion of parent on vm0
     prPrefix = "child_region";
@@ -498,7 +499,7 @@ public class PartitionedRegionWithSameNameDUnitTest extends
     endIndexForNode = 1;
     vmList = addNodeToList(startIndexForNode, endIndexForNode);
     createDistributedSubRegion(vmList, firstCreationFlag);
-    getLogWriter()
+    LogWriterSupport.getLogWriter()
         .info(
             "testWithSubRegionDistributedRegionFirst() - Distributed sub region on vm0 ");
     // creating partiton region as subregion of parent region with the same name
@@ -507,7 +508,7 @@ public class PartitionedRegionWithSameNameDUnitTest extends
     endIndexForNode = 4;
     vmList = addNodeToList(startIndexForNode, endIndexForNode);
     createPartitionedSubRegion(vmList, firstCreationFlag);
-    getLogWriter().info(
+    LogWriterSupport.getLogWriter().info(
         "testWithSubRegionDistributedRegionFirst() completed successfully ");
 
   }
@@ -618,7 +619,7 @@ public class PartitionedRegionWithSameNameDUnitTest extends
           case DISTRIBUTED_REGION: {
             Region childRegion = parentRegion.createSubregion("child_region",
                 ra);
-            getLogWriter().info(
+            LogWriterSupport.getLogWriter().info(
                 "Distributed Subregion is created as : "
                     + childRegion.getName());
           }
@@ -626,7 +627,7 @@ public class PartitionedRegionWithSameNameDUnitTest extends
           case PARTITIONED_REGION: {
             Region childRegion = parentRegion.createSubregion("child_region",
                 createRegionAttrsForPR(0, 200));
-            getLogWriter().info(
+            LogWriterSupport.getLogWriter().info(
                 "Partitioned Subregion is created as : "
                     + childRegion.getName());
 
@@ -880,7 +881,7 @@ public class PartitionedRegionWithSameNameDUnitTest extends
             }
           }
         }
-        getLogWriter()
+        LogWriterSupport.getLogWriter()
             .info(
                 "createMultiplePartitionRegion() - Partition Regions Successfully Completed ");
       }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/76e324b5/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/PutAllDAckDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/PutAllDAckDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/PutAllDAckDUnitTest.java
index d995f35..b3f4ab0 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/PutAllDAckDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/PutAllDAckDUnitTest.java
@@ -41,6 +41,7 @@ import com.gemstone.gemfire.distributed.DistributedSystem;
 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.VM;
 
 /**
@@ -72,7 +73,7 @@ public class PutAllDAckDUnitTest extends DistributedTestCase {
       VM vm1 = host.getVM(1);
       vm0.invoke(PutAllDAckDUnitTest.class, "createCacheForVM0");
       vm1.invoke(PutAllDAckDUnitTest.class, "createCacheForVM1");
-      getLogWriter().fine("Cache created successfully");
+      LogWriterSupport.getLogWriter().fine("Cache created successfully");
     }
     
     public void tearDown2(){
@@ -215,7 +216,7 @@ public class PutAllDAckDUnitTest extends DistributedTestCase {
 //             }
             
             beforeCreateputAllcounter++;
-            getLogWriter().fine("*******BeforeCreate*****");
+            LogWriterSupport.getLogWriter().fine("*******BeforeCreate*****");
             beforeCreate = true;
         }
     }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/76e324b5/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/PutAllGlobalDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/PutAllGlobalDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/PutAllGlobalDUnitTest.java
index a7274d5..314fb42 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/PutAllGlobalDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/PutAllGlobalDUnitTest.java
@@ -48,7 +48,10 @@ 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.Invoke;
+import com.gemstone.gemfire.test.dunit.LogWriterSupport;
 import com.gemstone.gemfire.test.dunit.SerializableRunnable;
+import com.gemstone.gemfire.test.dunit.Threads;
 import com.gemstone.gemfire.test.dunit.VM;
 
 /**
@@ -86,7 +89,7 @@ public class PutAllGlobalDUnitTest extends DistributedTestCase {
       VM vm1 = host.getVM(1);
       vm0.invoke(PutAllGlobalDUnitTest.class, "createCacheForVM0");
       vm1.invoke(PutAllGlobalDUnitTest.class, "createCacheForVM1");
-      getLogWriter().fine("Cache created successfully");
+      LogWriterSupport.getLogWriter().fine("Cache created successfully");
     }
     
     public void tearDown2(){
@@ -96,7 +99,7 @@ public class PutAllGlobalDUnitTest extends DistributedTestCase {
         vm0.invoke(PutAllGlobalDUnitTest.class, "closeCache");
         vm1.invoke(PutAllGlobalDUnitTest.class, "closeCache");
         cache = null;
-        invokeInEveryVM(new SerializableRunnable() { public void run() { cache = null; } });
+        Invoke.invokeInEveryVM(new SerializableRunnable() { public void run() { cache = null; } });
     }
     
     public static void createCacheForVM0(){
@@ -182,16 +185,16 @@ public class PutAllGlobalDUnitTest extends DistributedTestCase {
               long startTime = 0;
                 try{
                     Thread.sleep(500);
-                    getLogWriter().info("async2 proceeding with put operation");
+                    LogWriterSupport.getLogWriter().info("async2 proceeding with put operation");
                     startTime = System.currentTimeMillis();
                     region.put(new Integer(1),"mapVal");
-                    getLogWriter().info("async2 done with put operation");
+                    LogWriterSupport.getLogWriter().info("async2 done with put operation");
                     fail("Should have thrown TimeoutException");
                 }catch(TimeoutException Tx){
                    // Tx.printStackTrace();
-                    getLogWriter().info("PASS: As expected Caught TimeoutException ");
+                    LogWriterSupport.getLogWriter().info("PASS: As expected Caught TimeoutException ");
                     if (startTime + TIMEOUT_PERIOD + DLockGrantor.GRANTOR_THREAD_MAX_WAIT /* slop of grantor max wait ms */ < System.currentTimeMillis()) {
-                      getLogWriter().warning("though this test passed, the put() timed out in "
+                      LogWriterSupport.getLogWriter().warning("though this test passed, the put() timed out in "
                           + (System.currentTimeMillis() - startTime) +
                           " instead of the expected " + TIMEOUT_PERIOD + " milliseconds");
                     }
@@ -203,13 +206,13 @@ public class PutAllGlobalDUnitTest extends DistributedTestCase {
             }
         });
         
-        DistributedTestCase.join(async2, 30 * 1000, getLogWriter());
+        Threads.join(async2, 30 * 1000, LogWriterSupport.getLogWriter());
         if (async2.exceptionOccurred()) {
-          DistributedTestCase.join(async1, 30 * 1000, getLogWriter());
+          Threads.join(async1, 30 * 1000, LogWriterSupport.getLogWriter());
           Assert.fail("async2 failed", async2.getException());
         }
         
-        DistributedTestCase.join(async1, 30 * 1000, getLogWriter());
+        Threads.join(async1, 30 * 1000, LogWriterSupport.getLogWriter());
         if (async1.exceptionOccurred()) {
           Assert.fail("async1 failed", async1.getException());
         }
@@ -221,14 +224,14 @@ public class PutAllGlobalDUnitTest extends DistributedTestCase {
     public static void putAllMethod() throws Exception {
         Map m = new HashMap();
         serverSocket.accept();
-        getLogWriter().info("async1 connection received - continuing with putAll operation");
+        LogWriterSupport.getLogWriter().info("async1 connection received - continuing with putAll operation");
         serverSocket.close();
         try{
           for (int i=1; i<2; i++) {
             m.put(new Integer(i), String.valueOf(i));
           }
             region.putAll(m);
-            getLogWriter().info("async1 done with putAll operation");
+            LogWriterSupport.getLogWriter().info("async1 done with putAll operation");
             
         }catch(Exception ex){
 //            ex.printStackTrace();
@@ -277,13 +280,13 @@ public class PutAllGlobalDUnitTest extends DistributedTestCase {
     
     static class BeforeCreateCallback extends CacheWriterAdapter {
         public void beforeCreate(EntryEvent event){
-          getLogWriter().info("beforeCreate invoked for " + event.getKey());
+          LogWriterSupport.getLogWriter().info("beforeCreate invoked for " + event.getKey());
             try{
                 Thread.sleep(5000);
             }catch(InterruptedException ex) {
                 fail("interrupted");
             }
-          getLogWriter().info("beforeCreate done for " + event.getKey());
+          LogWriterSupport.getLogWriter().info("beforeCreate done for " + event.getKey());
             
         }
     }// end of BeforeCreateCallback

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/76e324b5/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/RemoteTransactionDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/RemoteTransactionDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/RemoteTransactionDUnitTest.java
index 682df79..6c5a431 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/RemoteTransactionDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/RemoteTransactionDUnitTest.java
@@ -96,13 +96,15 @@ import com.gemstone.gemfire.internal.cache.execute.data.Customer;
 import com.gemstone.gemfire.internal.cache.execute.data.Order;
 import com.gemstone.gemfire.internal.cache.execute.data.OrderId;
 import com.gemstone.gemfire.internal.cache.versions.VersionTag;
-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.Invoke;
+import com.gemstone.gemfire.test.dunit.LogWriterSupport;
 import com.gemstone.gemfire.test.dunit.SerializableCallable;
 import com.gemstone.gemfire.test.dunit.SerializableRunnable;
 import com.gemstone.gemfire.test.dunit.VM;
-import com.gemstone.gemfire.test.dunit.DistributedTestCase.WaitCriterion;
+import com.gemstone.gemfire.test.dunit.Wait;
+import com.gemstone.gemfire.test.dunit.WaitCriterion;
 
 /**
  * @author sbawaska
@@ -124,7 +126,7 @@ public class RemoteTransactionDUnitTest extends CacheTestCase {
       //TXManagerImpl mgr = getGemfireCache().getTxManager();
       //assertEquals(0, mgr.hostedTransactionsInProgressForTest());
       final TXManagerImpl mgr = getGemfireCache().getTxManager();
-      waitForCriterion(new WaitCriterion() {
+      Wait.waitForCriterion(new WaitCriterion() {
         @Override
         public boolean done() {
           return mgr.hostedTransactionsInProgressForTest() == 0;
@@ -152,7 +154,7 @@ public class RemoteTransactionDUnitTest extends CacheTestCase {
   @Override
   public void tearDown2() throws Exception {
     try {
-      invokeInEveryVM(verifyNoTxState);
+      Invoke.invokeInEveryVM(verifyNoTxState);
     } finally {
       closeAllCache();
       super.tearDown2();
@@ -252,7 +254,7 @@ public class RemoteTransactionDUnitTest extends CacheTestCase {
     }
     public Object call() throws Exception {
       CacheTransactionManager mgr = getGemfireCache().getTxManager();
-      getLogWriter().fine("testTXPut starting tx");
+      LogWriterSupport.getLogWriter().fine("testTXPut starting tx");
       mgr.begin();
       Region<CustId, Customer> custRegion = getCache().getRegion(CUSTOMER);
       Region<OrderId, Order> orderRegion = getCache().getRegion(ORDER);
@@ -2538,7 +2540,7 @@ public class RemoteTransactionDUnitTest extends CacheTestCase {
         PartitionedRegion pr = (PartitionedRegion)getGemfireCache().getRegion(CUSTOMER);
         Set filter = new HashSet();
         filter.add(expectedCustId);
-        getLogWriter().info("SWAP:inside NestedTxFunc calling func2:");
+        LogWriterSupport.getLogWriter().info("SWAP:inside NestedTxFunc calling func2:");
         r.put(expectedCustId, expectedCustomer);
         FunctionService.onRegion(pr).withFilter(filter).execute(new NestedTxFunction2()).getResult();
         assertNotNull(getGemfireCache().getTxManager().getTXState());
@@ -3464,7 +3466,7 @@ public class RemoteTransactionDUnitTest extends CacheTestCase {
         ClientCacheFactory ccf = new ClientCacheFactory();
         ccf.addPoolServer("localhost"/*getServerHostName(Host.getHost(0))*/, port);
         ccf.setPoolSubscriptionEnabled(true);
-        ccf.set("log-level", getDUnitLogLevel());
+        ccf.set("log-level", LogWriterSupport.getDUnitLogLevel());
         ClientCache cCache = getClientCache(ccf);
         ClientRegionFactory<Integer, String> crf = cCache
             .createClientRegionFactory(isEmpty ? ClientRegionShortcut.PROXY
@@ -3644,7 +3646,7 @@ protected static class ClientListener extends CacheListenerAdapter {
             return "listener was never invoked";
           }
         };
-        DistributedTestCase.waitForCriterion(waitForListenerInvocation, 10 * 1000, 10, true);
+        Wait.waitForCriterion(waitForListenerInvocation, 10 * 1000, 10, true);
         return null;
       }
     });
@@ -3676,7 +3678,7 @@ protected static class ClientListener extends CacheListenerAdapter {
         ClientCacheFactory ccf = new ClientCacheFactory();
         ccf.addPoolServer("localhost"/*getServerHostName(Host.getHost(0))*/, port);
         ccf.setPoolSubscriptionEnabled(true);
-        ccf.set("log-level", getDUnitLogLevel());
+        ccf.set("log-level", LogWriterSupport.getDUnitLogLevel());
         ClientCache cCache = getClientCache(ccf);
         ClientRegionFactory<Integer, String> crf = cCache
             .createClientRegionFactory(ClientRegionShortcut.CACHING_PROXY);
@@ -3719,7 +3721,7 @@ protected static class ClientListener extends CacheListenerAdapter {
             return "listener invoked:"+l.invoked;
           }
         };
-        DistributedTestCase.waitForCriterion(wc, 10*1000, 200, true);
+        Wait.waitForCriterion(wc, 10*1000, 200, true);
         return null;
       }
     });
@@ -3765,7 +3767,7 @@ protected static class ClientListener extends CacheListenerAdapter {
             return "listener was never invoked";
           }
         };
-        DistributedTestCase.waitForCriterion(waitForListenerInvocation, 10 * 1000, 10, true);
+        Wait.waitForCriterion(waitForListenerInvocation, 10 * 1000, 10, true);
         return null;
       }
     });
@@ -3915,7 +3917,7 @@ protected static class ClientListener extends CacheListenerAdapter {
       
       //Putting a string key causes this, the partition resolver
       //doesn't handle it.
-      IgnoredException.addExpectedException("IllegalStateException");
+      IgnoredException.addIgnoredException("IllegalStateException");
       assertEquals(Status.STATUS_ACTIVE, tx.getStatus());
       final CountDownLatch latch = new CountDownLatch(1);
       Thread t = new Thread(new Runnable() {
@@ -3954,12 +3956,12 @@ protected static class ClientListener extends CacheListenerAdapter {
       private int count;
       @Override
       public void afterCreate(EntryEvent event) {
-        getLogWriter().info("afterCreate invoked for " + event);
+        LogWriterSupport.getLogWriter().info("afterCreate invoked for " + event);
         count++;
       }
       @Override
       public void afterUpdate(EntryEvent event) {
-        getLogWriter().info("afterUpdate invoked for " + event);
+        LogWriterSupport.getLogWriter().info("afterUpdate invoked for " + event);
         count++;
       }
     }
@@ -4103,11 +4105,11 @@ protected static class ClientListener extends CacheListenerAdapter {
         // is not hosting the tx. But it will not allow an expiration
         // initiated on the hosting jvm.
         // tx is hosted in vm2 so expiration can happen in vm1.
-        DistributedTestCase.waitForCriterion(wc2, 30000, 5, true);
+        Wait.waitForCriterion(wc2, 30000, 5, true);
         getCache().getCacheTransactionManager().resume(tx);
         assertTrue(r.containsKey("key"));
         getCache().getCacheTransactionManager().commit();
-        DistributedTestCase.waitForCriterion(wc2, 30000, 5, true);
+        Wait.waitForCriterion(wc2, 30000, 5, true);
         return null;
       }
     });



Mime
View raw message