geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kl...@apache.org
Subject [32/51] [partial] incubator-geode git commit: GEODE-773: Extract static methods from DistributedTestCase
Date Tue, 09 Feb 2016 18:44:42 GMT
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/820cfd63/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionQueryDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionQueryDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionQueryDUnitTest.java
index b4af7d1..42b34dd 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionQueryDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionQueryDUnitTest.java
@@ -58,7 +58,10 @@ import com.gemstone.gemfire.cache30.CacheSerializableRunnable;
 import com.gemstone.gemfire.internal.AvailablePortHelper;
 import com.gemstone.gemfire.internal.cache.partitioned.QueryMessage;
 import com.gemstone.gemfire.pdx.JSONFormatter;
+import com.gemstone.gemfire.test.dunit.Assert;
 import com.gemstone.gemfire.test.dunit.Host;
+import com.gemstone.gemfire.test.dunit.LogWriterUtils;
+import com.gemstone.gemfire.test.dunit.NetworkUtils;
 import com.gemstone.gemfire.test.dunit.SerializableCallable;
 import com.gemstone.gemfire.test.dunit.SerializableRunnable;
 import com.gemstone.gemfire.test.dunit.VM;
@@ -295,7 +298,7 @@ public class PartitionedRegionQueryDUnitTest extends CacheTestCase {
                     9 })), results.asSet());
   
           } catch (Exception e) {
-            fail("Bad query", e);
+            Assert.fail("Bad query", e);
           }
         }
       });
@@ -367,7 +370,7 @@ public class PartitionedRegionQueryDUnitTest extends CacheTestCase {
                     9 })), results.asSet());
   
           } catch (Exception e) {
-            fail("Bad query", e);
+            Assert.fail("Bad query", e);
           }
         }
       });
@@ -438,7 +441,7 @@ public class PartitionedRegionQueryDUnitTest extends CacheTestCase {
                     9 })), results.asSet());
   
           } catch (Exception e) {
-            fail("Bad query", e);
+            Assert.fail("Bad query", e);
           }
         }
       });
@@ -510,7 +513,7 @@ public class PartitionedRegionQueryDUnitTest extends CacheTestCase {
                     9 })), results.asSet());
   
           } catch (Exception e) {
-            fail("Bad query", e);
+            Assert.fail("Bad query", e);
           }
         }
       });
@@ -582,7 +585,7 @@ public class PartitionedRegionQueryDUnitTest extends CacheTestCase {
                     9 })), results.asSet());
   
           } catch (Exception e) {
-            fail("Bad query", e);
+            Assert.fail("Bad query", e);
           }
         }
       });
@@ -655,7 +658,7 @@ public class PartitionedRegionQueryDUnitTest extends CacheTestCase {
                     9 })), results.asSet());
   
           } catch (Exception e) {
-            fail("Bad query", e);
+            Assert.fail("Bad query", e);
           }
         }
       });
@@ -727,7 +730,7 @@ public class PartitionedRegionQueryDUnitTest extends CacheTestCase {
                     9 })), results.asSet());
   
           } catch (Exception e) {
-            fail("Bad query", e);
+            Assert.fail("Bad query", e);
           }
         }
       });
@@ -798,7 +801,7 @@ public class PartitionedRegionQueryDUnitTest extends CacheTestCase {
                     9 })), results.asSet());
   
           } catch (Exception e) {
-            fail("Bad query", e);
+            Assert.fail("Bad query", e);
           }
         }
       });
@@ -941,8 +944,8 @@ public class PartitionedRegionQueryDUnitTest extends CacheTestCase {
       @Override
       public Object call() throws Exception {
         ClientCacheFactory cf = new ClientCacheFactory();
-        cf.addPoolServer(getServerHostName(server1.getHost()), port1);
-        cf.addPoolServer(getServerHostName(server2.getHost()), port2);
+        cf.addPoolServer(NetworkUtils.getServerHostName(server1.getHost()), port1);
+        cf.addPoolServer(NetworkUtils.getServerHostName(server2.getHost()), port2);
         ClientCache cache = getClientCache(cf);
 
         Region region = cache.createClientRegionFactory(
@@ -953,7 +956,7 @@ public class PartitionedRegionQueryDUnitTest extends CacheTestCase {
         try {
           qs = getCache().getQueryService();
         } catch (Exception e) {
-          fail("Failed to get QueryService.", e);
+          Assert.fail("Failed to get QueryService.", e);
         }
 
         for (int i = 0; i < queries.length; i++) {
@@ -962,7 +965,7 @@ public class PartitionedRegionQueryDUnitTest extends CacheTestCase {
             assertTrue("Size of resultset should be greater than 0 for query: "
              + queries[i], sr.size() > 0);
           } catch (Exception e) {
-            fail("Failed executing query ", e);
+            Assert.fail("Failed executing query ", e);
           }
         }
         return null;
@@ -980,12 +983,12 @@ public class PartitionedRegionQueryDUnitTest extends CacheTestCase {
     SerializableRunnable closeCache = new CacheSerializableRunnable(
         "Close Client") {
       public void run2() throws CacheException {
-        getLogWriter().info("### Close Client. ###");
+        LogWriterUtils.getLogWriter().info("### Close Client. ###");
         try {
           closeCache();
           disconnectFromDS();
         } catch (Exception ex) {
-          getLogWriter().info("### Failed to get close client. ###");
+          LogWriterUtils.getLogWriter().info("### Failed to get close client. ###");
         }
       }
     };
@@ -1004,7 +1007,7 @@ public class PartitionedRegionQueryDUnitTest extends CacheTestCase {
           SelectResults results = (SelectResults) query.execute();
           assertEquals(new HashSet(Arrays.asList(new Integer[] { 1, 2, 3 ,4, 5, 6, 7, 8, 9 })), results.asSet());
         } catch (Exception e) {
-          fail("Bad query", e);
+          Assert.fail("Bad query", e);
         }
       }
     });

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/820cfd63/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionRedundancyZoneDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionRedundancyZoneDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionRedundancyZoneDUnitTest.java
index 39fcc76..c112539 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionRedundancyZoneDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionRedundancyZoneDUnitTest.java
@@ -36,8 +36,7 @@ import com.gemstone.gemfire.test.dunit.VM;
 public class PartitionedRegionRedundancyZoneDUnitTest extends CacheTestCase {
 
   @Override
-  public void tearDown2() throws Exception {
-    super.tearDown2();
+  protected final void postTearDownCacheTestCase() throws Exception {
     // this makes sure we don't leave anything for the next tests
     // Tests that set redundancy zones causes other jvms connected
     // to the ds to have "enforce-unique-hosts" set to true.

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/820cfd63/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionSerializableObjectJUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionSerializableObjectJUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionSerializableObjectJUnitTest.java
index 6244cea..53c219f 100755
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionSerializableObjectJUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionSerializableObjectJUnitTest.java
@@ -35,7 +35,7 @@ import static org.junit.Assert.*;
 
 import com.gemstone.gemfire.cache.Region;
 import com.gemstone.gemfire.distributed.DistributedSystem;
-import com.gemstone.gemfire.test.dunit.DistributedTestCase;
+import com.gemstone.gemfire.test.dunit.ThreadUtils;
 import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
 
 import junit.framework.TestCase;
@@ -82,7 +82,7 @@ public class PartitionedRegionSerializableObjectJUnitTest
 
     for (int i = 0; i < MAX_THREADS; i++) {
       threadArr[i].start();
-      DistributedTestCase.join(threadArr[i], 30 * 1000, null);
+      ThreadUtils.join(threadArr[i], 30 * 1000);
     }
 
     for (int i = 0; i < MAX_THREADS; i++) {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/820cfd63/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 e5e238e..55fed01 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
@@ -65,10 +65,16 @@ import com.gemstone.gemfire.internal.cache.execute.data.CustId;
 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.AsyncInvocation;
-import com.gemstone.gemfire.test.dunit.DistributedTestCase;
+import com.gemstone.gemfire.test.dunit.DistributedTestUtils;
 import com.gemstone.gemfire.test.dunit.Host;
+import com.gemstone.gemfire.test.dunit.IgnoredException;
+import com.gemstone.gemfire.test.dunit.LogWriterUtils;
+import com.gemstone.gemfire.test.dunit.NetworkUtils;
 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 {
 
@@ -104,7 +110,7 @@ public class PartitionedRegionSingleHopDUnitTest extends CacheTestCase {
 
   public void setUp() throws Exception {
     super.setUp();
-    addExpectedException("Connection refused");
+    IgnoredException.addIgnoredException("Connection refused");
     Host host = Host.getHost(0);
     member0 = host.getVM(0);
     member1 = host.getVM(1);
@@ -112,18 +118,11 @@ public class PartitionedRegionSingleHopDUnitTest extends CacheTestCase {
     member3 = host.getVM(3);
   }
 
-  public void tearDown2() throws Exception {
+  @Override
+  protected final void postTearDownCacheTestCase() throws Exception {
     try {
-      /* fixes GEODE-444, really close client cache first by using super.tearDown2();
-      // close the clients first
-      member0.invoke(PartitionedRegionSingleHopDUnitTest.class, "closeCache");
-      member1.invoke(PartitionedRegionSingleHopDUnitTest.class, "closeCache");
-      member2.invoke(PartitionedRegionSingleHopDUnitTest.class, "closeCache");
-      member3.invoke(PartitionedRegionSingleHopDUnitTest.class, "closeCache");
       closeCache();
-      */
-      super.tearDown2();
-
+      
       member0 = null;
       member1 = null;
       member2 = null;
@@ -131,7 +130,7 @@ public class PartitionedRegionSingleHopDUnitTest extends CacheTestCase {
 
     }
     finally {
-      unregisterAllDataSerializersFromAllVms();
+      DistributedTestUtils.unregisterAllDataSerializersFromAllVms();
     }
   }
 
@@ -186,7 +185,7 @@ public class PartitionedRegionSingleHopDUnitTest extends CacheTestCase {
       server.start();
     }
     catch (IOException e) {
-      fail("Failed to start server ", e);
+      Assert.fail("Failed to start server ", e);
     }
 
     PartitionAttributesFactory paf = new PartitionAttributesFactory();
@@ -197,7 +196,7 @@ public class PartitionedRegionSingleHopDUnitTest extends CacheTestCase {
     attr.setConcurrencyChecksEnabled(true);
     region = cache.createRegion(PR_NAME, attr.create());
     assertNotNull(region);
-    getLogWriter().info(
+    LogWriterUtils.getLogWriter().info(
         "Partitioned Region " + PR_NAME + " created Successfully :"
             + region.toString());
 
@@ -211,7 +210,7 @@ public class PartitionedRegionSingleHopDUnitTest extends CacheTestCase {
     attr.setConcurrencyChecksEnabled(true);
     customerRegion = cache.createRegion("CUSTOMER", attr.create());
     assertNotNull(customerRegion);
-    getLogWriter().info(
+    LogWriterUtils.getLogWriter().info(
         "Partitioned Region CUSTOMER created Successfully :"
             + customerRegion.toString());
 
@@ -225,7 +224,7 @@ public class PartitionedRegionSingleHopDUnitTest extends CacheTestCase {
     attr.setConcurrencyChecksEnabled(true);
     orderRegion = cache.createRegion("ORDER", attr.create());
     assertNotNull(orderRegion);
-    getLogWriter().info(
+    LogWriterUtils.getLogWriter().info(
         "Partitioned Region ORDER created Successfully :"
             + orderRegion.toString());
 
@@ -239,7 +238,7 @@ public class PartitionedRegionSingleHopDUnitTest extends CacheTestCase {
     attr.setConcurrencyChecksEnabled(true);
     shipmentRegion = cache.createRegion("SHIPMENT", attr.create());
     assertNotNull(shipmentRegion);
-    getLogWriter().info(
+    LogWriterUtils.getLogWriter().info(
         "Partitioned Region SHIPMENT created Successfully :"
             + shipmentRegion.toString());
     return port;
@@ -438,7 +437,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");
@@ -455,7 +454,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);
 
   }
 
@@ -497,7 +496,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() {
@@ -539,15 +538,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());
 
   }
@@ -591,7 +590,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");
@@ -604,7 +603,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 = NetworkUtils.getServerHostName(member3.getHost());
     final String locator = host0 + "[" + port3 + "]";
     member3.invoke(PartitionedRegionSingleHopDUnitTest.class,
         "startLocatorInVM", new Object[] { port3 });
@@ -669,7 +668,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();
 
@@ -678,7 +677,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());
   }
 
@@ -722,7 +721,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);
 
@@ -732,7 +731,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());
 
   }
@@ -760,7 +759,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());
   }
 
@@ -780,7 +779,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());
@@ -797,7 +796,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);
@@ -805,7 +804,7 @@ public class PartitionedRegionSingleHopDUnitTest extends CacheTestCase {
   
   public void testMetadataFetchOnlyThroughFunctions() {
     //Workaround for 52004
-    addExpectedException("InternalFunctionInvocationTargetException");
+    IgnoredException.addIgnoredException("InternalFunctionInvocationTargetException");
     Integer port0 = (Integer)member0.invoke(
         PartitionedRegionSingleHopDUnitTest.class, "createServer",
         new Object[] { 3, 4 });
@@ -832,7 +831,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()));
@@ -866,7 +865,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());    
   }
 
@@ -896,7 +895,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()));
     
@@ -910,7 +909,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);  
   }
   
   
@@ -955,7 +954,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());
     }
@@ -990,7 +989,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);
+            LogWriterUtils.getLogWriter().info("still waiting for 4 bucket owners in " + entry.getKey() + ": " + list);
             finished = false;
             break;
           }
@@ -1001,7 +1000,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);
     
@@ -1020,7 +1019,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());
     }
@@ -1077,12 +1076,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 {
@@ -1091,7 +1090,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);
+          LogWriterUtils.getLogWriter().info("verification failed", e);
           return false;
         }
         return true;
@@ -1129,7 +1128,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()));
@@ -1163,7 +1162,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());
     }
@@ -1213,7 +1212,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
@@ -1247,7 +1246,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 });
@@ -1333,7 +1332,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(){
@@ -1349,7 +1348,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) {
@@ -1404,7 +1403,7 @@ public class PartitionedRegionSingleHopDUnitTest extends CacheTestCase {
       server.start();
     }
     catch (IOException e) {
-      fail("Failed to start server ", e);
+      Assert.fail("Failed to start server ", e);
     }
 
     PartitionAttributesFactory paf = new PartitionAttributesFactory();
@@ -1415,7 +1414,7 @@ public class PartitionedRegionSingleHopDUnitTest extends CacheTestCase {
     region = cache.createRegion(PR_NAME, attr.create());
 
     assertNotNull(region);
-    getLogWriter().info(
+    LogWriterUtils.getLogWriter().info(
         "Partitioned Region " + PR_NAME + " created Successfully :"
             + region.toString());
 
@@ -1429,7 +1428,7 @@ public class PartitionedRegionSingleHopDUnitTest extends CacheTestCase {
     attr.setConcurrencyChecksEnabled(true);
     customerRegion = cache.createRegion("CUSTOMER", attr.create());
     assertNotNull(customerRegion);
-    getLogWriter().info(
+    LogWriterUtils.getLogWriter().info(
         "Partitioned Region CUSTOMER created Successfully :"
             + customerRegion.toString());
 
@@ -1442,7 +1441,7 @@ public class PartitionedRegionSingleHopDUnitTest extends CacheTestCase {
     attr.setConcurrencyChecksEnabled(true);
     orderRegion = cache.createRegion("ORDER", attr.create());
     assertNotNull(orderRegion);
-    getLogWriter().info(
+    LogWriterUtils.getLogWriter().info(
         "Partitioned Region ORDER created Successfully :"
             + orderRegion.toString());
 
@@ -1455,7 +1454,7 @@ public class PartitionedRegionSingleHopDUnitTest extends CacheTestCase {
     attr.setConcurrencyChecksEnabled(true);
     shipmentRegion = cache.createRegion("SHIPMENT", attr.create());
     assertNotNull(shipmentRegion);
-    getLogWriter().info(
+    LogWriterUtils.getLogWriter().info(
         "Partitioned Region SHIPMENT created Successfully :"
             + shipmentRegion.toString());
     replicatedRegion = cache.createRegion("rr", new AttributesFactory().create());
@@ -1474,7 +1473,7 @@ public class PartitionedRegionSingleHopDUnitTest extends CacheTestCase {
       server.start();
     }
     catch (IOException e) {
-      fail("Failed to start server ", e);
+      Assert.fail("Failed to start server ", e);
     }
 
     PartitionAttributesFactory paf = new PartitionAttributesFactory();
@@ -1485,7 +1484,7 @@ public class PartitionedRegionSingleHopDUnitTest extends CacheTestCase {
     attr.setConcurrencyChecksEnabled(true);
     region = cache.createRegion(PR_NAME, attr.create());
     assertNotNull(region);
-    getLogWriter().info(
+    LogWriterUtils.getLogWriter().info(
         "Partitioned Region " + PR_NAME + " created Successfully :"
             + region.toString());
 
@@ -1499,7 +1498,7 @@ public class PartitionedRegionSingleHopDUnitTest extends CacheTestCase {
     attr.setConcurrencyChecksEnabled(true);
     customerRegion = cache.createRegion("CUSTOMER", attr.create());
     assertNotNull(customerRegion);
-    getLogWriter().info(
+    LogWriterUtils.getLogWriter().info(
         "Partitioned Region CUSTOMER created Successfully :"
             + customerRegion.toString());
 
@@ -1513,7 +1512,7 @@ public class PartitionedRegionSingleHopDUnitTest extends CacheTestCase {
     attr.setConcurrencyChecksEnabled(true);
     orderRegion = cache.createRegion("ORDER", attr.create());
     assertNotNull(orderRegion);
-    getLogWriter().info(
+    LogWriterUtils.getLogWriter().info(
         "Partitioned Region ORDER created Successfully :"
             + orderRegion.toString());
 
@@ -1527,7 +1526,7 @@ public class PartitionedRegionSingleHopDUnitTest extends CacheTestCase {
     attr.setConcurrencyChecksEnabled(true);
     shipmentRegion = cache.createRegion("SHIPMENT", attr.create());
     assertNotNull(shipmentRegion);
-    getLogWriter().info(
+    LogWriterUtils.getLogWriter().info(
         "Partitioned Region SHIPMENT created Successfully :"
             + shipmentRegion.toString());    
     
@@ -1555,7 +1554,7 @@ public class PartitionedRegionSingleHopDUnitTest extends CacheTestCase {
 //    attr.setConcurrencyChecksEnabled(true);
     region = cache.createRegion(PR_NAME, attr.create());
     assertNotNull(region);
-    getLogWriter().info(
+    LogWriterUtils.getLogWriter().info(
         "Partitioned Region " + PR_NAME + " created Successfully :"
             + region.toString());
 
@@ -1571,7 +1570,7 @@ public class PartitionedRegionSingleHopDUnitTest extends CacheTestCase {
 //    attr.setConcurrencyChecksEnabled(true);
     customerRegion = cache.createRegion("CUSTOMER", attr.create());
     assertNotNull(customerRegion);
-    getLogWriter().info(
+    LogWriterUtils.getLogWriter().info(
         "Partitioned Region CUSTOMER created Successfully :"
             + customerRegion.toString());
 
@@ -1587,7 +1586,7 @@ public class PartitionedRegionSingleHopDUnitTest extends CacheTestCase {
 //    attr.setConcurrencyChecksEnabled(true);
     orderRegion = cache.createRegion("ORDER", attr.create());
     assertNotNull(orderRegion);
-    getLogWriter().info(
+    LogWriterUtils.getLogWriter().info(
         "Partitioned Region ORDER created Successfully :"
             + orderRegion.toString());
 
@@ -1603,7 +1602,7 @@ public class PartitionedRegionSingleHopDUnitTest extends CacheTestCase {
 //    attr.setConcurrencyChecksEnabled(true);
     shipmentRegion = cache.createRegion("SHIPMENT", attr.create());
     assertNotNull(shipmentRegion);
-    getLogWriter().info(
+    LogWriterUtils.getLogWriter().info(
         "Partitioned Region SHIPMENT created Successfully :"
             + shipmentRegion.toString());    
     
@@ -1616,7 +1615,7 @@ public class PartitionedRegionSingleHopDUnitTest extends CacheTestCase {
       server.start();
     }
     catch (IOException e) {
-      fail("Failed to start server ", e);
+      Assert.fail("Failed to start server ", e);
     }
     return port;
   }
@@ -1639,7 +1638,7 @@ public class PartitionedRegionSingleHopDUnitTest extends CacheTestCase {
 //    attr.setConcurrencyChecksEnabled(true);
     region = cache.createRegion(PR_NAME, attr.create());
     assertNotNull(region);
-    getLogWriter().info(
+    LogWriterUtils.getLogWriter().info(
         "Partitioned Region " + PR_NAME + " created Successfully :"
             + region.toString());
 
@@ -1655,7 +1654,7 @@ public class PartitionedRegionSingleHopDUnitTest extends CacheTestCase {
 //    attr.setConcurrencyChecksEnabled(true);
     customerRegion = cache.createRegion("CUSTOMER", attr.create());
     assertNotNull(customerRegion);
-    getLogWriter().info(
+    LogWriterUtils.getLogWriter().info(
         "Partitioned Region CUSTOMER created Successfully :"
             + customerRegion.toString());
 
@@ -1671,7 +1670,7 @@ public class PartitionedRegionSingleHopDUnitTest extends CacheTestCase {
 //    attr.setConcurrencyChecksEnabled(true);
     orderRegion = cache.createRegion("ORDER", attr.create());
     assertNotNull(orderRegion);
-    getLogWriter().info(
+    LogWriterUtils.getLogWriter().info(
         "Partitioned Region ORDER created Successfully :"
             + orderRegion.toString());
 
@@ -1687,7 +1686,7 @@ public class PartitionedRegionSingleHopDUnitTest extends CacheTestCase {
 //    attr.setConcurrencyChecksEnabled(true);
     shipmentRegion = cache.createRegion("SHIPMENT", attr.create());
     assertNotNull(shipmentRegion);
-    getLogWriter().info(
+    LogWriterUtils.getLogWriter().info(
         "Partitioned Region SHIPMENT created Successfully :"
             + shipmentRegion.toString());    
     
@@ -1699,7 +1698,7 @@ public class PartitionedRegionSingleHopDUnitTest extends CacheTestCase {
       server.start();
     }
     catch (IOException e) {
-      fail("Failed to start server ", e);
+      Assert.fail("Failed to start server ", e);
     }
     return port;
   }
@@ -1714,7 +1713,7 @@ public class PartitionedRegionSingleHopDUnitTest extends CacheTestCase {
       server.start();
     }
     catch (IOException e) {
-      fail("Failed to start server ", e);
+      Assert.fail("Failed to start server ", e);
     }
 
     PartitionAttributesFactory paf = new PartitionAttributesFactory();
@@ -1725,7 +1724,7 @@ public class PartitionedRegionSingleHopDUnitTest extends CacheTestCase {
     attr.setConcurrencyChecksEnabled(true);
     region = cache.createRegion(PR_NAME, attr.create());
     assertNotNull(region);
-    getLogWriter().info(
+    LogWriterUtils.getLogWriter().info(
         "Partitioned Region " + PR_NAME + " created Successfully :"
             + region.toString());
 
@@ -1739,7 +1738,7 @@ public class PartitionedRegionSingleHopDUnitTest extends CacheTestCase {
     attr.setConcurrencyChecksEnabled(true);
     customerRegion = cache.createRegion("CUSTOMER", attr.create());
     assertNotNull(customerRegion);
-    getLogWriter().info(
+    LogWriterUtils.getLogWriter().info(
         "Partitioned Region CUSTOMER created Successfully :"
             + customerRegion.toString());
 
@@ -1753,7 +1752,7 @@ public class PartitionedRegionSingleHopDUnitTest extends CacheTestCase {
     attr.setConcurrencyChecksEnabled(true);
     orderRegion = cache.createRegion("ORDER", attr.create());
     assertNotNull(orderRegion);
-    getLogWriter().info(
+    LogWriterUtils.getLogWriter().info(
         "Partitioned Region ORDER created Successfully :"
             + orderRegion.toString());
 
@@ -1767,7 +1766,7 @@ public class PartitionedRegionSingleHopDUnitTest extends CacheTestCase {
     attr.setConcurrencyChecksEnabled(true);
     shipmentRegion = cache.createRegion("SHIPMENT", attr.create());
     assertNotNull(shipmentRegion);
-    getLogWriter().info(
+    LogWriterUtils.getLogWriter().info(
         "Partitioned Region SHIPMENT created Successfully :"
             + shipmentRegion.toString());    
     
@@ -1786,7 +1785,7 @@ public class PartitionedRegionSingleHopDUnitTest extends CacheTestCase {
       server.start();
     }
     catch (IOException e) {
-      fail("Failed to start server ", e);
+      Assert.fail("Failed to start server ", e);
     }
   }
   
@@ -1803,7 +1802,7 @@ public class PartitionedRegionSingleHopDUnitTest extends CacheTestCase {
     attr.setConcurrencyChecksEnabled(true);
     region = cache.createRegion(PR_NAME, attr.create());
     assertNotNull(region);
-    getLogWriter().info(
+    LogWriterUtils.getLogWriter().info(
         "Partitioned Region " + PR_NAME + " created Successfully :"
             + region.toString());
 
@@ -1816,7 +1815,7 @@ public class PartitionedRegionSingleHopDUnitTest extends CacheTestCase {
     attr.setConcurrencyChecksEnabled(true);
     customerRegion = cache.createRegion("CUSTOMER", attr.create());
     assertNotNull(customerRegion);
-    getLogWriter().info(
+    LogWriterUtils.getLogWriter().info(
         "Partitioned Region CUSTOMER created Successfully :"
             + customerRegion.toString());
 
@@ -1829,7 +1828,7 @@ public class PartitionedRegionSingleHopDUnitTest extends CacheTestCase {
     attr.setConcurrencyChecksEnabled(true);
     orderRegion = cache.createRegion("ORDER", attr.create());
     assertNotNull(orderRegion);
-    getLogWriter().info(
+    LogWriterUtils.getLogWriter().info(
         "Partitioned Region ORDER created Successfully :"
             + orderRegion.toString());
 
@@ -1842,7 +1841,7 @@ public class PartitionedRegionSingleHopDUnitTest extends CacheTestCase {
     attr.setConcurrencyChecksEnabled(true);
     shipmentRegion = cache.createRegion("SHIPMENT", attr.create());
     assertNotNull(shipmentRegion);
-    getLogWriter().info(
+    LogWriterUtils.getLogWriter().info(
         "Partitioned Region SHIPMENT created Successfully :"
             + shipmentRegion.toString());
     replicatedRegion = cache.createRegion("rr", new AttributesFactory().create());
@@ -1958,7 +1957,7 @@ public class PartitionedRegionSingleHopDUnitTest extends CacheTestCase {
     RegionAttributes attrs = factory.create();
     region = cache.createRegion(PR_NAME, attrs);
     assertNotNull(region);
-    getLogWriter().info(
+    LogWriterUtils.getLogWriter().info(
         "Distributed Region " + PR_NAME + " created Successfully :"
             + region.toString());
 
@@ -1969,7 +1968,7 @@ public class PartitionedRegionSingleHopDUnitTest extends CacheTestCase {
     attrs = factory.create();
     customerRegion = cache.createRegion("CUSTOMER", attrs);
     assertNotNull(customerRegion);
-    getLogWriter().info(
+    LogWriterUtils.getLogWriter().info(
         "Distributed Region CUSTOMER created Successfully :"
             + customerRegion.toString());
 
@@ -1980,7 +1979,7 @@ public class PartitionedRegionSingleHopDUnitTest extends CacheTestCase {
     attrs = factory.create();
     orderRegion = cache.createRegion("ORDER", attrs);
     assertNotNull(orderRegion);
-    getLogWriter().info(
+    LogWriterUtils.getLogWriter().info(
         "Distributed Region ORDER created Successfully :"
             + orderRegion.toString());
 
@@ -1991,7 +1990,7 @@ public class PartitionedRegionSingleHopDUnitTest extends CacheTestCase {
     attrs = factory.create();
     shipmentRegion = cache.createRegion("SHIPMENT", attrs);
     assertNotNull(shipmentRegion);
-    getLogWriter().info(
+    LogWriterUtils.getLogWriter().info(
         "Distributed Region SHIPMENT created Successfully :"
             + shipmentRegion.toString());
     factory = new AttributesFactory();
@@ -2252,7 +2251,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()));
@@ -2266,7 +2265,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/820cfd63/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 ee256a9..87738b8 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
@@ -41,10 +41,17 @@ import com.gemstone.gemfire.internal.cache.execute.data.CustId;
 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.DistributedTestCase;
+import com.gemstone.gemfire.test.dunit.Assert;
+import com.gemstone.gemfire.test.dunit.DistributedTestUtils;
 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.LogWriterUtils;
+import com.gemstone.gemfire.test.dunit.NetworkUtils;
 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;
@@ -115,26 +122,27 @@ public class PartitionedRegionSingleHopWithServerGroupDUnitTest extends CacheTes
     member1 = host.getVM(1);
     member2 = host.getVM(2);
     member3 = host.getVM(3);
-    addExpectedException("java.net.SocketException");
+    IgnoredException.addIgnoredException("java.net.SocketException");
   }
   
-  public void tearDown2() throws Exception {
+  @Override
+  protected final void preTearDownCacheTestCase() throws Exception {
+    // close the clients first
+    member0.invoke(PartitionedRegionSingleHopWithServerGroupDUnitTest.class, "closeCache");
+    member1.invoke(PartitionedRegionSingleHopWithServerGroupDUnitTest.class, "closeCache");
+    member2.invoke(PartitionedRegionSingleHopWithServerGroupDUnitTest.class, "closeCache");
+    member3.invoke(PartitionedRegionSingleHopWithServerGroupDUnitTest.class, "closeCache");
+    closeCache();
+  }
+  
+  @Override
+  protected final void postTearDownCacheTestCase() throws Exception {
     try {
-
-      // close the clients first
-      member0.invoke(PartitionedRegionSingleHopWithServerGroupDUnitTest.class, "closeCache");
-      member1.invoke(PartitionedRegionSingleHopWithServerGroupDUnitTest.class, "closeCache");
-      member2.invoke(PartitionedRegionSingleHopWithServerGroupDUnitTest.class, "closeCache");
-      member3.invoke(PartitionedRegionSingleHopWithServerGroupDUnitTest.class, "closeCache");
-      closeCache();
-
-      super.tearDown2();
-
       member0 = null;
       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;
@@ -149,7 +157,7 @@ public class PartitionedRegionSingleHopWithServerGroupDUnitTest extends CacheTes
 
     }
     finally {
-      unregisterAllDataSerializersFromAllVms();
+      DistributedTestUtils.unregisterAllDataSerializersFromAllVms();
     }
   }
 
@@ -169,7 +177,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 = NetworkUtils.getServerHostName(member3.getHost());
     final String locator = host0 + "[" + port3 + "]";
     member3.invoke(PartitionedRegionSingleHopWithServerGroupDUnitTest.class,
         "startLocatorInVM", new Object[] { port3 });
@@ -203,7 +211,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 = NetworkUtils.getServerHostName(member3.getHost());
     final String locator = host0 + "[" + port3 + "]";
     member3.invoke(PartitionedRegionSingleHopWithServerGroupDUnitTest.class,
         "startLocatorInVM", new Object[] { port3 });
@@ -237,7 +245,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 = NetworkUtils.getServerHostName(member3.getHost());
     final String locator = host0 + "[" + port3 + "]";
     member3.invoke(PartitionedRegionSingleHopWithServerGroupDUnitTest.class,
         "startLocatorInVM", new Object[] { port3 });
@@ -266,7 +274,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 = NetworkUtils.getServerHostName(member3.getHost());
     final String locator = host0 + "[" + port3 + "]";
     member3.invoke(PartitionedRegionSingleHopWithServerGroupDUnitTest.class,
         "startLocatorInVM", new Object[] { port3 });
@@ -299,7 +307,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 = NetworkUtils.getServerHostName(member3.getHost());
     final String locator = host0 + "[" + port3 + "]";
     member3.invoke(PartitionedRegionSingleHopWithServerGroupDUnitTest.class,
         "startLocatorInVM", new Object[] { port3 });
@@ -338,7 +346,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 = NetworkUtils.getServerHostName(member3.getHost());
     final String locator = host0 + "[" + port3 + "]";
     member3.invoke(PartitionedRegionSingleHopWithServerGroupDUnitTest.class,
         "startLocatorInVM", new Object[] { port3 });
@@ -371,7 +379,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 = NetworkUtils.getServerHostName(member3.getHost());
     final String locator = host0 + "[" + port3 + "]";
     member3.invoke(PartitionedRegionSingleHopWithServerGroupDUnitTest.class,
         "startLocatorInVM", new Object[] { port3 });
@@ -404,7 +412,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 = NetworkUtils.getServerHostName(member3.getHost());
     final String locator = host0 + "[" + port3 + "]";
     member3.invoke(PartitionedRegionSingleHopWithServerGroupDUnitTest.class,
         "startLocatorInVM", new Object[] { port3 });
@@ -451,7 +459,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 = NetworkUtils.getServerHostName(member3.getHost());
     final String locator = host0 + "[" + port3 + "]";
     member3.invoke(PartitionedRegionSingleHopWithServerGroupDUnitTest.class,
         "startLocatorInVM", new Object[] { port3 });
@@ -495,7 +503,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 = NetworkUtils.getServerHostName(member3.getHost());
     final String locator = host0 + "[" + port3 + "]";
     member3.invoke(PartitionedRegionSingleHopWithServerGroupDUnitTest.class,
         "startLocatorInVM", new Object[] { port3 });
@@ -534,7 +542,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 = NetworkUtils.getServerHostName(member3.getHost());
     final String locator = host0 + "[" + port3 + "]";
     member3.invoke(PartitionedRegionSingleHopWithServerGroupDUnitTest.class,
         "startLocatorInVM", new Object[] { port3 });
@@ -578,7 +586,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 = NetworkUtils.getServerHostName(member3.getHost());
     final String locator = host0 + "[" + port3 + "]";
     member3.invoke(PartitionedRegionSingleHopWithServerGroupDUnitTest.class,
         "startLocatorInVM", new Object[] { port3 });
@@ -626,7 +634,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()));
@@ -667,7 +675,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
@@ -747,7 +755,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()));
@@ -809,7 +817,7 @@ public class PartitionedRegionSingleHopWithServerGroupDUnitTest extends CacheTes
       server.start();
     }
     catch (IOException e) {
-      fail("Failed to start server ", e);
+      Assert.fail("Failed to start server ", e);
     }
 
     PartitionAttributesFactory paf = new PartitionAttributesFactory();
@@ -819,7 +827,7 @@ public class PartitionedRegionSingleHopWithServerGroupDUnitTest extends CacheTes
     attr.setPartitionAttributes(paf.create());
     region = cache.createRegion(PR_NAME, attr.create());
     assertNotNull(region);
-    getLogWriter().info(
+    LogWriterUtils.getLogWriter().info(
         "Partitioned Region " + PR_NAME + " created Successfully :"
             + region.toString());
 
@@ -832,7 +840,7 @@ public class PartitionedRegionSingleHopWithServerGroupDUnitTest extends CacheTes
     attr.setPartitionAttributes(paf.create());
     customerRegion = cache.createRegion("CUSTOMER", attr.create());
     assertNotNull(customerRegion);
-    getLogWriter().info(
+    LogWriterUtils.getLogWriter().info(
         "Partitioned Region CUSTOMER created Successfully :"
             + customerRegion.toString());
 
@@ -845,7 +853,7 @@ public class PartitionedRegionSingleHopWithServerGroupDUnitTest extends CacheTes
     attr.setPartitionAttributes(paf.create());
     orderRegion = cache.createRegion("ORDER", attr.create());
     assertNotNull(orderRegion);
-    getLogWriter().info(
+    LogWriterUtils.getLogWriter().info(
         "Partitioned Region ORDER created Successfully :"
             + orderRegion.toString());
 
@@ -858,7 +866,7 @@ public class PartitionedRegionSingleHopWithServerGroupDUnitTest extends CacheTes
     attr.setPartitionAttributes(paf.create());
     shipmentRegion = cache.createRegion("SHIPMENT", attr.create());
     assertNotNull(shipmentRegion);
-    getLogWriter().info(
+    LogWriterUtils.getLogWriter().info(
         "Partitioned Region SHIPMENT created Successfully :"
             + shipmentRegion.toString());
     return port;
@@ -895,7 +903,7 @@ public class PartitionedRegionSingleHopWithServerGroupDUnitTest extends CacheTes
       server.start();
     }
     catch (IOException e) {
-      fail("Failed to start server ", e);
+      Assert.fail("Failed to start server ", e);
     }
 
     PartitionAttributesFactory paf = new PartitionAttributesFactory();
@@ -905,7 +913,7 @@ public class PartitionedRegionSingleHopWithServerGroupDUnitTest extends CacheTes
     attr.setPartitionAttributes(paf.create());
     region = cache.createRegion(PR_NAME, attr.create());
     assertNotNull(region);
-    getLogWriter().info(
+    LogWriterUtils.getLogWriter().info(
         "Partitioned Region " + PR_NAME + " created Successfully :"
             + region.toString());
 
@@ -918,7 +926,7 @@ public class PartitionedRegionSingleHopWithServerGroupDUnitTest extends CacheTes
     attr.setPartitionAttributes(paf.create());
     customerRegion = cache.createRegion("CUSTOMER", attr.create());
     assertNotNull(customerRegion);
-    getLogWriter().info(
+    LogWriterUtils.getLogWriter().info(
         "Partitioned Region CUSTOMER created Successfully :"
             + customerRegion.toString());
 
@@ -931,7 +939,7 @@ public class PartitionedRegionSingleHopWithServerGroupDUnitTest extends CacheTes
     attr.setPartitionAttributes(paf.create());
     orderRegion = cache.createRegion("ORDER", attr.create());
     assertNotNull(orderRegion);
-    getLogWriter().info(
+    LogWriterUtils.getLogWriter().info(
         "Partitioned Region ORDER created Successfully :"
             + orderRegion.toString());
 
@@ -944,7 +952,7 @@ public class PartitionedRegionSingleHopWithServerGroupDUnitTest extends CacheTes
     attr.setPartitionAttributes(paf.create());
     shipmentRegion = cache.createRegion("SHIPMENT", attr.create());
     assertNotNull(shipmentRegion);
-    getLogWriter().info(
+    LogWriterUtils.getLogWriter().info(
         "Partitioned Region SHIPMENT created Successfully :"
             + shipmentRegion.toString());
     return port;
@@ -981,7 +989,7 @@ public class PartitionedRegionSingleHopWithServerGroupDUnitTest extends CacheTes
       server.start();
     }
     catch (IOException e) {
-      fail("Failed to start server ", e);
+      Assert.fail("Failed to start server ", e);
     }
 
     PartitionAttributesFactory paf = new PartitionAttributesFactory();
@@ -991,7 +999,7 @@ public class PartitionedRegionSingleHopWithServerGroupDUnitTest extends CacheTes
     attr.setPartitionAttributes(paf.create());
     region = cache.createRegion(PR_NAME, attr.create());
     assertNotNull(region);
-    getLogWriter().info(
+    LogWriterUtils.getLogWriter().info(
         "Partitioned Region " + PR_NAME + " created Successfully :"
             + region.toString());
 
@@ -1004,7 +1012,7 @@ public class PartitionedRegionSingleHopWithServerGroupDUnitTest extends CacheTes
     attr.setPartitionAttributes(paf.create());
     customerRegion = cache.createRegion("CUSTOMER", attr.create());
     assertNotNull(customerRegion);
-    getLogWriter().info(
+    LogWriterUtils.getLogWriter().info(
         "Partitioned Region CUSTOMER created Successfully :"
             + customerRegion.toString());
 
@@ -1017,7 +1025,7 @@ public class PartitionedRegionSingleHopWithServerGroupDUnitTest extends CacheTes
     attr.setPartitionAttributes(paf.create());
     orderRegion = cache.createRegion("ORDER", attr.create());
     assertNotNull(orderRegion);
-    getLogWriter().info(
+    LogWriterUtils.getLogWriter().info(
         "Partitioned Region ORDER created Successfully :"
             + orderRegion.toString());
 
@@ -1030,7 +1038,7 @@ public class PartitionedRegionSingleHopWithServerGroupDUnitTest extends CacheTes
     attr.setPartitionAttributes(paf.create());
     shipmentRegion = cache.createRegion("SHIPMENT", attr.create());
     assertNotNull(shipmentRegion);
-    getLogWriter().info(
+    LogWriterUtils.getLogWriter().info(
         "Partitioned Region SHIPMENT created Successfully :"
             + shipmentRegion.toString());
     
@@ -1043,7 +1051,7 @@ public class PartitionedRegionSingleHopWithServerGroupDUnitTest extends CacheTes
     attr.setPartitionAttributes(paf.create());
     region2 = cache.createRegion(PR_NAME2, attr.create());
     assertNotNull(region2);
-    getLogWriter().info(
+    LogWriterUtils.getLogWriter().info(
         "Partitioned Region " + PR_NAME2 + " created Successfully :"
             + region2.toString());
 
@@ -1056,7 +1064,7 @@ public class PartitionedRegionSingleHopWithServerGroupDUnitTest extends CacheTes
     attr.setPartitionAttributes(paf.create());
     customerRegion2 = cache.createRegion(CUSTOMER2, attr.create());
     assertNotNull(customerRegion2);
-    getLogWriter().info(
+    LogWriterUtils.getLogWriter().info(
         "Partitioned Region CUSTOMER2 created Successfully :"
             + customerRegion2.toString());
 
@@ -1069,7 +1077,7 @@ public class PartitionedRegionSingleHopWithServerGroupDUnitTest extends CacheTes
     attr.setPartitionAttributes(paf.create());
     orderRegion2 = cache.createRegion(ORDER2, attr.create());
     assertNotNull(orderRegion2);
-    getLogWriter().info(
+    LogWriterUtils.getLogWriter().info(
         "Partitioned Region ORDER2 created Successfully :"
             + orderRegion2.toString());
 
@@ -1082,7 +1090,7 @@ public class PartitionedRegionSingleHopWithServerGroupDUnitTest extends CacheTes
     attr.setPartitionAttributes(paf.create());
     shipmentRegion2 = cache.createRegion(SHIPMENT2, attr.create());
     assertNotNull(shipmentRegion2);
-    getLogWriter().info(
+    LogWriterUtils.getLogWriter().info(
         "Partitioned Region SHIPMENT2 created Successfully :"
             + shipmentRegion2.toString());
     
@@ -1185,7 +1193,7 @@ public class PartitionedRegionSingleHopWithServerGroupDUnitTest extends CacheTes
     RegionAttributes attrs = factory.create();
     region = cache.createRegion(PR_NAME, attrs);
     assertNotNull(region);
-    getLogWriter().info(
+    LogWriterUtils.getLogWriter().info(
         "Distributed Region " + PR_NAME + " created Successfully :"
             + region.toString());
 
@@ -1194,7 +1202,7 @@ public class PartitionedRegionSingleHopWithServerGroupDUnitTest extends CacheTes
     attrs = factory.create();
     customerRegion = cache.createRegion("CUSTOMER", attrs);
     assertNotNull(customerRegion);
-    getLogWriter().info(
+    LogWriterUtils.getLogWriter().info(
         "Distributed Region CUSTOMER created Successfully :"
             + customerRegion.toString());
 
@@ -1203,7 +1211,7 @@ public class PartitionedRegionSingleHopWithServerGroupDUnitTest extends CacheTes
     attrs = factory.create();
     orderRegion = cache.createRegion("ORDER", attrs);
     assertNotNull(orderRegion);
-    getLogWriter().info(
+    LogWriterUtils.getLogWriter().info(
         "Distributed Region ORDER created Successfully :"
             + orderRegion.toString());
 
@@ -1212,7 +1220,7 @@ public class PartitionedRegionSingleHopWithServerGroupDUnitTest extends CacheTes
     attrs = factory.create();
     shipmentRegion = cache.createRegion("SHIPMENT", attrs);
     assertNotNull(shipmentRegion);
-    getLogWriter().info(
+    LogWriterUtils.getLogWriter().info(
         "Distributed Region SHIPMENT created Successfully :"
             + shipmentRegion.toString());
   }
@@ -1224,7 +1232,7 @@ public class PartitionedRegionSingleHopWithServerGroupDUnitTest extends CacheTes
     RegionAttributes attrs = factory.create();
     region = cache.createRegion(PR_NAME, attrs);
     assertNotNull(region);
-    getLogWriter().info(
+    LogWriterUtils.getLogWriter().info(
         "Distributed Region " + PR_NAME + " created Successfully :"
             + region.toString());
 
@@ -1233,7 +1241,7 @@ public class PartitionedRegionSingleHopWithServerGroupDUnitTest extends CacheTes
     attrs = factory.create();
     customerRegion = cache.createRegion("CUSTOMER", attrs);
     assertNotNull(customerRegion);
-    getLogWriter().info(
+    LogWriterUtils.getLogWriter().info(
         "Distributed Region CUSTOMER created Successfully :"
             + customerRegion.toString());
 
@@ -1242,7 +1250,7 @@ public class PartitionedRegionSingleHopWithServerGroupDUnitTest extends CacheTes
     attrs = factory.create();
     orderRegion = cache.createRegion("ORDER", attrs);
     assertNotNull(orderRegion);
-    getLogWriter().info(
+    LogWriterUtils.getLogWriter().info(
         "Distributed Region ORDER created Successfully :"
             + orderRegion.toString());
 
@@ -1251,7 +1259,7 @@ public class PartitionedRegionSingleHopWithServerGroupDUnitTest extends CacheTes
     attrs = factory.create();
     shipmentRegion = cache.createRegion("SHIPMENT", attrs);
     assertNotNull(shipmentRegion);
-    getLogWriter().info(
+    LogWriterUtils.getLogWriter().info(
         "Distributed Region SHIPMENT created Successfully :"
             + shipmentRegion.toString());
     
@@ -1262,7 +1270,7 @@ public class PartitionedRegionSingleHopWithServerGroupDUnitTest extends CacheTes
     attrs = factory.create();
     region2 = cache.createRegion(PR_NAME2, attrs);
     assertNotNull(region2);
-    getLogWriter().info(
+    LogWriterUtils.getLogWriter().info(
         "Distributed Region " + PR_NAME2 + " created Successfully :"
             + region2.toString());
 
@@ -1271,7 +1279,7 @@ public class PartitionedRegionSingleHopWithServerGroupDUnitTest extends CacheTes
     attrs = factory.create();
     customerRegion2 = cache.createRegion(CUSTOMER2, attrs);
     assertNotNull(customerRegion2);
-    getLogWriter().info(
+    LogWriterUtils.getLogWriter().info(
         "Distributed Region CUSTOMER2 created Successfully :"
             + customerRegion2.toString());
 
@@ -1280,7 +1288,7 @@ public class PartitionedRegionSingleHopWithServerGroupDUnitTest extends CacheTes
     attrs = factory.create();
     orderRegion2 = cache.createRegion(ORDER2, attrs);
     assertNotNull(orderRegion2);
-    getLogWriter().info(
+    LogWriterUtils.getLogWriter().info(
         "Distributed Region ORDER2 created Successfully :"
             + orderRegion2.toString());
 
@@ -1289,7 +1297,7 @@ public class PartitionedRegionSingleHopWithServerGroupDUnitTest extends CacheTes
     attrs = factory.create();
     shipmentRegion2 = cache.createRegion(SHIPMENT2, attrs);
     assertNotNull(shipmentRegion2);
-    getLogWriter().info(
+    LogWriterUtils.getLogWriter().info(
         "Distributed Region SHIPMENT2 created Successfully :"
             + shipmentRegion2.toString());
   }
@@ -1301,7 +1309,7 @@ public class PartitionedRegionSingleHopWithServerGroupDUnitTest extends CacheTes
     RegionAttributes attrs = factory.create();
     region = cache.createRegion(PR_NAME, attrs);
     assertNotNull(region);
-    getLogWriter().info(
+    LogWriterUtils.getLogWriter().info(
         "Distributed Region " + PR_NAME + " created Successfully :"
             + region.toString());
 
@@ -1310,7 +1318,7 @@ public class PartitionedRegionSingleHopWithServerGroupDUnitTest extends CacheTes
     attrs = factory.create();
     customerRegion = cache.createRegion("CUSTOMER", attrs);
     assertNotNull(customerRegion);
-    getLogWriter().info(
+    LogWriterUtils.getLogWriter().info(
         "Distributed Region CUSTOMER created Successfully :"
             + customerRegion.toString());
 
@@ -1319,7 +1327,7 @@ public class PartitionedRegionSingleHopWithServerGroupDUnitTest extends CacheTes
     attrs = factory.create();
     orderRegion = cache.createRegion("ORDER", attrs);
     assertNotNull(orderRegion);
-    getLogWriter().info(
+    LogWriterUtils.getLogWriter().info(
         "Distributed Region ORDER created Successfully :"
             + orderRegion.toString());
 
@@ -1328,7 +1336,7 @@ public class PartitionedRegionSingleHopWithServerGroupDUnitTest extends CacheTes
     attrs = factory.create();
     shipmentRegion = cache.createRegion("SHIPMENT", attrs);
     assertNotNull(shipmentRegion);
-    getLogWriter().info(
+    LogWriterUtils.getLogWriter().info(
         "Distributed Region SHIPMENT created Successfully :"
             + shipmentRegion.toString());
     
@@ -1350,7 +1358,7 @@ public class PartitionedRegionSingleHopWithServerGroupDUnitTest extends CacheTes
       server.start();
     }
     catch (IOException e) {
-      fail("Failed to start server ", e);
+      Assert.fail("Failed to start server ", e);
     }
 
     PartitionAttributesFactory paf = new PartitionAttributesFactory();
@@ -1360,7 +1368,7 @@ public class PartitionedRegionSingleHopWithServerGroupDUnitTest extends CacheTes
     region = cache.createRegion(PR_NAME, attr.create());
 
     assertNotNull(region);
-    getLogWriter().info(
+    LogWriterUtils.getLogWriter().info(
         "Partitioned Region " + PR_NAME + " created Successfully :"
             + region.toString());
 
@@ -1373,7 +1381,7 @@ public class PartitionedRegionSingleHopWithServerGroupDUnitTest extends CacheTes
     attr.setPartitionAttributes(paf.create());
     customerRegion = cache.createRegion("CUSTOMER", attr.create());
     assertNotNull(customerRegion);
-    getLogWriter().info(
+    LogWriterUtils.getLogWriter().info(
         "Partitioned Region CUSTOMER created Successfully :"
             + customerRegion.toString());
 
@@ -1385,7 +1393,7 @@ public class PartitionedRegionSingleHopWithServerGroupDUnitTest extends CacheTes
     attr.setPartitionAttributes(paf.create());
     orderRegion = cache.createRegion("ORDER", attr.create());
     assertNotNull(orderRegion);
-    getLogWriter().info(
+    LogWriterUtils.getLogWriter().info(
         "Partitioned Region ORDER created Successfully :"
             + orderRegion.toString());
 
@@ -1397,7 +1405,7 @@ public class PartitionedRegionSingleHopWithServerGroupDUnitTest extends CacheTes
     attr.setPartitionAttributes(paf.create());
     shipmentRegion = cache.createRegion("SHIPMENT", attr.create());
     assertNotNull(shipmentRegion);
-    getLogWriter().info(
+    LogWriterUtils.getLogWriter().info(
         "Partitioned Region SHIPMENT created Successfully :"
             + shipmentRegion.toString());
     return port;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/820cfd63/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 c4c9796..cda653a 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
@@ -31,11 +31,13 @@ import com.gemstone.gemfire.cache30.CacheSerializableRunnable;
 import com.gemstone.gemfire.distributed.DistributedSystem;
 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.LogWriterUtils;
 import com.gemstone.gemfire.test.dunit.SerializableCallable;
 import com.gemstone.gemfire.test.dunit.SerializableRunnable;
+import com.gemstone.gemfire.test.dunit.ThreadUtils;
 import com.gemstone.gemfire.test.dunit.VM;
 
 /**
@@ -118,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(LogWriterUtils.getLogWriter(), InternalLogWriter.WARNING_LEVEL);
         for (int j = 0; j < MAX_REGIONS; j++) {
           Region pr = cache.getRegion(Region.SEPARATOR + PR_PREFIX
               + "DistAckSync" + j);
@@ -128,7 +130,7 @@ public class PartitionedRegionSizeDUnitTest extends
             pr.put(key, value);
           }
         }
-        setLogLevel(getLogWriter(), oldLevel);
+        setLogLevel(LogWriterUtils.getLogWriter(), oldLevel);
 
       }
     });
@@ -220,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(LogWriterUtils.getLogWriter(), InternalLogWriter.WARNING_LEVEL);
         for (int j = 0; j < MAX_REGIONS; j++) {
           Region pr = cache.getRegion(Region.SEPARATOR + PR_PREFIX
               + "DistAckASync" + j);
@@ -230,14 +232,14 @@ public class PartitionedRegionSizeDUnitTest extends
             pr.put(key, value);
           }
         }
-        setLogLevel(getLogWriter(), oldLevel);
+        setLogLevel(LogWriterUtils.getLogWriter(), oldLevel);
       }
     });
 
-    DistributedTestCase.join(async0, 30 * 1000, getLogWriter());
+    ThreadUtils.join(async0, 30 * 1000);
 
 	if (async0.exceptionOccurred()) {
-          fail("Exception during async0", async0.getException());
+          Assert.fail("Exception during async0", async0.getException());
 	}
 				   
     
@@ -324,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(LogWriterUtils.getLogWriter(), InternalLogWriter.WARNING_LEVEL);
         for (int j = 0; j < MAX_REGIONS; j++) {
           Region pr = cache.getRegion(Region.SEPARATOR + PR_PREFIX
               + "DistAckSyncChangingVMCount" + j);
@@ -334,7 +336,7 @@ public class PartitionedRegionSizeDUnitTest extends
             pr.put(key, value);
           }
         }
-        setLogLevel(getLogWriter(), oldLevel);
+        setLogLevel(LogWriterUtils.getLogWriter(), oldLevel);
       }
     });
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/820cfd63/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 fe2a104..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
@@ -30,9 +30,12 @@ import com.gemstone.gemfire.cache.control.RebalanceOperation;
 import com.gemstone.gemfire.cache.control.RebalanceResults;
 import com.gemstone.gemfire.cache30.CacheSerializableRunnable;
 import com.gemstone.gemfire.distributed.DistributedSystem;
+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
@@ -358,7 +361,7 @@ public class PartitionedRegionStatsDUnitTest extends
         try {
           RebalanceResults results = op.getResults();
         } catch (Exception e) {
-          fail("ex", e);
+          Assert.fail("ex", e);
         }
       }
     };
@@ -406,7 +409,7 @@ public class PartitionedRegionStatsDUnitTest extends
           RebalanceResults results = op.getResults();
         }
         catch (Exception e) {
-          fail("ex", e);
+          Assert.fail("ex", e);
         }
       }
     };
@@ -517,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() {
@@ -541,7 +544,7 @@ public class PartitionedRegionStatsDUnitTest extends
         try {
           tombstoneService.forceBatchExpirationForTests(1);
         } catch (InterruptedException e) {
-          fail("interrupted", e);
+          Assert.fail("interrupted", e);
         }
       }
     });

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/820cfd63/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 f43c8b8..0690a6d 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
@@ -36,7 +36,9 @@ import com.gemstone.gemfire.cache.PartitionAttributesFactory;
 import com.gemstone.gemfire.cache.Region;
 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.LogWriterUtils;
 import com.gemstone.gemfire.test.dunit.VM;
 
 /**
@@ -90,16 +92,16 @@ 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");
+          LogWriterUtils.getLogWriter().info("Invocation " + i + " of getSomeKeys");
           try {
             Set s = null;
             s = pr.getSomeKeys(rand);
             assertNotNull(s);
             assertTrue(s.isEmpty());
           } catch (ClassNotFoundException cnfe) {
-            fail("GetSomeKeys failed with ClassNotFoundException", cnfe);
+            Assert.fail("GetSomeKeys failed with ClassNotFoundException", cnfe);
           } catch (IOException ioe) {
-            fail("GetSomeKeys failed with IOException", ioe);
+            Assert.fail("GetSomeKeys failed with IOException", ioe);
           }
         }
         
@@ -110,26 +112,26 @@ 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");
+          LogWriterUtils.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");
+            LogWriterUtils.getLogWriter().info("Invocation " + i + " got " + s.size() + " keys");
             for (Iterator it = s.iterator(); it.hasNext(); ) {
               Object key = it.next();
-              getLogWriter().info("Key: " + key);
+              LogWriterUtils.getLogWriter().info("Key: " + key);
               val = (Integer) pr.get(key);
               assertNotNull(val);
               assertTrue(val.intValue() >= 0);
               assertTrue(val.intValue() < MAXKEYS); 
             }
           } catch (ClassNotFoundException cnfe) {
-            fail("GetSomeKeys failed with ClassNotFoundException", cnfe);
+            Assert.fail("GetSomeKeys failed with ClassNotFoundException", cnfe);
           } catch (IOException ioe) {
-            fail("GetSomeKeys failed with IOException", ioe);
+            Assert.fail("GetSomeKeys failed with IOException", ioe);
           }
         }
       }
@@ -511,7 +513,7 @@ public class PartitionedRegionTestUtilsDUnitTest extends
               assertEquals(0, p.getBucketOwnersForValidation(i).size());
             }
           } catch (ForceReattemptException noGood) {
-            fail("Unexpected force retry", noGood);
+            Assert.fail("Unexpected force retry", noGood);
           }
         }
       }
@@ -560,7 +562,7 @@ public class PartitionedRegionTestUtilsDUnitTest extends
               assertEquals(1, primCount);
             }
           } catch (ForceReattemptException noGood) {
-            fail("Unexpected force retry", noGood);
+            Assert.fail("Unexpected force retry", noGood);
           }
         }
       }


Mime
View raw message