geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kl...@apache.org
Subject [31/51] [partial] incubator-geode git commit: GEODE-773: Extract static methods from DistributedTestCase
Date Tue, 09 Feb 2016 18:44:41 GMT
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/820cfd63/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 6a7807f..d8eaf9c 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
@@ -37,7 +37,9 @@ import com.gemstone.gemfire.cache.RegionAttributes;
 import com.gemstone.gemfire.cache.RegionExistsException;
 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.LogWriterUtils;
 import com.gemstone.gemfire.test.dunit.SerializableRunnable;
 import com.gemstone.gemfire.test.dunit.VM;
 
@@ -106,7 +108,7 @@ public class PartitionedRegionWithSameNameDUnitTest extends
     firstCreationFlag = true;
     createPartitionRegion(vmList, startIndexForRegion, endIndexForRegion,
         localMaxMemory, redundancy, firstCreationFlag, multipleVMFlag);
-    getLogWriter()
+    LogWriterUtils.getLogWriter()
         .info(
             "testNameWithPartitionRegionFirstOnSameVM() - Partition Regions successfully created ");
     // creating distributed region on same vm with same name as previouslu
@@ -117,7 +119,7 @@ public class PartitionedRegionWithSameNameDUnitTest extends
     vmList = addNodeToList(startIndexForNode, endIndexForNode);
     createDistributedRegion(vmList, startIndexForRegion, endIndexForRegion,
         Scope.DISTRIBUTED_ACK, firstCreationFlag, multipleVMFlag);
-    getLogWriter()
+    LogWriterUtils.getLogWriter()
         .info(
             "testNameWithPartitionRegionFirstOnSameVM() - test completed successfully ");
   }
@@ -158,7 +160,7 @@ public class PartitionedRegionWithSameNameDUnitTest extends
     createPartitionRegion(vmList, startIndexForRegion, endIndexForRegion,
         localMaxMemory, redundancy, firstCreationFlag, multipleVMFlag);
 
-    getLogWriter()
+    LogWriterUtils.getLogWriter()
         .info(
             "testNameWithPartitionRegionFirstOnSameVM() - test completed successfully ");
   }
@@ -195,7 +197,7 @@ public class PartitionedRegionWithSameNameDUnitTest extends
     firstCreationFlag = true;
     createPartitionRegion(vmList, startIndexForRegion, endIndexForRegion,
         localMaxMemory, redundancy, firstCreationFlag, multipleVMFlag);
-    getLogWriter()
+    LogWriterUtils.getLogWriter()
         .info(
             "testNameWithPartitionRegionFirstOnDifferentVM() - Partition Regions successfully created ");
     // creating distrubuted region with the scope = DISTRIBUTED_ACK on
@@ -208,7 +210,7 @@ public class PartitionedRegionWithSameNameDUnitTest extends
     vmList = addNodeToList(startIndexForNode, endIndexForNode);
     createDistributedRegion(vmList, startIndexForRegion, endIndexForRegion,
         Scope.DISTRIBUTED_ACK, firstCreationFlag, multipleVMFlag);
-    getLogWriter()
+    LogWriterUtils.getLogWriter()
         .info(
             "testNameWithPartitionRegionFirstOnDifferentVM() - test completed successfully ");
   }
@@ -250,7 +252,7 @@ public class PartitionedRegionWithSameNameDUnitTest extends
     createPartitionRegion(vmList, startIndexForRegion, endIndexForRegion,
         localMaxMemory, redundancy, firstCreationFlag, multipleVMFlag);
 
-    getLogWriter()
+    LogWriterUtils.getLogWriter()
         .info(
             "testNameWithLocalRegionFirstOnDifferentVM() - test completed successfully ");
   }
@@ -291,7 +293,7 @@ public class PartitionedRegionWithSameNameDUnitTest extends
     firstCreationFlag = true;
     createPartitionRegion(vmList, startIndexForRegion, endIndexForRegion,
         localMaxMemory, redundancy, firstCreationFlag, multipleVMFlag);
-    getLogWriter()
+    LogWriterUtils.getLogWriter()
         .info(
             "testPartitionRegionVsLocalRegionFirst() - test completed successfully ");
   }
@@ -333,7 +335,7 @@ public class PartitionedRegionWithSameNameDUnitTest extends
     firstCreationFlag = true;
     createDistributedRegion(vmList, startIndexForRegion, endIndexForRegion,
         Scope.LOCAL, firstCreationFlag, multipleVMFlag);
-    getLogWriter()
+    LogWriterUtils.getLogWriter()
         .info(
             "testPartitionRegionVsLocalRegionSecond() - test completed successfully ");
   }
@@ -365,12 +367,12 @@ public class PartitionedRegionWithSameNameDUnitTest extends
     firstCreationFlag = true;
     createPartitionRegion(vmList, startIndexForRegion, endIndexForRegion,
         localMaxMemory, redundancy, firstCreationFlag, multipleVMFlag);
-    getLogWriter()
+    LogWriterUtils.getLogWriter()
         .info(
             "testWithPartitionedRegionAsParentRegionAndDistributedSubRegion() - Parent region as partitioned region is created ");
     // create subregion of partition region
     createSubRegionOfPartitionedRegion(vmList, DISTRIBUTED_REGION);
-    getLogWriter()
+    LogWriterUtils.getLogWriter()
         .info(
             "testWithPartitionedRegionAsParentRegionAndDistributedSubRegion() completed Successfully ");
   }
@@ -403,12 +405,12 @@ public class PartitionedRegionWithSameNameDUnitTest extends
     firstCreationFlag = true;
     createPartitionRegion(vmList, startIndexForRegion, endIndexForRegion,
         localMaxMemory, redundancy, firstCreationFlag, multipleVMFlag);
-    getLogWriter()
+    LogWriterUtils.getLogWriter()
         .info(
             "testWithPartitionedRegionAsParentRegionAndPartitionedSubRegion() - Parent region as partitioned region is created ");
     // create subregion of partition region
     createSubRegionOfPartitionedRegion(vmList, PARTITIONED_REGION);
-    getLogWriter()
+    LogWriterUtils.getLogWriter()
         .info(
             "testWithPartitionedRegionAsParentRegionAndPartitionedSubRegion() completed Successfully ");
   }
@@ -440,7 +442,7 @@ public class PartitionedRegionWithSameNameDUnitTest extends
     firstCreationFlag = true;
     createDistributedRegion(vmList, startIndexForRegion, endIndexForRegion,
         Scope.DISTRIBUTED_ACK, firstCreationFlag, multipleVMFlag);
-    getLogWriter().info(
+    LogWriterUtils.getLogWriter().info(
         "testWithSubRegionPartitionedRegionFirst() - Parent region is created");
     // creating distributed region as subregion of parent on vm0
     prPrefix = "child_region";
@@ -448,7 +450,7 @@ public class PartitionedRegionWithSameNameDUnitTest extends
     endIndexForNode = 1;
     vmList = addNodeToList(startIndexForNode, endIndexForNode);
     createPartitionedSubRegion(vmList, firstCreationFlag);
-    getLogWriter()
+    LogWriterUtils.getLogWriter()
         .info(
             "testWithSubRegionPartitionedRegionFirst() - Partitioned sub region on vm0 ");
     // creating partiton region as subregion of parent region with the same name
@@ -457,7 +459,7 @@ public class PartitionedRegionWithSameNameDUnitTest extends
     endIndexForNode = 4;
     vmList = addNodeToList(startIndexForNode, endIndexForNode);
     createDistributedSubRegion(vmList, firstCreationFlag);
-    getLogWriter().info(
+    LogWriterUtils.getLogWriter().info(
         "testWithSubRegionPartitionedRegionFirst() completed successfully ");
 
   }
@@ -489,7 +491,7 @@ public class PartitionedRegionWithSameNameDUnitTest extends
     firstCreationFlag = true;
     createDistributedRegion(vmList, startIndexForRegion, endIndexForRegion,
         Scope.DISTRIBUTED_ACK, firstCreationFlag, multipleVMFlag);
-    getLogWriter().info(
+    LogWriterUtils.getLogWriter().info(
         "testWithSubRegionDistributedRegionFirst() - Parent region is created");
     // creating distributed region as subregion of parent on vm0
     prPrefix = "child_region";
@@ -497,7 +499,7 @@ public class PartitionedRegionWithSameNameDUnitTest extends
     endIndexForNode = 1;
     vmList = addNodeToList(startIndexForNode, endIndexForNode);
     createDistributedSubRegion(vmList, firstCreationFlag);
-    getLogWriter()
+    LogWriterUtils.getLogWriter()
         .info(
             "testWithSubRegionDistributedRegionFirst() - Distributed sub region on vm0 ");
     // creating partiton region as subregion of parent region with the same name
@@ -506,7 +508,7 @@ public class PartitionedRegionWithSameNameDUnitTest extends
     endIndexForNode = 4;
     vmList = addNodeToList(startIndexForNode, endIndexForNode);
     createPartitionedSubRegion(vmList, firstCreationFlag);
-    getLogWriter().info(
+    LogWriterUtils.getLogWriter().info(
         "testWithSubRegionDistributedRegionFirst() completed successfully ");
 
   }
@@ -617,7 +619,7 @@ public class PartitionedRegionWithSameNameDUnitTest extends
           case DISTRIBUTED_REGION: {
             Region childRegion = parentRegion.createSubregion("child_region",
                 ra);
-            getLogWriter().info(
+            LogWriterUtils.getLogWriter().info(
                 "Distributed Subregion is created as : "
                     + childRegion.getName());
           }
@@ -625,7 +627,7 @@ public class PartitionedRegionWithSameNameDUnitTest extends
           case PARTITIONED_REGION: {
             Region childRegion = parentRegion.createSubregion("child_region",
                 createRegionAttrsForPR(0, 200));
-            getLogWriter().info(
+            LogWriterUtils.getLogWriter().info(
                 "Partitioned Subregion is created as : "
                     + childRegion.getName());
 
@@ -748,7 +750,7 @@ public class PartitionedRegionWithSameNameDUnitTest extends
               cache.createRegion(innerPrPrefix + i, ra);
             }
             catch (RegionExistsException ex) {
-              fail(
+              Assert.fail(
                   "Got incorrect exception because the partition region being created prior to local region",
                   ex);
             }
@@ -879,7 +881,7 @@ public class PartitionedRegionWithSameNameDUnitTest extends
             }
           }
         }
-        getLogWriter()
+        LogWriterUtils.getLogWriter()
             .info(
                 "createMultiplePartitionRegion() - Partition Regions Successfully Completed ");
       }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/820cfd63/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 b192a43..7fd0c16 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
@@ -38,8 +38,10 @@ import com.gemstone.gemfire.cache.Scope;
 import com.gemstone.gemfire.cache.util.CacheWriterAdapter;
 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.DistributedTestCase;
 import com.gemstone.gemfire.test.dunit.Host;
+import com.gemstone.gemfire.test.dunit.LogWriterUtils;
 import com.gemstone.gemfire.test.dunit.VM;
 
 /**
@@ -71,15 +73,16 @@ 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");
+      LogWriterUtils.getLogWriter().fine("Cache created successfully");
     }
     
-    public void tearDown2(){
-        Host host = Host.getHost(0);
-        VM vm0 = host.getVM(0);
-        VM vm1 = host.getVM(1);
-        vm0.invoke(PutAllDAckDUnitTest.class, "closeCache");
-        vm1.invoke(PutAllDAckDUnitTest.class, "closeCache");
+    @Override
+    protected final void preTearDown() throws Exception {
+      Host host = Host.getHost(0);
+      VM vm0 = host.getVM(0);
+      VM vm1 = host.getVM(1);
+      vm0.invoke(PutAllDAckDUnitTest.class, "closeCache");
+      vm1.invoke(PutAllDAckDUnitTest.class, "closeCache");
     }
     
     public static void createCacheForVM0() throws Exception {
@@ -144,7 +147,7 @@ public class PutAllDAckDUnitTest extends DistributedTestCase {
                 obj = region.put(ob, str);
             }
         }catch(Exception ex){
-            fail("Failed while region.put", ex);
+            Assert.fail("Failed while region.put", ex);
         }
         return obj;
     }//end of putMethod
@@ -162,7 +165,7 @@ public class PutAllDAckDUnitTest extends DistributedTestCase {
             region.putAll(m);
             
         }catch(Exception ex){
-            fail("Failed while region.putAll", ex);
+            Assert.fail("Failed while region.putAll", ex);
         }
     }//end of putAllMethod
     
@@ -214,7 +217,7 @@ public class PutAllDAckDUnitTest extends DistributedTestCase {
 //             }
             
             beforeCreateputAllcounter++;
-            getLogWriter().fine("*******BeforeCreate*****");
+            LogWriterUtils.getLogWriter().fine("*******BeforeCreate*****");
             beforeCreate = true;
         }
     }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/820cfd63/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 0aa77f0..c8f0d39 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
@@ -44,10 +44,14 @@ import com.gemstone.gemfire.cache.util.CacheWriterAdapter;
 import com.gemstone.gemfire.cache30.CacheSerializableRunnable;
 import com.gemstone.gemfire.distributed.DistributedSystem;
 import com.gemstone.gemfire.distributed.internal.locks.DLockGrantor;
+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.LogWriterUtils;
 import com.gemstone.gemfire.test.dunit.SerializableRunnable;
+import com.gemstone.gemfire.test.dunit.ThreadUtils;
 import com.gemstone.gemfire.test.dunit.VM;
 
 /**
@@ -85,17 +89,18 @@ 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");
+      LogWriterUtils.getLogWriter().fine("Cache created successfully");
     }
     
-    public void tearDown2(){
-        Host host = Host.getHost(0);
-        VM vm0 = host.getVM(0);
-        VM vm1 = host.getVM(1);
-        vm0.invoke(PutAllGlobalDUnitTest.class, "closeCache");
-        vm1.invoke(PutAllGlobalDUnitTest.class, "closeCache");
-        cache = null;
-        invokeInEveryVM(new SerializableRunnable() { public void run() { cache = null; } });
+    @Override
+    protected final void preTearDown() throws Exception {
+      Host host = Host.getHost(0);
+      VM vm0 = host.getVM(0);
+      VM vm1 = host.getVM(1);
+      vm0.invoke(PutAllGlobalDUnitTest.class, "closeCache");
+      vm1.invoke(PutAllGlobalDUnitTest.class, "closeCache");
+      cache = null;
+      Invoke.invokeInEveryVM(new SerializableRunnable() { public void run() { cache = null; } });
     }
     
     public static void createCacheForVM0(){
@@ -181,36 +186,36 @@ public class PutAllGlobalDUnitTest extends DistributedTestCase {
               long startTime = 0;
                 try{
                     Thread.sleep(500);
-                    getLogWriter().info("async2 proceeding with put operation");
+                    LogWriterUtils.getLogWriter().info("async2 proceeding with put operation");
                     startTime = System.currentTimeMillis();
                     region.put(new Integer(1),"mapVal");
-                    getLogWriter().info("async2 done with put operation");
+                    LogWriterUtils.getLogWriter().info("async2 done with put operation");
                     fail("Should have thrown TimeoutException");
                 }catch(TimeoutException Tx){
                    // Tx.printStackTrace();
-                    getLogWriter().info("PASS: As expected Caught TimeoutException ");
+                    LogWriterUtils.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 "
+                      LogWriterUtils.getLogWriter().warning("though this test passed, the put() timed out in "
                           + (System.currentTimeMillis() - startTime) +
                           " instead of the expected " + TIMEOUT_PERIOD + " milliseconds");
                     }
                 }
                 catch(Exception ex){
-                  fail("async2 threw unexpected exception", ex);
+                  Assert.fail("async2 threw unexpected exception", ex);
                     //ex.printStackTrace();
                 } 
             }
         });
         
-        DistributedTestCase.join(async2, 30 * 1000, getLogWriter());
+        ThreadUtils.join(async2, 30 * 1000);
         if (async2.exceptionOccurred()) {
-          DistributedTestCase.join(async1, 30 * 1000, getLogWriter());
-          fail("async2 failed", async2.getException());
+          ThreadUtils.join(async1, 30 * 1000);
+          Assert.fail("async2 failed", async2.getException());
         }
         
-        DistributedTestCase.join(async1, 30 * 1000, getLogWriter());
+        ThreadUtils.join(async1, 30 * 1000);
         if (async1.exceptionOccurred()) {
-          fail("async1 failed", async1.getException());
+          Assert.fail("async1 failed", async1.getException());
         }
         
     }//end of test case1
@@ -220,18 +225,18 @@ 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");
+        LogWriterUtils.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");
+            LogWriterUtils.getLogWriter().info("async1 done with putAll operation");
             
         }catch(Exception ex){
 //            ex.printStackTrace();
-            fail("Failed while region.putAll", ex);
+            Assert.fail("Failed while region.putAll", ex);
         }
     }//end of putAllMethod
     
@@ -276,13 +281,13 @@ public class PutAllGlobalDUnitTest extends DistributedTestCase {
     
     static class BeforeCreateCallback extends CacheWriterAdapter {
         public void beforeCreate(EntryEvent event){
-          getLogWriter().info("beforeCreate invoked for " + event.getKey());
+          LogWriterUtils.getLogWriter().info("beforeCreate invoked for " + event.getKey());
             try{
                 Thread.sleep(5000);
             }catch(InterruptedException ex) {
                 fail("interrupted");
             }
-          getLogWriter().info("beforeCreate done for " + event.getKey());
+          LogWriterUtils.getLogWriter().info("beforeCreate done for " + event.getKey());
             
         }
     }// end of BeforeCreateCallback

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/820cfd63/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 9afffe4..81b2a73 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,12 +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.LogWriterUtils;
 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
@@ -123,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;
@@ -149,12 +152,11 @@ public class RemoteTransactionDUnitTest extends CacheTestCase {
   }
   
   @Override
-  public void tearDown2() throws Exception {
+  protected final void preTearDownCacheTestCase() throws Exception {
     try {
-      invokeInEveryVM(verifyNoTxState);
+      Invoke.invokeInEveryVM(verifyNoTxState);
     } finally {
       closeAllCache();
-      super.tearDown2();
     }
   }
   
@@ -251,7 +253,7 @@ public class RemoteTransactionDUnitTest extends CacheTestCase {
     }
     public Object call() throws Exception {
       CacheTransactionManager mgr = getGemfireCache().getTxManager();
-      getLogWriter().fine("testTXPut starting tx");
+      LogWriterUtils.getLogWriter().fine("testTXPut starting tx");
       mgr.begin();
       Region<CustId, Customer> custRegion = getCache().getRegion(CUSTOMER);
       Region<OrderId, Order> orderRegion = getCache().getRegion(ORDER);
@@ -2537,7 +2539,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:");
+        LogWriterUtils.getLogWriter().info("SWAP:inside NestedTxFunc calling func2:");
         r.put(expectedCustId, expectedCustomer);
         FunctionService.onRegion(pr).withFilter(filter).execute(new NestedTxFunction2()).getResult();
         assertNotNull(getGemfireCache().getTxManager().getTXState());
@@ -3463,7 +3465,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", LogWriterUtils.getDUnitLogLevel());
         ClientCache cCache = getClientCache(ccf);
         ClientRegionFactory<Integer, String> crf = cCache
             .createClientRegionFactory(isEmpty ? ClientRegionShortcut.PROXY
@@ -3643,7 +3645,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;
       }
     });
@@ -3675,7 +3677,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", LogWriterUtils.getDUnitLogLevel());
         ClientCache cCache = getClientCache(ccf);
         ClientRegionFactory<Integer, String> crf = cCache
             .createClientRegionFactory(ClientRegionShortcut.CACHING_PROXY);
@@ -3718,7 +3720,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;
       }
     });
@@ -3764,7 +3766,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;
       }
     });
@@ -3914,7 +3916,7 @@ protected static class ClientListener extends CacheListenerAdapter {
       
       //Putting a string key causes this, the partition resolver
       //doesn't handle it.
-      addExpectedException("IllegalStateException");
+      IgnoredException.addIgnoredException("IllegalStateException");
       assertEquals(Status.STATUS_ACTIVE, tx.getStatus());
       final CountDownLatch latch = new CountDownLatch(1);
       Thread t = new Thread(new Runnable() {
@@ -3953,12 +3955,12 @@ protected static class ClientListener extends CacheListenerAdapter {
       private int count;
       @Override
       public void afterCreate(EntryEvent event) {
-        getLogWriter().info("afterCreate invoked for " + event);
+        LogWriterUtils.getLogWriter().info("afterCreate invoked for " + event);
         count++;
       }
       @Override
       public void afterUpdate(EntryEvent event) {
-        getLogWriter().info("afterUpdate invoked for " + event);
+        LogWriterUtils.getLogWriter().info("afterUpdate invoked for " + event);
         count++;
       }
     }
@@ -4102,11 +4104,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;
       }
     });

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/820cfd63/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/RemoveAllDAckDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/RemoveAllDAckDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/RemoveAllDAckDUnitTest.java
index 7ccdd6a..9184d94 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/RemoveAllDAckDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/RemoveAllDAckDUnitTest.java
@@ -36,8 +36,10 @@ import com.gemstone.gemfire.cache.Scope;
 import com.gemstone.gemfire.cache.util.CacheWriterAdapter;
 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.DistributedTestCase;
 import com.gemstone.gemfire.test.dunit.Host;
+import com.gemstone.gemfire.test.dunit.LogWriterUtils;
 import com.gemstone.gemfire.test.dunit.VM;
 
 /**
@@ -68,15 +70,16 @@ public class RemoveAllDAckDUnitTest extends DistributedTestCase {
       VM vm1 = host.getVM(1);
       vm0.invoke(RemoveAllDAckDUnitTest.class, "createCacheForVM0");
       vm1.invoke(RemoveAllDAckDUnitTest.class, "createCacheForVM1");
-      getLogWriter().fine("Cache created successfully");
+      LogWriterUtils.getLogWriter().fine("Cache created successfully");
     }
     
-    public void tearDown2(){
-        Host host = Host.getHost(0);
-        VM vm0 = host.getVM(0);
-        VM vm1 = host.getVM(1);
-        vm0.invoke(RemoveAllDAckDUnitTest.class, "closeCache");
-        vm1.invoke(RemoveAllDAckDUnitTest.class, "closeCache");
+    @Override
+    protected final void preTearDown() throws Exception {
+      Host host = Host.getHost(0);
+      VM vm0 = host.getVM(0);
+      VM vm1 = host.getVM(1);
+      vm0.invoke(RemoveAllDAckDUnitTest.class, "closeCache");
+      vm1.invoke(RemoveAllDAckDUnitTest.class, "closeCache");
     }
     
     public static void createCacheForVM0() throws Exception {
@@ -139,7 +142,7 @@ public class RemoveAllDAckDUnitTest extends DistributedTestCase {
                 obj = region.put(ob, str);
             }
         }catch(Exception ex){
-            fail("Failed while region.put", ex);
+            Assert.fail("Failed while region.put", ex);
         }
         return obj;
     }//end of putMethod
@@ -159,7 +162,7 @@ public class RemoveAllDAckDUnitTest extends DistributedTestCase {
             beforeDestroyRemoveAllcounter++;
             assertEquals(true, event.getOperation().isRemoveAll());
             assertEquals("removeAllCallback", event.getCallbackArgument());
-            getLogWriter().fine("*******BeforeDestroy*****");
+            LogWriterUtils.getLogWriter().fine("*******BeforeDestroy*****");
             beforeDestroy = true;
         }
     }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/820cfd63/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/RemoveDAckDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/RemoveDAckDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/RemoveDAckDUnitTest.java
index b32f4f5..4b92161 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/RemoveDAckDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/RemoveDAckDUnitTest.java
@@ -35,6 +35,7 @@ import com.gemstone.gemfire.cache30.CacheSerializableRunnable;
 import com.gemstone.gemfire.distributed.DistributedSystem;
 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.VM;
 
 /**
@@ -65,16 +66,16 @@ public class RemoveDAckDUnitTest extends DistributedTestCase {
       VM vm1 = host.getVM(1);
       vm0.invoke(RemoveDAckDUnitTest.class, "createCacheVM0");
       vm1.invoke(RemoveDAckDUnitTest.class, "createCacheVM1");
-      getLogWriter().fine("Cache created in successfully");
+      LogWriterUtils.getLogWriter().fine("Cache created in successfully");
     }
     
-    public void tearDown2(){
-        Host host = Host.getHost(0);
-        VM vm0 = host.getVM(0);
-        VM vm1 = host.getVM(1);
-        vm0.invoke(RemoveDAckDUnitTest.class, "closeCache");
-        vm1.invoke(RemoveDAckDUnitTest.class, "closeCache");
-        
+    @Override
+    protected final void preTearDown() throws Exception {
+      Host host = Host.getHost(0);
+      VM vm0 = host.getVM(0);
+      VM vm1 = host.getVM(1);
+      vm0.invoke(RemoveDAckDUnitTest.class, "closeCache");
+      vm1.invoke(RemoveDAckDUnitTest.class, "closeCache");
     }
     
     public static void createCacheVM0(){

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/820cfd63/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/RemoveGlobalDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/RemoveGlobalDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/RemoveGlobalDUnitTest.java
index 008d09b..5d6131c 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/RemoveGlobalDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/RemoveGlobalDUnitTest.java
@@ -39,7 +39,9 @@ import com.gemstone.gemfire.distributed.DistributedSystem;
 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.SerializableRunnable;
+import com.gemstone.gemfire.test.dunit.ThreadUtils;
 import com.gemstone.gemfire.test.dunit.VM;
 
 /**
@@ -71,12 +73,12 @@ public class RemoveGlobalDUnitTest extends DistributedTestCase {
       vm1.invoke(RemoveGlobalDUnitTest.class, "createCache");
     }
     
-    public void tearDown2(){
-        vm0.invoke(RemoveGlobalDUnitTest.class, "resetFlag");
-        vm1.invoke(RemoveGlobalDUnitTest.class, "resetFlag");
-        vm0.invoke(RemoveGlobalDUnitTest.class, "closeCache");
-        vm1.invoke(RemoveGlobalDUnitTest.class, "closeCache");
-        
+    @Override
+    protected final void preTearDown() throws Exception {
+      vm0.invoke(RemoveGlobalDUnitTest.class, "resetFlag");
+      vm1.invoke(RemoveGlobalDUnitTest.class, "resetFlag");
+      vm0.invoke(RemoveGlobalDUnitTest.class, "closeCache");
+      vm1.invoke(RemoveGlobalDUnitTest.class, "closeCache");
     }
     
     public static void resetFlag()
@@ -150,7 +152,7 @@ public class RemoveGlobalDUnitTest extends DistributedTestCase {
             }
         });
         
-        DistributedTestCase.join(async, 30 * 1000, getLogWriter());
+        ThreadUtils.join(async, 30 * 1000);
         if(async.exceptionOccurred())
           throw async.getException();
         
@@ -223,7 +225,7 @@ public class RemoveGlobalDUnitTest extends DistributedTestCase {
             }
         });
         
-        DistributedTestCase.join(async, 30 * 1000, getLogWriter());
+        ThreadUtils.join(async, 30 * 1000);
         if(async.exceptionOccurred())
           throw async.getException();
         
@@ -241,7 +243,7 @@ public class RemoveGlobalDUnitTest extends DistributedTestCase {
             }catch(InterruptedException ex){
                 fail("interrupted");
             }
-            getLogWriter().fine("quitingfromcachewriter");
+            LogWriterUtils.getLogWriter().fine("quitingfromcachewriter");
         }
     }///////////    
     

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/820cfd63/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/SimpleDiskRegionJUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/SimpleDiskRegionJUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/SimpleDiskRegionJUnitTest.java
index 10bdab3..2f14119 100755
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/SimpleDiskRegionJUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/SimpleDiskRegionJUnitTest.java
@@ -34,7 +34,7 @@ import org.junit.experimental.categories.Category;
 import static org.junit.Assert.*;
 
 import com.gemstone.gemfire.StatisticsFactory;
-import com.gemstone.gemfire.test.dunit.DistributedTestCase;
+import com.gemstone.gemfire.test.dunit.ThreadUtils;
 import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
 
 /**
@@ -363,11 +363,11 @@ public class SimpleDiskRegionJUnitTest extends DiskRegionTestingBase
     thread4.start();
     thread5.start();
 
-    DistributedTestCase.join(thread1, 30 * 1000, null);
-    DistributedTestCase.join(thread2, 30 * 1000, null);
-    DistributedTestCase.join(thread3, 30 * 1000, null);
-    DistributedTestCase.join(thread4, 30 * 1000, null);
-    DistributedTestCase.join(thread5, 30 * 1000, null);
+    ThreadUtils.join(thread1, 30 * 1000);
+    ThreadUtils.join(thread2, 30 * 1000);
+    ThreadUtils.join(thread3, 30 * 1000);
+    ThreadUtils.join(thread4, 30 * 1000);
+    ThreadUtils.join(thread5, 30 * 1000);
 
     if (keyIds.size() != 50000) {
       fail("Size not equal to 5000 as expected but is " + keyIds.size());

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/820cfd63/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/SingleHopStatsDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/SingleHopStatsDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/SingleHopStatsDUnitTest.java
index a6023c7..4b016a4 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/SingleHopStatsDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/SingleHopStatsDUnitTest.java
@@ -41,9 +41,15 @@ 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.DistributedTestUtils;
 import com.gemstone.gemfire.test.dunit.Host;
+import com.gemstone.gemfire.test.dunit.Invoke;
+import com.gemstone.gemfire.test.dunit.LogWriterUtils;
 import com.gemstone.gemfire.test.dunit.SerializableRunnable;
 import com.gemstone.gemfire.test.dunit.VM;
+import com.gemstone.gemfire.test.dunit.Wait;
+import com.gemstone.gemfire.test.dunit.WaitCriterion;
 
 public class SingleHopStatsDUnitTest extends CacheTestCase{
 
@@ -105,28 +111,29 @@ public class SingleHopStatsDUnitTest extends CacheTestCase{
     member3 = host.getVM(3);
   }
 
-  public void tearDown2() throws Exception {
+  @Override
+  protected final void preTearDownCacheTestCase() throws Exception {
+    // close the clients first
+    member0.invoke(SingleHopStatsDUnitTest.class, "closeCache");
+    member1.invoke(SingleHopStatsDUnitTest.class, "closeCache");
+    member2.invoke(SingleHopStatsDUnitTest.class, "closeCache");
+    member3.invoke(SingleHopStatsDUnitTest.class, "closeCache");
+    closeCache();
+  }
+  
+  @Override
+  protected final void postTearDownCacheTestCase() throws Exception {
     try {
-
-      // close the clients first
-      member0.invoke(SingleHopStatsDUnitTest.class, "closeCache");
-      member1.invoke(SingleHopStatsDUnitTest.class, "closeCache");
-      member2.invoke(SingleHopStatsDUnitTest.class, "closeCache");
-      member3.invoke(SingleHopStatsDUnitTest.class, "closeCache");
-      closeCache();
-
-      super.tearDown2();
-
       member0 = null;
       member1 = null;
       member2 = null;
       member3 = null;
       cache = null;
-      invokeInEveryVM(new SerializableRunnable() { public void run() { cache = null; } });
+      Invoke.invokeInEveryVM(new SerializableRunnable() { public void run() { cache = null; } });
 
     }
     finally {
-      unregisterAllDataSerializersFromAllVms();
+      DistributedTestUtils.unregisterAllDataSerializersFromAllVms();
     }
   }
 
@@ -239,7 +246,7 @@ public class SingleHopStatsDUnitTest extends CacheTestCase{
       server.start();
     }
     catch (IOException e) {
-      fail("Failed to start server ", e);
+      Assert.fail("Failed to start server ", e);
     }
 
     if (colocation.equals("No_Colocation")) {
@@ -249,7 +256,7 @@ public class SingleHopStatsDUnitTest extends CacheTestCase{
         attr.setDataPolicy(DataPolicy.REPLICATE);
         region = cache.createRegion(Region_Name, attr.create());
         assertNotNull(region);
-        getLogWriter().info(
+        LogWriterUtils.getLogWriter().info(
             "Distributed Region " + Region_Name + " created Successfully :"
                 + region.toString());
       }else{
@@ -260,7 +267,7 @@ public class SingleHopStatsDUnitTest extends CacheTestCase{
       attr.setPartitionAttributes(paf.create());
       region = cache.createRegion(Region_Name, attr.create());
       assertNotNull(region);
-      getLogWriter().info(
+      LogWriterUtils.getLogWriter().info(
           "Partitioned Region " + Region_Name + " created Successfully :"
               + region.toString());
       }
@@ -274,7 +281,7 @@ public class SingleHopStatsDUnitTest extends CacheTestCase{
       attr.setPartitionAttributes(paf.create());
       customerRegion = cache.createRegion("CUSTOMER", attr.create());
       assertNotNull(customerRegion);
-      getLogWriter().info(
+      LogWriterUtils.getLogWriter().info(
           "Partitioned Region CUSTOMER created Successfully :"
               + customerRegion.toString());
 
@@ -286,7 +293,7 @@ public class SingleHopStatsDUnitTest extends CacheTestCase{
       attr.setPartitionAttributes(paf.create());
       orderRegion = cache.createRegion("ORDER", attr.create());
       assertNotNull(orderRegion);
-      getLogWriter().info(
+      LogWriterUtils.getLogWriter().info(
           "Partitioned Region ORDER created Successfully :"
               + orderRegion.toString());
 
@@ -298,7 +305,7 @@ public class SingleHopStatsDUnitTest extends CacheTestCase{
       attr.setPartitionAttributes(paf.create());
       shipmentRegion = cache.createRegion("SHIPMENT", attr.create());
       assertNotNull(shipmentRegion);
-      getLogWriter().info(
+      LogWriterUtils.getLogWriter().info(
           "Partitioned Region SHIPMENT created Successfully :"
               + shipmentRegion.toString());
     }
@@ -313,7 +320,7 @@ public class SingleHopStatsDUnitTest extends CacheTestCase{
       RegionAttributes attrs = factory.create();
       region = cache.createRegion(Region_Name, attrs);
       assertNotNull(region);
-      getLogWriter().info(
+      LogWriterUtils.getLogWriter().info(
           "Region " + Region_Name + " created Successfully :" + region.toString());
     }
     else {
@@ -322,7 +329,7 @@ public class SingleHopStatsDUnitTest extends CacheTestCase{
       RegionAttributes attrs = factory.create();
       customerRegion = cache.createRegion("CUSTOMER", attrs);
       assertNotNull(customerRegion);
-      getLogWriter().info(
+      LogWriterUtils.getLogWriter().info(
           "Partitioned Region CUSTOMER created Successfully :"
               + customerRegion.toString());
 
@@ -331,7 +338,7 @@ public class SingleHopStatsDUnitTest extends CacheTestCase{
       attrs = factory.create();
       orderRegion = cache.createRegion("ORDER", attrs);
       assertNotNull(orderRegion);
-      getLogWriter().info(
+      LogWriterUtils.getLogWriter().info(
           "Partitioned Region ORDER created Successfully :"
               + orderRegion.toString());
 
@@ -340,7 +347,7 @@ public class SingleHopStatsDUnitTest extends CacheTestCase{
       attrs = factory.create();
       shipmentRegion = cache.createRegion("SHIPMENT", attrs);
       assertNotNull(shipmentRegion);
-      getLogWriter().info(
+      LogWriterUtils.getLogWriter().info(
           "Partitioned Region SHIPMENT created Successfully :"
               + shipmentRegion.toString());
     }
@@ -368,7 +375,7 @@ public class SingleHopStatsDUnitTest extends CacheTestCase{
         cms = ((GemFireCacheImpl)cache).getClientMetadataService();
         // since PR metadata is fetched in a background executor thread
         // we need to wait for it to arrive for a bit
-        waitForCriterion(new WaitCriterion(){
+        Wait.waitForCriterion(new WaitCriterion(){
           public boolean done() {
             return regionMetaData.size() == 1;
           }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/820cfd63/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/SizingFlagDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/SizingFlagDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/SizingFlagDUnitTest.java
index 19170f2..90360ef 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/SizingFlagDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/SizingFlagDUnitTest.java
@@ -46,6 +46,7 @@ import com.gemstone.gemfire.distributed.DistributedMember;
 import com.gemstone.gemfire.distributed.DistributedSystem;
 import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
 import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
+import com.gemstone.gemfire.test.dunit.Assert;
 import com.gemstone.gemfire.test.dunit.Host;
 import com.gemstone.gemfire.test.dunit.SerializableCallable;
 import com.gemstone.gemfire.test.dunit.SerializableRunnable;
@@ -358,7 +359,7 @@ public class SizingFlagDUnitTest extends CacheTestCase {
         try {
           region.getAttributesMutator().addCacheListener(new TestCacheListener());
         } catch (Exception e) {
-          fail("couldn't create index", e);
+          Assert.fail("couldn't create index", e);
         }
       }
     });

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/820cfd63/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/SystemFailureDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/SystemFailureDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/SystemFailureDUnitTest.java
index e3858fb..e47892e 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/SystemFailureDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/SystemFailureDUnitTest.java
@@ -56,7 +56,7 @@ public class SystemFailureDUnitTest extends DistributedCacheTestCase {
   /////////  Public test methods
 
   public void testNullFailure() {
-    getLogWriter().info("TODO: this test needs to use VM#bounce.");
+    com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("TODO: this test needs to use VM#bounce.");
     try {
       SystemFailure.initiateFailure(null);
       fail("Null failure set allowed");
@@ -308,7 +308,7 @@ public class SystemFailureDUnitTest extends DistributedCacheTestCase {
   
   static private final Runnable listener1 = new Runnable() {
     public void run() {
-      getLogWriter().info("Inside of preListener1");
+      com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("Inside of preListener1");
       listenerCount.addAndGet(1);
     }
   };
@@ -398,7 +398,7 @@ public class SystemFailureDUnitTest extends DistributedCacheTestCase {
   
   protected static Boolean verifyConnected() {
     if (SystemFailure.getFailure() != null) {
-      fail("System failure present!", SystemFailure.getFailure());
+      com.gemstone.gemfire.test.dunit.Assert.fail("System failure present!", SystemFailure.getFailure());
       return Boolean.FALSE;
     }
     GemFireCacheImpl gfc = (GemFireCacheImpl)cache;
@@ -495,7 +495,7 @@ public class SystemFailureDUnitTest extends DistributedCacheTestCase {
   protected static void message(String s) {
     System.out.println(s);
     System.err.println(s);
-    getLogWriter().info(s);
+    com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info(s);
     cache.getLogger().info(s);
   }
   
@@ -545,7 +545,7 @@ public class SystemFailureDUnitTest extends DistributedCacheTestCase {
       }
     }
     public void afterCreate(EntryEvent event) {
-      getLogWriter().info("Invoking afterCreate on listener; name=" +
+      com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("Invoking afterCreate on listener; name=" +
                           event.getKey());
       forceOutOfMemory();
     }
@@ -590,7 +590,7 @@ public class SystemFailureDUnitTest extends DistributedCacheTestCase {
         }
       }
       public void afterCreate(EntryEvent event) {
-        getLogWriter().info("Invoking afterCreate on listener; name=" +
+        com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("Invoking afterCreate on listener; name=" +
                             event.getKey());
         forceOutOfMemory();
       }
@@ -660,7 +660,7 @@ public class SystemFailureDUnitTest extends DistributedCacheTestCase {
     }
 
     public void afterCreate(EntryEvent event) {
-      getLogWriter().info("Invoking afterCreate on listener; name=" +
+      com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("Invoking afterCreate on listener; name=" +
                           event.getKey());
       forceLowMemory();
     }
@@ -676,7 +676,7 @@ public class SystemFailureDUnitTest extends DistributedCacheTestCase {
     }
     
     public void afterCreate(EntryEvent event) {
-      getLogWriter().info("Invoking afterCreate on listener; name=" +
+      com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("Invoking afterCreate on listener; name=" +
                           event.getKey());
       forceInternalError();
     }
@@ -692,7 +692,7 @@ public class SystemFailureDUnitTest extends DistributedCacheTestCase {
     }
     
     public void afterCreate(EntryEvent event) {
-      getLogWriter().info("Invoking afterCreate on listener; name=" +
+      com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("Invoking afterCreate on listener; name=" +
                           event.getKey());
       forceInternalError();
     }
@@ -704,7 +704,7 @@ public class SystemFailureDUnitTest extends DistributedCacheTestCase {
     }
     
     public void afterCreate(EntryEvent event) {
-      getLogWriter().info("Invoking afterCreate on listener; name=" +
+      com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("Invoking afterCreate on listener; name=" +
                           event.getKey());
       forceError();
     }
@@ -756,7 +756,7 @@ public class SystemFailureDUnitTest extends DistributedCacheTestCase {
   }
   
   protected void doCreateEntry(String name) {
-    LogWriter log = getLogWriter();
+    LogWriter log = com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter();
     log.info(
         "<ExpectedException action=add>" +
         "dunit.RMIException"

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/820cfd63/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/TXReservationMgrJUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/TXReservationMgrJUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/TXReservationMgrJUnitTest.java
index 663ef61..b1d1e64 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/TXReservationMgrJUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/TXReservationMgrJUnitTest.java
@@ -30,7 +30,7 @@ import com.gemstone.gemfire.cache.CacheFactory;
 import com.gemstone.gemfire.cache.CommitConflictException;
 import com.gemstone.gemfire.cache.Scope;
 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;
 
 @Category(IntegrationTest.class)
@@ -124,7 +124,7 @@ public class TXReservationMgrJUnitTest {
       threads[i].start();
     }
     for (int i=0; i < THREAD_COUNT; i++) {
-      DistributedTestCase.join(threads[i], 60 * 1000, null); // increased from 30 to 60 for parallel junit runs
+      ThreadUtils.join(threads[i], 60 * 1000); // increased from 30 to 60 for parallel junit runs
     }
     int invalidCount = 0;
     for (int i=0; i < KEY_COUNT; i++) {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/820cfd63/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/TransactionsWithDeltaDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/TransactionsWithDeltaDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/TransactionsWithDeltaDUnitTest.java
index 06a8f09..fdb7ada 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/TransactionsWithDeltaDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/TransactionsWithDeltaDUnitTest.java
@@ -44,6 +44,7 @@ import com.gemstone.gemfire.internal.cache.execute.data.CustId;
 import com.gemstone.gemfire.internal.cache.execute.data.Order;
 import com.gemstone.gemfire.internal.cache.execute.data.OrderId;
 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.VM;
 
@@ -114,7 +115,7 @@ public class TransactionsWithDeltaDUnitTest extends CacheTestCase {
         ClientCacheFactory ccf = new ClientCacheFactory();
         ccf.addPoolServer("localhost"/*getServerHostName(Host.getHost(0))*/, port);
         ccf.setPoolSubscriptionEnabled(false);
-        ccf.set("log-level", getDUnitLogLevel());
+        ccf.set("log-level", LogWriterUtils.getDUnitLogLevel());
         ClientCache cCache = getClientCache(ccf);
         ClientRegionFactory<Integer, String> crf = cCache
             .createClientRegionFactory(isEmpty ? ClientRegionShortcut.PROXY
@@ -330,7 +331,7 @@ public class TransactionsWithDeltaDUnitTest extends CacheTestCase {
         pr.put(cust1, new Customer(1, "name1"));
         Iterator<CustId> it = pr.keySet().iterator();
         while (it.hasNext()) {
-          getLogWriter().info("SWAP:iterator1:"+pr.get(it.next()));
+          LogWriterUtils.getLogWriter().info("SWAP:iterator1:"+pr.get(it.next()));
         }
         Customer c = pr.get(cust1);
         assertNotNull(c);
@@ -348,10 +349,10 @@ public class TransactionsWithDeltaDUnitTest extends CacheTestCase {
         mgr.begin();
         Customer c = pr.get(cust1);
         c.setName("updatedName");
-        getLogWriter().info("SWAP:doingPut");
+        LogWriterUtils.getLogWriter().info("SWAP:doingPut");
         pr.put(cust1, c);
-        getLogWriter().info("SWAP:getfromtx:"+pr.get(cust1));
-        getLogWriter().info("SWAP:doingCommit");
+        LogWriterUtils.getLogWriter().info("SWAP:getfromtx:"+pr.get(cust1));
+        LogWriterUtils.getLogWriter().info("SWAP:doingCommit");
         assertEquals("updatedName", pr.get(cust1).getName());
         TXStateProxy tx = mgr.internalSuspend();
         assertEquals("name1", pr.get(cust1).getName());

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/820cfd63/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/control/RebalanceOperationDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/control/RebalanceOperationDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/control/RebalanceOperationDUnitTest.java
index 1ce05c7..6c2cc98 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/control/RebalanceOperationDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/control/RebalanceOperationDUnitTest.java
@@ -73,11 +73,16 @@ import com.gemstone.gemfire.internal.cache.PartitionedRegionDataStore;
 import com.gemstone.gemfire.internal.cache.control.InternalResourceManager.ResourceObserverAdapter;
 import com.gemstone.gemfire.internal.cache.partitioned.BucketCountLoadProbe;
 import com.gemstone.gemfire.internal.cache.partitioned.LoadProbe;
+import com.gemstone.gemfire.test.dunit.Assert;
 import com.gemstone.gemfire.test.dunit.AsyncInvocation;
 import com.gemstone.gemfire.test.dunit.Host;
+import com.gemstone.gemfire.test.dunit.Invoke;
+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.VM;
+import com.gemstone.gemfire.test.dunit.Wait;
+import com.gemstone.gemfire.test.dunit.WaitCriterion;
 
 /**
  * @author dsmith
@@ -88,12 +93,9 @@ public class RebalanceOperationDUnitTest extends CacheTestCase {
 
   private static final long MAX_WAIT = 60;
   
-  
-  
   @Override
-  public void tearDown2() throws Exception {
-    super.tearDown2();
-    invokeInEveryVM(new SerializableRunnable() {
+  protected final void postTearDownCacheTestCase() throws Exception {
+    Invoke.invokeInEveryVM(new SerializableRunnable() {
       public void run() {
         InternalResourceManager.setResourceObserver(null);
         System.clearProperty("gemfire.resource.manager.threads");
@@ -328,7 +330,7 @@ public class RebalanceOperationDUnitTest extends CacheTestCase {
   }
   
   public void enforceIp(final boolean simulate) {
-    invokeInEveryVM(new SerializableRunnable() {
+    Invoke.invokeInEveryVM(new SerializableRunnable() {
       public void run() {
         Properties props = new Properties();
         props.setProperty(DistributionConfig.ENFORCE_UNIQUE_HOST_NAME, "true");
@@ -426,7 +428,7 @@ public class RebalanceOperationDUnitTest extends CacheTestCase {
 
     } finally {
       disconnectFromDS();
-      invokeInEveryVM(new SerializableRunnable() {
+      Invoke.invokeInEveryVM(new SerializableRunnable() {
         public void run() {
           disconnectFromDS(); 
         }
@@ -559,7 +561,7 @@ public class RebalanceOperationDUnitTest extends CacheTestCase {
     
     } finally {
       disconnectFromDS();
-      invokeInEveryVM(new SerializableRunnable() {
+      Invoke.invokeInEveryVM(new SerializableRunnable() {
         public void run() {
           //clear the redundancy zone setting
           disconnectFromDS(); 
@@ -610,7 +612,7 @@ public class RebalanceOperationDUnitTest extends CacheTestCase {
         try {
           barrier.await(MAX_WAIT, TimeUnit.SECONDS);
         } catch (Exception e) {
-          fail("failed waiting for barrier", e);
+          Assert.fail("failed waiting for barrier", e);
         }
         observerCalled = true;
       } else {
@@ -764,7 +766,7 @@ public class RebalanceOperationDUnitTest extends CacheTestCase {
     checkBucketCount(vm2, "region2", 6);
     } finally {
       disconnectFromDS();
-      invokeInEveryVM(new SerializableRunnable() {
+      Invoke.invokeInEveryVM(new SerializableRunnable() {
         public void run() {
           //clear the redundancy zone setting
           disconnectFromDS(); 
@@ -819,9 +821,9 @@ public class RebalanceOperationDUnitTest extends CacheTestCase {
           .simulate()
           .getResults(MAX_WAIT, TimeUnit.SECONDS);
       } catch (InterruptedException e) {
-        fail("Interrupted waiting on rebalance", e);
+        Assert.fail("Interrupted waiting on rebalance", e);
       } catch (TimeoutException e) {
-        fail("Timeout waiting on rebalance", e);
+        Assert.fail("Timeout waiting on rebalance", e);
       }
     } else {
       try {
@@ -831,9 +833,9 @@ public class RebalanceOperationDUnitTest extends CacheTestCase {
         .start()
         .getResults(MAX_WAIT, TimeUnit.SECONDS);
       } catch (InterruptedException e) {
-        fail("Interrupted waiting on rebalance", e);
+        Assert.fail("Interrupted waiting on rebalance", e);
       } catch (TimeoutException e) {
-        fail("Timeout waiting on rebalance", e);
+        Assert.fail("Timeout waiting on rebalance", e);
       }
     }
     assertEquals(Collections.emptySet(), manager.getRebalanceOperations());
@@ -1098,7 +1100,7 @@ public class RebalanceOperationDUnitTest extends CacheTestCase {
   }
   
   public void testRecoverRedundancyParallelAsyncEventQueueSimulation() throws NoSuchFieldException, SecurityException {
-    invokeInEveryVM(new SerializableRunnable() {
+    Invoke.invokeInEveryVM(new SerializableRunnable() {
 
       @Override
       public void run () {
@@ -1867,7 +1869,7 @@ public class RebalanceOperationDUnitTest extends CacheTestCase {
           assertEquals(12, details.getCreatedBucketCount());
           assertEquals(1,details.getActualRedundantCopies());
           assertEquals(0,details.getLowRedundancyBucketCount());
-          getLogWriter().info("details=" + details.getPartitionMemberInfo());
+          LogWriterUtils.getLogWriter().info("details=" + details.getPartitionMemberInfo());
           long afterSize = 0;
           for(PartitionMemberInfo memberDetails: details.getPartitionMemberInfo()) {
             assertEquals(8, memberDetails.getBucketCount());
@@ -2009,7 +2011,7 @@ public class RebalanceOperationDUnitTest extends CacheTestCase {
         assertEquals(12, details.getCreatedBucketCount());
         assertEquals(1,details.getActualRedundantCopies());
         assertEquals(0,details.getLowRedundancyBucketCount());
-        getLogWriter().info("details=" + details.getPartitionMemberInfo());
+        LogWriterUtils.getLogWriter().info("details=" + details.getPartitionMemberInfo());
         long afterSize = 0;
         for(PartitionMemberInfo memberDetails: details.getPartitionMemberInfo()) {
           assertEquals(8, memberDetails.getBucketCount());
@@ -2078,7 +2080,7 @@ public class RebalanceOperationDUnitTest extends CacheTestCase {
           assertEquals(12, details.getCreatedBucketCount());
           assertEquals(1,details.getActualRedundantCopies());
           assertEquals(0,details.getLowRedundancyBucketCount());
-          getLogWriter().info("details=" + details.getPartitionMemberInfo());
+          LogWriterUtils.getLogWriter().info("details=" + details.getPartitionMemberInfo());
           long afterSize = 0;
           for(PartitionMemberInfo memberDetails: details.getPartitionMemberInfo()) {
             assertEquals(6, memberDetails.getBucketCount());
@@ -2193,7 +2195,7 @@ public class RebalanceOperationDUnitTest extends CacheTestCase {
         assertEquals(12, details.getCreatedBucketCount());
         assertEquals(1,details.getActualRedundantCopies());
         assertEquals(0,details.getLowRedundancyBucketCount());
-        getLogWriter().info("details=" + details.getPartitionMemberInfo());
+        LogWriterUtils.getLogWriter().info("details=" + details.getPartitionMemberInfo());
         long afterSize = 0;
         for(PartitionMemberInfo memberDetails: details.getPartitionMemberInfo()) {
           assertEquals(8, memberDetails.getBucketCount());
@@ -2503,7 +2505,7 @@ public class RebalanceOperationDUnitTest extends CacheTestCase {
     }
     cacheWriter.release();
    
-    getLogWriter().info("starting wait for rebalance.  Will wait for " + MAX_WAIT + " seconds");
+    LogWriterUtils.getLogWriter().info("starting wait for rebalance.  Will wait for " + MAX_WAIT + " seconds");
     RebalanceResults results = rebalance.getResults(MAX_WAIT, TimeUnit.SECONDS);
     assertEquals(2, results.getTotalBucketCreatesCompleted());
     assertEquals(1, results.getTotalPrimaryTransfersCompleted());
@@ -2744,7 +2746,7 @@ public class RebalanceOperationDUnitTest extends CacheTestCase {
     // the rebalance op may think that the other member doesn't have buckets, then
     // ask it to create them and get a negative reply because it actually does
     // have the buckets, causing the test to fail
-    pause(10000);  
+    Wait.pause(10000);  
     
     //Try to rebalance again. This shouldn't do anything, because
     //we already recovered redundancy earlier.
@@ -3164,7 +3166,7 @@ public class RebalanceOperationDUnitTest extends CacheTestCase {
         Cache cache = getCache();
         final PartitionedRegion region = (PartitionedRegion) cache.getRegion(regionName);
         
-        waitForCriterion(new WaitCriterion() {
+        Wait.waitForCriterion(new WaitCriterion() {
           
           @Override
           public boolean done() {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/820cfd63/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/diskPerf/DiskRegionOverflowAsyncRollingOpLogJUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/diskPerf/DiskRegionOverflowAsyncRollingOpLogJUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/diskPerf/DiskRegionOverflowAsyncRollingOpLogJUnitTest.java
index 10a7df7..5f0a249 100755
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/diskPerf/DiskRegionOverflowAsyncRollingOpLogJUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/diskPerf/DiskRegionOverflowAsyncRollingOpLogJUnitTest.java
@@ -29,8 +29,8 @@ import com.gemstone.gemfire.*;
 import com.gemstone.gemfire.cache.*;
 import com.gemstone.gemfire.internal.cache.lru.LRUStatistics;
 import com.gemstone.gemfire.internal.cache.*;
-import com.gemstone.gemfire.test.dunit.DistributedTestCase;
-import com.gemstone.gemfire.test.dunit.DistributedTestCase.WaitCriterion;
+import com.gemstone.gemfire.test.dunit.Wait;
+import com.gemstone.gemfire.test.dunit.WaitCriterion;
 import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
 
 /**
@@ -168,7 +168,7 @@ public class DiskRegionOverflowAsyncRollingOpLogJUnitTest extends
             return null;
           }
         };
-      DistributedTestCase.waitForCriterion(ev, 30 * 1000, 200, true);
+      Wait.waitForCriterion(ev, 30 * 1000, 200, true);
     }
 
     //Now get 0-9999 entries

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/820cfd63/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/diskPerf/DiskRegionOverflowSyncRollingOpLogJUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/diskPerf/DiskRegionOverflowSyncRollingOpLogJUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/diskPerf/DiskRegionOverflowSyncRollingOpLogJUnitTest.java
index df09e2c..d94cf73 100755
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/diskPerf/DiskRegionOverflowSyncRollingOpLogJUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/diskPerf/DiskRegionOverflowSyncRollingOpLogJUnitTest.java
@@ -30,8 +30,8 @@ import static org.junit.Assert.*;
 import com.gemstone.gemfire.*;
 import com.gemstone.gemfire.cache.*;
 import com.gemstone.gemfire.internal.cache.lru.LRUStatistics;
-import com.gemstone.gemfire.test.dunit.DistributedTestCase;
-import com.gemstone.gemfire.test.dunit.DistributedTestCase.WaitCriterion;
+import com.gemstone.gemfire.test.dunit.Wait;
+import com.gemstone.gemfire.test.dunit.WaitCriterion;
 import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
 
 /**
@@ -163,7 +163,7 @@ public class DiskRegionOverflowSyncRollingOpLogJUnitTest extends
             return null;
           }
         };
-      DistributedTestCase.waitForCriterion(ev, 30 * 1000, 200, true);
+      Wait.waitForCriterion(ev, 30 * 1000, 200, true);
     }
     
     //Now get 0-9999 entries

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/820cfd63/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/diskPerf/MultiThreadedOplogPerJUnitPerformanceTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/diskPerf/MultiThreadedOplogPerJUnitPerformanceTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/diskPerf/MultiThreadedOplogPerJUnitPerformanceTest.java
index 719a9b2..5e2da16 100755
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/diskPerf/MultiThreadedOplogPerJUnitPerformanceTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/diskPerf/MultiThreadedOplogPerJUnitPerformanceTest.java
@@ -34,7 +34,7 @@ import com.gemstone.gemfire.cache.Region;
 import com.gemstone.gemfire.cache.Scope;
 import com.gemstone.gemfire.distributed.DistributedSystem;
 import com.gemstone.gemfire.internal.cache.DiskStoreFactoryImpl;
-import com.gemstone.gemfire.test.dunit.DistributedTestCase;
+import com.gemstone.gemfire.test.dunit.ThreadUtils;
 import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
 
 @Category(IntegrationTest.class)
@@ -142,7 +142,7 @@ public class MultiThreadedOplogPerJUnitPerformanceTest
     }
 
     for (int i = 0; i < numberOfThreads; i++) {
-      DistributedTestCase.join(threads[i], 30 * 1000, null);
+      ThreadUtils.join(threads[i], 30 * 1000);
     }
 
     long totalPuts = ((long)numberOfIterations * numberOfKeysPerThread * numberOfThreads);

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/820cfd63/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/Bug51193DUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/Bug51193DUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/Bug51193DUnitTest.java
index 63fdf64..74f5e7f 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/Bug51193DUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/Bug51193DUnitTest.java
@@ -42,6 +42,7 @@ import com.gemstone.gemfire.internal.cache.tier.ClientHandShake;
 import com.gemstone.gemfire.internal.cache.tier.sockets.AcceptorImpl;
 import com.gemstone.gemfire.internal.cache.tier.sockets.ServerConnection;
 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.VM;
 
@@ -69,7 +70,8 @@ public class Bug51193DUnitTest extends DistributedTestCase {
     
   }
 
-  public void tearDown2() {
+  @Override
+  protected final void preTearDown() throws Exception {
     closeCache();
     server0.invoke(Bug51193DUnitTest.class, "closeCache");
     client0.invoke(Bug51193DUnitTest.class, "closeCache");
@@ -117,7 +119,7 @@ public class Bug51193DUnitTest extends DistributedTestCase {
   public static Integer createServerCache(Boolean createPR)
       throws Exception {
     Properties props = new Properties();
-    props.setProperty("locators", "localhost["+getDUnitLocatorPort()+"]");
+    props.setProperty("locators", "localhost["+DistributedTestUtils.getDUnitLocatorPort()+"]");
 
     Bug51193DUnitTest test = new Bug51193DUnitTest("Bug51193DUnitTest");
     DistributedSystem ds = test.getSystem(props);


Mime
View raw message