geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kl...@apache.org
Subject [33/44] incubator-geode git commit: Refactor dunit
Date Tue, 02 Feb 2016 20:21:40 GMT
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/76e324b5/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/SlowRecDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/SlowRecDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/SlowRecDUnitTest.java
index 4d5cac2..71625db 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/SlowRecDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/SlowRecDUnitTest.java
@@ -39,10 +39,13 @@ import com.gemstone.gemfire.cache.util.CacheListenerAdapter;
 import com.gemstone.gemfire.distributed.internal.DM;
 import com.gemstone.gemfire.distributed.internal.DMStats;
 import com.gemstone.gemfire.internal.tcp.Connection;
-import com.gemstone.gemfire.test.dunit.DistributedTestCase;
 import com.gemstone.gemfire.test.dunit.Host;
+import com.gemstone.gemfire.test.dunit.LogWriterSupport;
 import com.gemstone.gemfire.test.dunit.SerializableRunnable;
+import com.gemstone.gemfire.test.dunit.Threads;
 import com.gemstone.gemfire.test.dunit.VM;
+import com.gemstone.gemfire.test.dunit.Wait;
+import com.gemstone.gemfire.test.dunit.WaitCriterion;
 import com.gemstone.gemfire.test.junit.categories.DistributedTest;
 
 /**
@@ -164,7 +167,7 @@ public class SlowRecDUnitTest extends CacheTestCase {
                 return "waiting for callback";
               }
             };
-            DistributedTestCase.waitForCriterion(ev, 50 * 1000, 200, true);
+            Wait.waitForCriterion(ev, 50 * 1000, 200, true);
             assertEquals(lcb, lastCallback);
           }
           if (lastValue == null) {
@@ -177,7 +180,7 @@ public class SlowRecDUnitTest extends CacheTestCase {
                 return "waiting for key to become null";
               }
             };
-            DistributedTestCase.waitForCriterion(ev, 50 * 1000, 200, true);
+            Wait.waitForCriterion(ev, 50 * 1000, 200, true);
             assertEquals(null, r1.getEntry("key"));
           } else if (CHECK_INVALID.equals(lastValue)) {
             // should be invalid
@@ -195,7 +198,7 @@ public class SlowRecDUnitTest extends CacheTestCase {
                   return "waiting for invalidate";
                 }
               };
-              DistributedTestCase.waitForCriterion(ev, 50 * 1000, 200, true);
+              Wait.waitForCriterion(ev, 50 * 1000, 200, true);
 //              assertNotNull(re);
 //              assertEquals(null, value);
             }
@@ -234,7 +237,7 @@ public class SlowRecDUnitTest extends CacheTestCase {
         return "Waiting for async threads to disappear";
       }
     };
-    DistributedTestCase.waitForCriterion(ev, 10 * 1000, 200, true);
+    Wait.waitForCriterion(ev, 10 * 1000, 200, true);
   }
   
   private void forceQueuing(final Region r) throws CacheException {
@@ -251,7 +254,7 @@ public class SlowRecDUnitTest extends CacheTestCase {
         return "waiting for flushes to start";
       }
     };
-    DistributedTestCase.waitForCriterion(ev, 2 * 1000, 200, true);
+    Wait.waitForCriterion(ev, 2 * 1000, 200, true);
   }
   
   /**
@@ -294,7 +297,7 @@ public class SlowRecDUnitTest extends CacheTestCase {
           dequeuedMsgs = stats.getAsyncDequeuedMsgs();
           curQueuedMsgs = queuedMsgs - dequeuedMsgs;
         }
-        getLogWriter().info("After " + count + " " + " puts slowrec mode kicked in by queuing " + queuedMsgs + " for a total size of " + queueSize);
+        LogWriterSupport.getLogWriter().info("After " + count + " " + " puts slowrec mode kicked in by queuing " + queuedMsgs + " for a total size of " + queueSize);
       } finally {
         forceQueueFlush();
       }
@@ -307,9 +310,9 @@ public class SlowRecDUnitTest extends CacheTestCase {
         }
       };
       final long start = System.currentTimeMillis();
-      DistributedTestCase.waitForCriterion(ev, 30 * 1000, 200, true);
+      Wait.waitForCriterion(ev, 30 * 1000, 200, true);
       final long finish = System.currentTimeMillis();
-      getLogWriter().info("After " + (finish - start) + " ms async msgs where flushed. A total of " + stats.getAsyncDequeuedMsgs() + " were flushed. lastValue=" + lastValue);
+      LogWriterSupport.getLogWriter().info("After " + (finish - start) + " ms async msgs where flushed. A total of " + stats.getAsyncDequeuedMsgs() + " were flushed. lastValue=" + lastValue);
     
       checkLastValueInOtherVm(lastValue, null);
     }
@@ -392,7 +395,7 @@ public class SlowRecDUnitTest extends CacheTestCase {
 //                           + "  dequeuedMsgs=" + dequeuedMsgs
 //                           + " conflatedMsgs=" + conflatedMsgs);
     final long finish = System.currentTimeMillis();
-    getLogWriter().info("After " + (finish - start) + " ms async msgs where flushed. A total of " + (stats.getAsyncDequeuedMsgs()-intialDeQueuedMsgs) + " were flushed. Leaving a queue size of " + stats.getAsyncQueueSize() + ". The lastValue was " + lastValue);
+    LogWriterSupport.getLogWriter().info("After " + (finish - start) + " ms async msgs where flushed. A total of " + (stats.getAsyncDequeuedMsgs()-intialDeQueuedMsgs) + " were flushed. Leaving a queue size of " + stats.getAsyncQueueSize() + ". The lastValue was " + lastValue);
     
     checkLastValueInOtherVm(lastValue, null);
   }
@@ -436,8 +439,8 @@ public class SlowRecDUnitTest extends CacheTestCase {
       // give threads a chance to get queued
       try {Thread.sleep(100);} catch (InterruptedException ignore) {fail("interrupted");}
       forceQueueFlush();
-      DistributedTestCase.join(t, 2 * 1000, getLogWriter());
-      DistributedTestCase.join(t2, 2 * 1000, getLogWriter());
+      Threads.join(t, 2 * 1000, LogWriterSupport.getLogWriter());
+      Threads.join(t2, 2 * 1000, LogWriterSupport.getLogWriter());
       long endQueuedMsgs = stats.getAsyncQueuedMsgs();
       long endConflatedMsgs = stats.getAsyncConflatedMsgs();
       assertEquals(startConflatedMsgs, endConflatedMsgs);
@@ -480,7 +483,7 @@ public class SlowRecDUnitTest extends CacheTestCase {
 
     // now make sure update+destroy does not conflate
     final Object key = "key";      
-    getLogWriter().info("[testConflationSequence] about to force queuing");
+    LogWriterSupport.getLogWriter().info("[testConflationSequence] about to force queuing");
     forceQueuing(r);
 
     int count = 0;
@@ -492,7 +495,7 @@ public class SlowRecDUnitTest extends CacheTestCase {
 //    long dequeuedMsgs = stats.getAsyncDequeuedMsgs();
     int endCount = count+60;
 
-    getLogWriter().info("[testConflationSequence] about to build up queue");
+    LogWriterSupport.getLogWriter().info("[testConflationSequence] about to build up queue");
     long begin = System.currentTimeMillis();
     while (count < endCount) {
       value = "count=" + count;
@@ -515,14 +518,14 @@ public class SlowRecDUnitTest extends CacheTestCase {
     checkLastValueInOtherVm(lastValue, mylcb);
 
     // now make sure create+update+localDestroy does not conflate
-    getLogWriter().info("[testConflationSequence] force queuing create-update-destroy");
+    LogWriterSupport.getLogWriter().info("[testConflationSequence] force queuing create-update-destroy");
     forceQueuing(r);
     initialConflatedMsgs = stats.getAsyncConflatedMsgs();
 //    initialDequeuedMsgs = stats.getAsyncDequeuedMsgs();
 //    dequeuedMsgs = stats.getAsyncDequeuedMsgs();
     endCount = count + 40;
     
-    getLogWriter().info("[testConflationSequence] create-update-destroy");
+    LogWriterSupport.getLogWriter().info("[testConflationSequence] create-update-destroy");
     begin = System.currentTimeMillis();
     while (count < endCount) {
       value = "count=" + count;
@@ -542,7 +545,7 @@ public class SlowRecDUnitTest extends CacheTestCase {
     checkLastValueInOtherVm(lastValue, null);
 
     // now make sure update+invalidate does not conflate
-    getLogWriter().info("[testConflationSequence] force queuing update-invalidate");
+    LogWriterSupport.getLogWriter().info("[testConflationSequence] force queuing update-invalidate");
     forceQueuing(r);
     initialConflatedMsgs = stats.getAsyncConflatedMsgs();
 //    initialDequeuedMsgs = stats.getAsyncDequeuedMsgs();
@@ -553,7 +556,7 @@ public class SlowRecDUnitTest extends CacheTestCase {
 //    dequeuedMsgs = stats.getAsyncDequeuedMsgs();
     endCount = count + 40;
 
-    getLogWriter().info("[testConflationSequence] update-invalidate");
+    LogWriterSupport.getLogWriter().info("[testConflationSequence] update-invalidate");
     begin = System.currentTimeMillis();
     while (count < endCount) {
       value = "count=" + count;
@@ -568,14 +571,14 @@ public class SlowRecDUnitTest extends CacheTestCase {
     }
     assertEquals(initialConflatedMsgs, stats.getAsyncConflatedMsgs());
     forceQueueFlush();
-    getLogWriter().info("[testConflationSequence] assert other vm");
+    LogWriterSupport.getLogWriter().info("[testConflationSequence] assert other vm");
     checkLastValueInOtherVm(lastValue, null);
 
     r.destroy(key);
 
     // now make sure updates to a conflating region are conflated even while
     // updates to a non-conflating are not.
-    getLogWriter().info("[testConflationSequence] conflate & no-conflate regions");
+    LogWriterSupport.getLogWriter().info("[testConflationSequence] conflate & no-conflate regions");
     forceQueuing(r);
     final int initialAsyncSocketWrites = stats.getAsyncSocketWrites();
 //    initialDequeuedMsgs = stats.getAsyncDequeuedMsgs();
@@ -605,7 +608,7 @@ public class SlowRecDUnitTest extends CacheTestCase {
     endCount = count + 80;
 
     begin = System.currentTimeMillis();
-    getLogWriter().info("[testConflationSequence:DEBUG] count=" + count
+    LogWriterSupport.getLogWriter().info("[testConflationSequence:DEBUG] count=" + count
                         + " queuedMsgs=" + stats.getAsyncQueuedMsgs()
                         + " conflatedMsgs=" + stats.getAsyncConflatedMsgs()
                         + " dequeuedMsgs=" + stats.getAsyncDequeuedMsgs()
@@ -636,7 +639,7 @@ public class SlowRecDUnitTest extends CacheTestCase {
     }
 
     forceQueueFlush();
-    getLogWriter().info("[testConflationSequence] assert other vm");
+    LogWriterSupport.getLogWriter().info("[testConflationSequence] assert other vm");
     checkLastValueInOtherVm(lastValue, null);
   }
   /**
@@ -687,7 +690,7 @@ public class SlowRecDUnitTest extends CacheTestCase {
           fail("should have exceeded max-queue-size by now");
         }
       }
-      getLogWriter().info("After " + count + " " + VALUE_SIZE + " byte puts slowrec mode kicked in but the queue filled when its size reached " + queueSize + " with " + queuedMsgs + " msgs");
+      LogWriterSupport.getLogWriter().info("After " + count + " " + VALUE_SIZE + " byte puts slowrec mode kicked in but the queue filled when its size reached " + queueSize + " with " + queuedMsgs + " msgs");
       // make sure we lost a connection to vm0
       WaitCriterion ev = new WaitCriterion() {
         public boolean done() {
@@ -698,7 +701,7 @@ public class SlowRecDUnitTest extends CacheTestCase {
           return "waiting for connection loss";
         }
       };
-      DistributedTestCase.waitForCriterion(ev, 30 * 1000, 200, true);
+      Wait.waitForCriterion(ev, 30 * 1000, 200, true);
     }
     finally {
       forceQueueFlush();
@@ -759,7 +762,7 @@ public class SlowRecDUnitTest extends CacheTestCase {
           fail("should have exceeded async-queue-timeout by now");
         }
       }
-      getLogWriter().info("After " + count + " " + VALUE_SIZE + " byte puts slowrec mode kicked in but the queue filled when its size reached " + queueSize + " with " + queuedMsgs + " msgs");
+      LogWriterSupport.getLogWriter().info("After " + count + " " + VALUE_SIZE + " byte puts slowrec mode kicked in but the queue filled when its size reached " + queueSize + " with " + queuedMsgs + " msgs");
       // make sure we lost a connection to vm0
       WaitCriterion ev = new WaitCriterion() {
         public boolean done() {
@@ -772,7 +775,7 @@ public class SlowRecDUnitTest extends CacheTestCase {
           return "waiting for departure";
         }
       };
-      DistributedTestCase.waitForCriterion(ev, 2 * 1000, 200, true);
+      Wait.waitForCriterion(ev, 2 * 1000, 200, true);
     }
     finally {
       getCache().getLogger().info(removeExpected);
@@ -817,7 +820,7 @@ public class SlowRecDUnitTest extends CacheTestCase {
     public final Object CONTROL_LOCK = new Object();
     
     public void afterCreate(EntryEvent event) {
-      getLogWriter().info(event.getRegion().getName() + " afterCreate " + event.getKey());
+      LogWriterSupport.getLogWriter().info(event.getRegion().getName() + " afterCreate " + event.getKey());
       synchronized(this.CONTROL_LOCK) {
         if (event.getCallbackArgument() != null) {
           this.callbackArguments.add(
@@ -829,7 +832,7 @@ public class SlowRecDUnitTest extends CacheTestCase {
       processEvent(event);
     }
     public void afterUpdate(EntryEvent event) {
-      getLogWriter().info(event.getRegion().getName() + " afterUpdate " + event.getKey());
+      LogWriterSupport.getLogWriter().info(event.getRegion().getName() + " afterUpdate " + event.getKey());
       synchronized(this.CONTROL_LOCK) {
         if (event.getCallbackArgument() != null) {
           this.callbackArguments.add(
@@ -883,14 +886,14 @@ public class SlowRecDUnitTest extends CacheTestCase {
     }
     private void processSleep(EntryEvent event) {
       int sleepMs = ((Integer)event.getNewValue()).intValue();
-      getLogWriter().info("[processSleep] sleeping for " + sleepMs);
+      LogWriterSupport.getLogWriter().info("[processSleep] sleeping for " + sleepMs);
       try {
         Thread.sleep(sleepMs);
       } catch (InterruptedException ignore) {fail("interrupted");}
     }
     private void processWait(EntryEvent event) {
       int sleepMs = ((Integer)event.getNewValue()).intValue();
-      getLogWriter().info("[processWait] waiting for " + sleepMs);
+      LogWriterSupport.getLogWriter().info("[processWait] waiting for " + sleepMs);
       synchronized(this.CONTROL_LOCK) {
         try {
           this.CONTROL_LOCK.wait(sleepMs);
@@ -898,7 +901,7 @@ public class SlowRecDUnitTest extends CacheTestCase {
       }
     }
     private void processDisconnect(EntryEvent event) {
-      getLogWriter().info("[processDisconnect] disconnecting");
+      LogWriterSupport.getLogWriter().info("[processDisconnect] disconnecting");
       disconnectFromDS();
     }
   };
@@ -919,7 +922,7 @@ public class SlowRecDUnitTest extends CacheTestCase {
       throw e;
     }
     catch (Throwable t) {
-      getLogWriter().error("Encountered exception: ", t);
+      LogWriterSupport.getLogWriter().error("Encountered exception: ", t);
       throw t;
     }
     finally {
@@ -988,11 +991,11 @@ public class SlowRecDUnitTest extends CacheTestCase {
     });
     
     // put vm0 cache listener into wait
-    getLogWriter().info("[doTestMultipleRegionConflation] about to put vm0 into wait");
+    LogWriterSupport.getLogWriter().info("[doTestMultipleRegionConflation] about to put vm0 into wait");
     r1.put(KEY_WAIT, new Integer(millisToWait));
 
     // build up queue size
-    getLogWriter().info("[doTestMultipleRegionConflation] building up queue size...");
+    LogWriterSupport.getLogWriter().info("[doTestMultipleRegionConflation] building up queue size...");
     final Object key = "key";
     final int socketBufferSize = getSystem().getConfig().getSocketBufferSize();
     final int VALUE_SIZE = socketBufferSize*3;
@@ -1005,7 +1008,7 @@ public class SlowRecDUnitTest extends CacheTestCase {
       r1.put(key, value);
     }
     
-    getLogWriter().info("[doTestMultipleRegionConflation] After " + 
+    LogWriterSupport.getLogWriter().info("[doTestMultipleRegionConflation] After " + 
       count + " puts of size " + VALUE_SIZE + 
       " slowrec mode kicked in with queue size=" + stats.getAsyncQueueSize());
 
@@ -1063,7 +1066,7 @@ public class SlowRecDUnitTest extends CacheTestCase {
         CALLBACK_DESTROY, CALLBACK_CREATE, CALLBACK_UPDATE }; 
 
     // send notify to vm0
-    getLogWriter().info("[doTestMultipleRegionConflation] wake up vm0");
+    LogWriterSupport.getLogWriter().info("[doTestMultipleRegionConflation] wake up vm0");
     getOtherVm().invoke(new SerializableRunnable("Wake up other vm") {
       public void run() {
         synchronized(doTestMultipleRegionConflation_R1_Listener.CONTROL_LOCK) {
@@ -1073,7 +1076,7 @@ public class SlowRecDUnitTest extends CacheTestCase {
     });
     
     // wait for queue to be flushed
-    getLogWriter().info("[doTestMultipleRegionConflation] wait for vm0");
+    LogWriterSupport.getLogWriter().info("[doTestMultipleRegionConflation] wait for vm0");
     getOtherVm().invoke(new SerializableRunnable("Wait for other vm") {
       public void run() {
         try {
@@ -1092,12 +1095,12 @@ public class SlowRecDUnitTest extends CacheTestCase {
     });
     
     // assert values on both listeners
-    getLogWriter().info("[doTestMultipleRegionConflation] assert callback arguments");
+    LogWriterSupport.getLogWriter().info("[doTestMultipleRegionConflation] assert callback arguments");
     getOtherVm().invoke(new SerializableRunnable("Assert callback arguments") {
       public void run() {
         synchronized(doTestMultipleRegionConflation_R1_Listener.CONTROL_LOCK) {
-          getLogWriter().info("doTestMultipleRegionConflation_R1_Listener.callbackArguments=" + doTestMultipleRegionConflation_R1_Listener.callbackArguments);
-          getLogWriter().info("doTestMultipleRegionConflation_R1_Listener.callbackTypes=" + doTestMultipleRegionConflation_R1_Listener.callbackTypes);
+          LogWriterSupport.getLogWriter().info("doTestMultipleRegionConflation_R1_Listener.callbackArguments=" + doTestMultipleRegionConflation_R1_Listener.callbackArguments);
+          LogWriterSupport.getLogWriter().info("doTestMultipleRegionConflation_R1_Listener.callbackTypes=" + doTestMultipleRegionConflation_R1_Listener.callbackTypes);
           assertEquals(doTestMultipleRegionConflation_R1_Listener.callbackArguments.size(),
                        doTestMultipleRegionConflation_R1_Listener.callbackTypes.size());
           int i = 0;
@@ -1111,8 +1114,8 @@ public class SlowRecDUnitTest extends CacheTestCase {
           }
         }
         synchronized(doTestMultipleRegionConflation_R2_Listener.CONTROL_LOCK) {
-          getLogWriter().info("doTestMultipleRegionConflation_R2_Listener.callbackArguments=" + doTestMultipleRegionConflation_R2_Listener.callbackArguments);
-          getLogWriter().info("doTestMultipleRegionConflation_R2_Listener.callbackTypes=" + doTestMultipleRegionConflation_R2_Listener.callbackTypes);
+          LogWriterSupport.getLogWriter().info("doTestMultipleRegionConflation_R2_Listener.callbackArguments=" + doTestMultipleRegionConflation_R2_Listener.callbackArguments);
+          LogWriterSupport.getLogWriter().info("doTestMultipleRegionConflation_R2_Listener.callbackTypes=" + doTestMultipleRegionConflation_R2_Listener.callbackTypes);
           assertEquals(doTestMultipleRegionConflation_R2_Listener.callbackArguments.size(),
                        doTestMultipleRegionConflation_R2_Listener.callbackTypes.size());
           int i = 0;
@@ -1141,7 +1144,7 @@ public class SlowRecDUnitTest extends CacheTestCase {
       throw e;
     }
     catch (Throwable t) {
-      getLogWriter().error("Encountered exception: ", t);
+      LogWriterSupport.getLogWriter().error("Encountered exception: ", t);
       throw t;
     }
     finally {
@@ -1187,13 +1190,13 @@ public class SlowRecDUnitTest extends CacheTestCase {
     });
 
     // put vm0 cache listener into wait
-    getLogWriter().info("[testDisconnectCleanup] about to put vm0 into wait");
+    LogWriterSupport.getLogWriter().info("[testDisconnectCleanup] about to put vm0 into wait");
     int millisToWait = 1000 * 60 * 5; // 5 minutes
     r.put(KEY_WAIT, new Integer(millisToWait));
     r.put(KEY_DISCONNECT, KEY_DISCONNECT);
 
     // build up queue size
-    getLogWriter().info("[testDisconnectCleanup] building up queue size...");
+    LogWriterSupport.getLogWriter().info("[testDisconnectCleanup] building up queue size...");
     final Object key = "key";
     final int socketBufferSize = getSystem().getConfig().getSocketBufferSize();
     final int VALUE_SIZE = socketBufferSize*3;
@@ -1208,7 +1211,7 @@ public class SlowRecDUnitTest extends CacheTestCase {
       assertFalse(System.currentTimeMillis() >= abortMillis);
     }
     
-    getLogWriter().info("[testDisconnectCleanup] After " + 
+    LogWriterSupport.getLogWriter().info("[testDisconnectCleanup] After " + 
       count + " puts of size " + VALUE_SIZE + 
       " slowrec mode kicked in with queue size=" + stats.getAsyncQueueSize());
 
@@ -1221,11 +1224,11 @@ public class SlowRecDUnitTest extends CacheTestCase {
     assertTrue(stats.getAsyncQueuedMsgs() >= 10);
 
     while (stats.getAsyncQueues() < 1) {
-      pause(100);
+      Wait.pause(100);
       assertFalse(System.currentTimeMillis() >= abortMillis);
     }
     
-    getLogWriter().info("[testDisconnectCleanup] After " + 
+    LogWriterSupport.getLogWriter().info("[testDisconnectCleanup] After " + 
       count + " puts of size " + VALUE_SIZE + " queue size has reached " + 
       stats.getAsyncQueueSize() + " bytes and number of queues is " + 
       stats.getAsyncQueues() + ".");
@@ -1237,7 +1240,7 @@ public class SlowRecDUnitTest extends CacheTestCase {
     assertTrue(dm.getOtherDistributionManagerIds().size() > others.size());
     
     // send notify to vm0
-    getLogWriter().info("[testDisconnectCleanup] wake up vm0");
+    LogWriterSupport.getLogWriter().info("[testDisconnectCleanup] wake up vm0");
     getOtherVm().invoke(new SerializableRunnable("Wake up other vm") {
       public void run() {
         synchronized(doTestDisconnectCleanup_Listener.CONTROL_LOCK) {
@@ -1247,7 +1250,7 @@ public class SlowRecDUnitTest extends CacheTestCase {
     });
     
     // make sure we lost a connection to vm0
-    getLogWriter().info("[testDisconnectCleanup] wait for vm0 to disconnect");
+    LogWriterSupport.getLogWriter().info("[testDisconnectCleanup] wait for vm0 to disconnect");
     WaitCriterion ev = new WaitCriterion() {
       public boolean done() {
         return dm.getOtherDistributionManagerIds().size() <= others.size();
@@ -1256,11 +1259,11 @@ public class SlowRecDUnitTest extends CacheTestCase {
         return "waiting for disconnect";
       }
     };
-    DistributedTestCase.waitForCriterion(ev, 2 * 1000, 200, true);
+    Wait.waitForCriterion(ev, 2 * 1000, 200, true);
     assertEquals(others, dm.getOtherDistributionManagerIds());
     
     // check free memory... perform wait loop with System.gc
-    getLogWriter().info("[testDisconnectCleanup] wait for queue cleanup");
+    LogWriterSupport.getLogWriter().info("[testDisconnectCleanup] wait for queue cleanup");
     ev = new WaitCriterion() {
       public boolean done() {
         if (stats.getAsyncQueues() <= initialQueues) {
@@ -1273,7 +1276,7 @@ public class SlowRecDUnitTest extends CacheTestCase {
         return "waiting for queue cleanup";
       }
     };
-    DistributedTestCase.waitForCriterion(ev, 2 * 1000, 200, true);
+    Wait.waitForCriterion(ev, 2 * 1000, 200, true);
 //    getLogWriter().info("[testDisconnectCleanup] initialQueues=" + 
 //      initialQueues + " asyncQueues=" + stats.getAsyncQueues());
     assertEquals(initialQueues, stats.getAsyncQueues());
@@ -1295,7 +1298,7 @@ public class SlowRecDUnitTest extends CacheTestCase {
       throw e;
     }
     catch (Throwable t) {
-      getLogWriter().error("Encountered exception: ", t);
+      LogWriterSupport.getLogWriter().error("Encountered exception: ", t);
       throw t;
     }
     finally {
@@ -1343,12 +1346,12 @@ public class SlowRecDUnitTest extends CacheTestCase {
     });
 
     // put vm0 cache listener into wait
-    getLogWriter().info("[testPartialMessage] about to put vm0 into wait");
+    LogWriterSupport.getLogWriter().info("[testPartialMessage] about to put vm0 into wait");
     final int millisToWait = 1000 * 60 * 5; // 5 minutes
     r.put(KEY_WAIT, new Integer(millisToWait));
 
     // build up queue size
-    getLogWriter().info("[testPartialMessage] building up queue size...");
+    LogWriterSupport.getLogWriter().info("[testPartialMessage] building up queue size...");
     final Object key = "key";
     final int socketBufferSize = getSystem().getConfig().getSocketBufferSize();
     final int VALUE_SIZE = socketBufferSize*3;
@@ -1364,11 +1367,11 @@ public class SlowRecDUnitTest extends CacheTestCase {
     final int partialId = count;
     assertEquals(0, stats.getAsyncConflatedMsgs());
     
-    getLogWriter().info("[testPartialMessage] After " + 
+    LogWriterSupport.getLogWriter().info("[testPartialMessage] After " + 
       count + " puts of size " + VALUE_SIZE + 
       " slowrec mode kicked in with queue size=" + stats.getAsyncQueueSize());
 
-    pause(2000);
+    Wait.pause(2000);
       
     // conflate 10 times
     while (stats.getAsyncConflatedMsgs() < 10) {
@@ -1393,7 +1396,7 @@ public class SlowRecDUnitTest extends CacheTestCase {
     final int[] expectedArgs = { partialId, conflateId };
 
     // send notify to vm0
-    getLogWriter().info("[testPartialMessage] wake up vm0");
+    LogWriterSupport.getLogWriter().info("[testPartialMessage] wake up vm0");
     getOtherVm().invoke(new SerializableRunnable("Wake up other vm") {
       public void run() {
         synchronized(doTestPartialMessage_Listener.CONTROL_LOCK) {
@@ -1403,7 +1406,7 @@ public class SlowRecDUnitTest extends CacheTestCase {
     });
     
     // wait for queue to be flushed
-    getLogWriter().info("[testPartialMessage] wait for vm0");
+    LogWriterSupport.getLogWriter().info("[testPartialMessage] wait for vm0");
     getOtherVm().invoke(new SerializableRunnable("Wait for other vm") {
       public void run() {
         try {
@@ -1429,11 +1432,11 @@ public class SlowRecDUnitTest extends CacheTestCase {
     });
     
     // assert values on both listeners
-    getLogWriter().info("[testPartialMessage] assert callback arguments");
+    LogWriterSupport.getLogWriter().info("[testPartialMessage] assert callback arguments");
     getOtherVm().invoke(new SerializableRunnable("Assert callback arguments") {
       public void run() {
         synchronized(doTestPartialMessage_Listener.CONTROL_LOCK) {
-          getLogWriter().info("[testPartialMessage] " +
+          LogWriterSupport.getLogWriter().info("[testPartialMessage] " +
               "doTestPartialMessage_Listener.callbackArguments=" + 
               doTestPartialMessage_Listener.callbackArguments);
               

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/76e324b5/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/TXDistributedDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/TXDistributedDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/TXDistributedDUnitTest.java
index bea9f33..1e400c2 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/TXDistributedDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/TXDistributedDUnitTest.java
@@ -82,10 +82,14 @@ import com.gemstone.gemfire.internal.cache.locks.TXLockServiceImpl;
 import com.gemstone.gemfire.test.dunit.Assert;
 import com.gemstone.gemfire.test.dunit.DistributedTestCase;
 import com.gemstone.gemfire.test.dunit.IgnoredException;
+import com.gemstone.gemfire.test.dunit.Invoke;
+import com.gemstone.gemfire.test.dunit.LogWriterSupport;
 import com.gemstone.gemfire.test.dunit.Host;
 import com.gemstone.gemfire.test.dunit.SerializableCallable;
 import com.gemstone.gemfire.test.dunit.SerializableRunnable;
 import com.gemstone.gemfire.test.dunit.VM;
+import com.gemstone.gemfire.test.dunit.Wait;
+import com.gemstone.gemfire.test.dunit.WaitCriterion;
 
 public class TXDistributedDUnitTest extends CacheTestCase {
   public TXDistributedDUnitTest(String name) {
@@ -109,13 +113,13 @@ public class TXDistributedDUnitTest extends CacheTestCase {
    * Test a remote grantor
    */
   public void testRemoteGrantor() throws Exception {
-    IgnoredException.addExpectedException("killing members ds");
+    IgnoredException.addIgnoredException("killing members ds");
     final CacheTransactionManager txMgr = this.getCache().getCacheTransactionManager();
     final String rgnName = getUniqueName();
     Region rgn = getCache().createRegion(rgnName, getRegionAttributes());
     rgn.create("key", null);
 
-    invokeInEveryVM(new SerializableRunnable("testRemoteGrantor: initial configuration") {
+    Invoke.invokeInEveryVM(new SerializableRunnable("testRemoteGrantor: initial configuration") {
         public void run() {
           try {
             Region rgn1 = getCache().createRegion(rgnName, getRegionAttributes());
@@ -194,7 +198,7 @@ public class TXDistributedDUnitTest extends CacheTestCase {
           }
         }
       };
-    invokeInEveryVM(remoteComm);
+    Invoke.invokeInEveryVM(remoteComm);
     // vm1.invoke(remoteComm);
     // vm2.invoke(remoteComm);
 
@@ -463,7 +467,7 @@ public class TXDistributedDUnitTest extends CacheTestCase {
       });
     Region rgn = getCache().createRegion(rgnName, factory.create());
     
-    invokeInEveryVM(new SerializableRunnable("testDACKLoadedMessage: intial configuration") {
+    Invoke.invokeInEveryVM(new SerializableRunnable("testDACKLoadedMessage: intial configuration") {
         public void run() {
           try {
             AttributesFactory factory2 = new AttributesFactory();
@@ -484,7 +488,7 @@ public class TXDistributedDUnitTest extends CacheTestCase {
     txMgr.commit();
     assertEquals("val1", rgn.getEntry("key1").getValue());
 
-    invokeInEveryVM(new SerializableRunnable("testDACKLoadedMessage: confirm standard case") {
+    Invoke.invokeInEveryVM(new SerializableRunnable("testDACKLoadedMessage: confirm standard case") {
         public void run() {
           Region rgn1 = getCache().getRegion(rgnName);
           assertEquals("val1", rgn1.getEntry("key1").getValue());
@@ -497,7 +501,7 @@ public class TXDistributedDUnitTest extends CacheTestCase {
     txMgr.commit();
     assertEquals("val2", rgn.getEntry("key2").getValue());
     
-    invokeInEveryVM(new SerializableRunnable("testDACKLoadedMessage: confirm standard case") {
+    Invoke.invokeInEveryVM(new SerializableRunnable("testDACKLoadedMessage: confirm standard case") {
         public void run() {
           Region rgn1 = getCache().getRegion(rgnName);
           assertEquals("val2", rgn1.getEntry("key2").getValue());
@@ -510,7 +514,7 @@ public class TXDistributedDUnitTest extends CacheTestCase {
     rgn.get("key4", new Integer(4));
     txMgr.commit();
 
-    invokeInEveryVM(new SerializableRunnable("testDACKLoadedMessage: confirm standard case") {
+    Invoke.invokeInEveryVM(new SerializableRunnable("testDACKLoadedMessage: confirm standard case") {
         public void run() {
           Region rgn1 = getCache().getRegion(rgnName);
           assertEquals("val3", rgn1.getEntry("key3").getValue());
@@ -523,12 +527,12 @@ public class TXDistributedDUnitTest extends CacheTestCase {
   @Override
   public Properties getDistributedSystemProperties() {
     Properties p = super.getDistributedSystemProperties();
-    p.put("log-level", getDUnitLogLevel());
+    p.put("log-level", LogWriterSupport.getDUnitLogLevel());
     return p;
   }
 
   public void testHighAvailabilityFeatures() throws Exception {
-    IgnoredException.addExpectedException("DistributedSystemDisconnectedException");
+    IgnoredException.addIgnoredException("DistributedSystemDisconnectedException");
 //    final CacheTransactionManager txMgr = this.getCache().getCacheTransactionManager();
 //    final TXManagerImpl txMgrImpl = (TXManagerImpl) txMgr;
     final String rgnName = getUniqueName();
@@ -536,7 +540,7 @@ public class TXDistributedDUnitTest extends CacheTestCase {
     factory.setScope(Scope.DISTRIBUTED_ACK);
     factory.setEarlyAck(false);
     Region rgn = getCache().createRegion(rgnName, factory.create());
-    invokeInEveryVM(new SerializableRunnable("testHighAvailabilityFeatures: intial region configuration") {
+    Invoke.invokeInEveryVM(new SerializableRunnable("testHighAvailabilityFeatures: intial region configuration") {
         public void run() {
           try {
             AttributesFactory factory2 = new AttributesFactory();
@@ -628,7 +632,7 @@ public class TXDistributedDUnitTest extends CacheTestCase {
           assertEquals("val1_0", re.getValue());
         }
       };
-    invokeInEveryVM(noChangeValidator);
+    Invoke.invokeInEveryVM(noChangeValidator);
 
     // Test that there is no commit after sending to all recipients
     // but prior to sending the "commit process" message
@@ -669,7 +673,7 @@ public class TXDistributedDUnitTest extends CacheTestCase {
         }
       });
     // 3. verify on all VMs, including the origin, that the transaction was not committed
-    invokeInEveryVM(noChangeValidator);
+    Invoke.invokeInEveryVM(noChangeValidator);
 
     // Test commit success upon a single commit process message received.
     originVM.invoke(new SerializableRunnable("Flakey DuringIndividualCommitProcess Transaction") {
@@ -750,7 +754,7 @@ public class TXDistributedDUnitTest extends CacheTestCase {
           }
         }
       };
-    invokeInEveryVM(nonSoloChangeValidator1);
+    Invoke.invokeInEveryVM(nonSoloChangeValidator1);
 
     // Verify successful solo region commit after duringIndividualSend
     // (same as afterIndividualSend).
@@ -845,7 +849,7 @@ public class TXDistributedDUnitTest extends CacheTestCase {
     originVM.invoke(soloRegionCommitValidator1);
     soloRegionVM.invoke(soloRegionCommitValidator1);
     // verify no change in nonSolo region, re-establish region in originVM
-    invokeInEveryVM(nonSoloChangeValidator1);
+    Invoke.invokeInEveryVM(nonSoloChangeValidator1);
 
     // Verify no commit for failed send (afterIndividualSend) for solo
     // Region combined with non-solo Region
@@ -895,7 +899,7 @@ public class TXDistributedDUnitTest extends CacheTestCase {
     // Origin and Solo Region VM should be the same as last validation
     originVM.invoke(soloRegionCommitValidator1);
     soloRegionVM.invoke(soloRegionCommitValidator1);
-    invokeInEveryVM(nonSoloChangeValidator1);
+    Invoke.invokeInEveryVM(nonSoloChangeValidator1);
 
     // Verify commit after sending a single
     // (duringIndividualCommitProcess) commit process for solo Region
@@ -998,7 +1002,7 @@ public class TXDistributedDUnitTest extends CacheTestCase {
           assertEquals("val1_5", re.getValue());
         }
       };
-    invokeInEveryVM(nonSoloChangeValidator2);
+    Invoke.invokeInEveryVM(nonSoloChangeValidator2);
   }
   
   /** 
@@ -1413,7 +1417,7 @@ public class TXDistributedDUnitTest extends CacheTestCase {
     };
     IgnoredException ee = null;
     try {
-      ee = IgnoredException.addExpectedException(DiskAccessException.class.getName() + "|" +
+      ee = IgnoredException.addIgnoredException(DiskAccessException.class.getName() + "|" +
           CommitIncompleteException.class.getName() + "|" +
           CommitReplyException.class.getName());
       origin.invoke(doTransaction);
@@ -1444,7 +1448,7 @@ public class TXDistributedDUnitTest extends CacheTestCase {
       @Override
       public void run2() {
         final Cache c = getCache();
-        waitForCriterion(new WaitCriterion() {
+        Wait.waitForCriterion(new WaitCriterion() {
           @Override
           public boolean done() {
             return c.getRegion(rgnName1) == null;
@@ -1510,7 +1514,7 @@ public class TXDistributedDUnitTest extends CacheTestCase {
     };
     origin.invoke(assertNoContent);
     } finally {
-      invokeInEveryVM(new SerializableCallable() {
+      Invoke.invokeInEveryVM(new SerializableCallable() {
         @Override
         public Object call() throws Exception {
           TXManagerImpl.ALLOW_PERSISTENT_TRANSACTIONS = false;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/76e324b5/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/TXOrderDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/TXOrderDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/TXOrderDUnitTest.java
index 6f42483..ce7e9d4 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/TXOrderDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/TXOrderDUnitTest.java
@@ -52,6 +52,7 @@ import com.gemstone.gemfire.cache.util.TransactionListenerAdapter;
 import com.gemstone.gemfire.distributed.DistributedMember;
 import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
 import com.gemstone.gemfire.test.dunit.Host;
+import com.gemstone.gemfire.test.dunit.LogWriterSupport;
 import com.gemstone.gemfire.test.dunit.SerializableCallable;
 import com.gemstone.gemfire.test.dunit.VM;
 
@@ -186,7 +187,7 @@ public class TXOrderDUnitTest extends CacheTestCase {
         af.addCacheListener(cl1);
         CacheLoader cl = new CacheLoader() {
           public Object load(LoaderHelper helper) throws CacheLoaderException {
-            getLogWriter().info("Loading value:"+helper.getKey()+"_value");
+            LogWriterSupport.getLogWriter().info("Loading value:"+helper.getKey()+"_value");
             return helper.getKey()+"_value";
           }
           public void close() {
@@ -205,7 +206,7 @@ public class TXOrderDUnitTest extends CacheTestCase {
         af.setScope(Scope.DISTRIBUTED_ACK);
         CacheListener cl1 = new CacheListenerAdapter() {
           public void afterCreate(EntryEvent e) {
-            getLogWriter().info("op:"+e.getOperation().toString());
+            LogWriterSupport.getLogWriter().info("op:"+e.getOperation().toString());
             assertTrue(!e.getOperation().isLocalLoad());
           }
         };

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/76e324b5/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/TXRestrictionsDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/TXRestrictionsDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/TXRestrictionsDUnitTest.java
index 6810675..d1ec415 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/TXRestrictionsDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/TXRestrictionsDUnitTest.java
@@ -38,6 +38,7 @@ import com.gemstone.gemfire.cache.RegionAttributes;
 import com.gemstone.gemfire.cache.Scope;
 import com.gemstone.gemfire.internal.OSProcess;
 import com.gemstone.gemfire.test.dunit.Assert;
+import com.gemstone.gemfire.test.dunit.Invoke;
 import com.gemstone.gemfire.test.dunit.SerializableRunnable;
 
 public class TXRestrictionsDUnitTest extends CacheTestCase {
@@ -73,7 +74,7 @@ public class TXRestrictionsDUnitTest extends CacheTestCase {
     final CacheTransactionManager txMgr = this.getCache().getCacheTransactionManager();
     final String misConfigRegionName = getUniqueName();
     Region misConfigRgn = getCache().createRegion(misConfigRegionName, getDiskRegionAttributes());
-    invokeInEveryVM(new SerializableRunnable("testPersistentRestriction: Illegal Region Configuration") {
+    Invoke.invokeInEveryVM(new SerializableRunnable("testPersistentRestriction: Illegal Region Configuration") {
         public void run() {
           try {
             getCache().createRegion(misConfigRegionName, getDiskRegionAttributes());

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/76e324b5/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/TestCacheCallback.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/TestCacheCallback.java b/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/TestCacheCallback.java
index 118ebca..b28089a 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/TestCacheCallback.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/TestCacheCallback.java
@@ -17,8 +17,8 @@
 package com.gemstone.gemfire.cache30;
 
 import com.gemstone.gemfire.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;
 
 /**
  * An abstract superclass of implementation of GemFire cache callbacks
@@ -69,7 +69,7 @@ public abstract class TestCacheCallback implements CacheCallback {
           return "listener was never invoked";
         }
       };
-      DistributedTestCase.waitForCriterion(ev, timeoutMs, interval, true);
+      Wait.waitForCriterion(ev, timeoutMs, interval, true);
     }
     return wasInvoked();
   }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/76e324b5/gemfire-core/src/test/java/com/gemstone/gemfire/distributed/DistributedSystemDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/distributed/DistributedSystemDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/distributed/DistributedSystemDUnitTest.java
index 3975133..9d9529c 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/distributed/DistributedSystemDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/distributed/DistributedSystemDUnitTest.java
@@ -45,7 +45,9 @@ import com.gemstone.gemfire.internal.AvailablePort;
 import com.gemstone.gemfire.internal.AvailablePortHelper;
 import com.gemstone.gemfire.internal.SocketCreator;
 import com.gemstone.gemfire.test.dunit.DistributedTestCase;
+import com.gemstone.gemfire.test.dunit.DistributedTestSupport;
 import com.gemstone.gemfire.test.dunit.Host;
+import com.gemstone.gemfire.test.dunit.LogWriterSupport;
 import com.gemstone.gemfire.test.dunit.VM;
 
 /**
@@ -256,7 +258,7 @@ public class DistributedSystemDUnitTest extends DistributedTestCase {
   public void testSpecificTcpPort() throws Exception {
     Properties config = new Properties();
     int tcpPort = AvailablePort.getRandomAvailablePort(AvailablePort.SOCKET);
-    config.put("locators", "localhost["+getDUnitLocatorPort()+"]");
+    config.put("locators", "localhost["+DistributedTestSupport.getDUnitLocatorPort()+"]");
     config.setProperty("tcp-port", String.valueOf(tcpPort));
     system = (InternalDistributedSystem)DistributedSystem.connect(config);
     DistributionManager dm = (DistributionManager)system.getDistributionManager();
@@ -284,10 +286,10 @@ public class DistributedSystemDUnitTest extends DistributedTestCase {
     if (loopback != null) {
       Properties config = new Properties();
       config.put(DistributionConfig.MCAST_PORT_NAME, "0");
-      String locators = InetAddress.getLocalHost().getHostName()+":"+getDUnitLocatorPort();
+      String locators = InetAddress.getLocalHost().getHostName()+":"+DistributedTestSupport.getDUnitLocatorPort();
       config.put(DistributionConfig.LOCATORS_NAME, locators);
       config.setProperty(DistributionConfig.BIND_ADDRESS_NAME, loopback.getHostAddress());
-      getLogWriter().info("attempting to connect with " + loopback +" and locators=" + locators);
+      LogWriterSupport.getLogWriter().info("attempting to connect with " + loopback +" and locators=" + locators);
       try {
         system = (InternalDistributedSystem)DistributedSystem.connect(config);
         system.disconnect();
@@ -303,7 +305,7 @@ public class DistributedSystemDUnitTest extends DistributedTestCase {
   public void testUDPPortRange() throws Exception {
     Properties config = new Properties();
     int unicastPort = AvailablePort.getRandomAvailablePort(AvailablePort.SOCKET);
-    config.put("locators", "localhost["+getDUnitLocatorPort()+"]");
+    config.put("locators", "localhost["+DistributedTestSupport.getDUnitLocatorPort()+"]");
     // Minimum 3 ports required in range for UDP, FD_SOCK and TcpConduit.
     config.setProperty(DistributionConfig.MEMBERSHIP_PORT_RANGE_NAME, 
         ""+unicastPort+"-"+(unicastPort+2)); 
@@ -317,7 +319,7 @@ public class DistributedSystemDUnitTest extends DistributedTestCase {
 
   public void testMembershipPortRangeWithExactThreeValues() throws Exception {
     Properties config = new Properties();
-    config.setProperty("locators", "localhost["+getDUnitLocatorPort()+"]");
+    config.setProperty("locators", "localhost["+DistributedTestSupport.getDUnitLocatorPort()+"]");
     config.setProperty(DistributionConfig.MEMBERSHIP_PORT_RANGE_NAME, ""
         + (DistributionConfig.DEFAULT_MEMBERSHIP_PORT_RANGE[1] - 2) + "-"
         + (DistributionConfig.DEFAULT_MEMBERSHIP_PORT_RANGE[1]));

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/76e324b5/gemfire-core/src/test/java/com/gemstone/gemfire/distributed/LocatorDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/distributed/LocatorDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/distributed/LocatorDUnitTest.java
index 85ac58e..e9291f3 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/distributed/LocatorDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/distributed/LocatorDUnitTest.java
@@ -51,12 +51,18 @@ import com.gemstone.gemfire.internal.logging.InternalLogWriter;
 import com.gemstone.gemfire.internal.logging.LocalLogWriter;
 import com.gemstone.gemfire.internal.tcp.Connection;
 import com.gemstone.gemfire.test.dunit.AsyncInvocation;
+import com.gemstone.gemfire.test.dunit.DistributedSystemSupport;
 import com.gemstone.gemfire.test.dunit.DistributedTestCase;
 import com.gemstone.gemfire.test.dunit.Host;
 import com.gemstone.gemfire.test.dunit.IgnoredException;
+import com.gemstone.gemfire.test.dunit.LogWriterSupport;
+import com.gemstone.gemfire.test.dunit.NetworkSupport;
 import com.gemstone.gemfire.test.dunit.SerializableCallable;
 import com.gemstone.gemfire.test.dunit.SerializableRunnable;
+import com.gemstone.gemfire.test.dunit.Threads;
 import com.gemstone.gemfire.test.dunit.VM;
+import com.gemstone.gemfire.test.dunit.Wait;
+import com.gemstone.gemfire.test.dunit.WaitCriterion;
 
 /**
  * Tests the ability of the {@link Locator} API to start and stop
@@ -88,7 +94,7 @@ public class LocatorDUnitTest extends DistributedTestCase {
     super.setUp();
     port1 = -1;
     port2 = -1;
-    IgnoredException.addExpectedException("Removing shunned member");
+    IgnoredException.addIgnoredException("Removing shunned member");
   }
   
   @Override
@@ -99,10 +105,10 @@ public class LocatorDUnitTest extends DistributedTestCase {
     // delete locator state files so they don't accidentally
     // get used by other tests
     if (port1 > 0) {
-      deleteLocatorStateFile(port1);
+      DistributedSystemSupport.deleteLocatorStateFile(port1);
     }
     if (port2 > 0) {
-      deleteLocatorStateFile(port2);
+      DistributedSystemSupport.deleteLocatorStateFile(port2);
     }
   }
   
@@ -125,13 +131,13 @@ public class LocatorDUnitTest extends DistributedTestCase {
     VM vm3 = host.getVM(3);
     
     port1 = AvailablePort.getRandomAvailablePort(AvailablePort.SOCKET);
-    deleteLocatorStateFile(port1);
+    DistributedSystemSupport.deleteLocatorStateFile(port1);
 
-    final String locators = getServerHostName(host) + "[" + port1 + "]";
+    final String locators = NetworkSupport.getServerHostName(host) + "[" + port1 + "]";
     final Properties properties = new Properties();
     properties.put("mcast-port", "0");
     properties.put("start-locator", locators);
-    properties.put("log-level", getDUnitLogLevel());
+    properties.put("log-level", LogWriterSupport.getDUnitLogLevel());
     properties.put("security-peer-auth-init","com.gemstone.gemfire.distributed.AuthInitializer.create");
     properties.put("security-peer-authenticator","com.gemstone.gemfire.distributed.MyAuthenticator.create");
     properties.put(DistributionConfig.ENABLE_CLUSTER_CONFIGURATION_NAME, "false");
@@ -142,7 +148,7 @@ public class LocatorDUnitTest extends DistributedTestCase {
         DistributionManager.NORMAL_DM_TYPE, system.getDistributedMember().getVmKind());
     
     properties.remove("start-locator");
-    properties.put("log-level", getDUnitLogLevel());
+    properties.put("log-level", LogWriterSupport.getDUnitLogLevel());
     properties.put("locators", locators);
     SerializableRunnable startSystem = new SerializableRunnable("start system") {
       public void run() {
@@ -185,7 +191,7 @@ public class LocatorDUnitTest extends DistributedTestCase {
         public void run() {
           final DistributedLockService service = DistributedLockService.getServiceNamed("test service");
           service.lock("foo3", 0, 0);
-          waitForCriterion(new WaitCriterion() {
+          Wait.waitForCriterion(new WaitCriterion() {
             @Override
             public boolean done() {
               return service.isLockGrantor();
@@ -201,13 +207,13 @@ public class LocatorDUnitTest extends DistributedTestCase {
       });
   
       properties.put("start-locator", locators);
-      properties.put("log-level", getDUnitLogLevel());
+      properties.put("log-level", LogWriterSupport.getDUnitLogLevel());
       system = (InternalDistributedSystem)DistributedSystem.connect(properties);
       System.out.println("done connecting distributed system");
       
       assertEquals("should be the coordinator", system.getDistributedMember(), MembershipManagerHelper.getCoordinator(system));
       NetView view = MembershipManagerHelper.getMembershipManager(system).getView();
-      getLogWriter().info("view after becoming coordinator is " + view);
+      com.gemstone.gemfire.test.dunit.LogWriterSupport.getLogWriter().info("view after becoming coordinator is " + view);
       assertNotSame("should not be the first member in the view ("+view+")", system.getDistributedMember(), view.get(0));
       
       service = DistributedLockService.create("test service", system);
@@ -255,9 +261,9 @@ public class LocatorDUnitTest extends DistributedTestCase {
     this.port1 = port1;
     final int port2 = AvailablePort.getRandomAvailablePort(AvailablePort.SOCKET);
     this.port2 = port2; // for cleanup in tearDown2
-    deleteLocatorStateFile(port1);
-    deleteLocatorStateFile(port2);
-    final String host0 = getServerHostName(host); 
+    DistributedSystemSupport.deleteLocatorStateFile(port1);
+    DistributedSystemSupport.deleteLocatorStateFile(port2);
+    final String host0 = NetworkSupport.getServerHostName(host); 
     final String locators = host0 + "[" + port1 + "]," +
                             host0 + "[" + port2 + "]";
     final Properties properties = new Properties();
@@ -266,7 +272,7 @@ public class LocatorDUnitTest extends DistributedTestCase {
     properties.put("enable-network-partition-detection", "false");
     properties.put("disable-auto-reconnect", "true");
     properties.put("member-timeout", "2000");
-    properties.put("log-level", getDUnitLogLevel());
+    properties.put("log-level", LogWriterSupport.getDUnitLogLevel());
     properties.put(DistributionConfig.ENABLE_CLUSTER_CONFIGURATION_NAME, "false");
 
     SerializableCallable startLocator1 = new SerializableCallable("start locator1") {
@@ -303,14 +309,14 @@ public class LocatorDUnitTest extends DistributedTestCase {
     AsyncInvocation async2 = null;
     try {
       async2 = loc2.invokeAsync(startLocator2);
-      pause(2000);
+      Wait.pause(2000);
       async1 = loc1.invokeAsync(startLocator1);
     } finally {
       try {
         if (async1 != null) {
           async1.join(45000);
           if (async1.isAlive()) {
-            dumpAllStacks();
+            Threads.dumpAllStacks();
           }
           if (async2 != null) {
             async2.join();
@@ -365,8 +371,8 @@ public class LocatorDUnitTest extends DistributedTestCase {
     VM vm3 = host.getVM(3);
     
     port1 = AvailablePort.getRandomAvailablePort(AvailablePort.SOCKET);
-    deleteLocatorStateFile(port1);
-    final String locators = getServerHostName(host) + "[" + port1 + "]";
+    DistributedSystemSupport.deleteLocatorStateFile(port1);
+    final String locators = NetworkSupport.getServerHostName(host) + "[" + port1 + "]";
     final Properties properties = new Properties();
     properties.put("mcast-port", "0");
     properties.put("locators", locators);
@@ -455,7 +461,7 @@ public class LocatorDUnitTest extends DistributedTestCase {
         return null;
       }
     };
-    DistributedTestCase.waitForCriterion(ev, timeout, 200, true);
+    Wait.waitForCriterion(ev, timeout, 200, true);
   }
   
   /**
@@ -476,7 +482,7 @@ public class LocatorDUnitTest extends DistributedTestCase {
    * (which is now the sole remaining member) shuts itself down.
    */
   public void testLeadAndCoordFailure() throws Exception {
-    IgnoredException.addExpectedException("Possible loss of quorum due");
+    IgnoredException.addIgnoredException("Possible loss of quorum due");
     disconnectAllFromDS();
     Host host = Host.getHost(0);
     VM vm1 = host.getVM(1);
@@ -488,8 +494,8 @@ public class LocatorDUnitTest extends DistributedTestCase {
     this.port1 = port1;
     final int port2 = AvailablePort.getRandomAvailablePort(AvailablePort.SOCKET);
     this.port2 = port2; // for cleanup in tearDown2()
-    deleteLocatorStateFile(port1, port2);
-    final String host0 = getServerHostName(host); 
+    DistributedSystemSupport.deleteLocatorStateFile(port1, port2);
+    final String host0 = NetworkSupport.getServerHostName(host); 
     final String locators = host0 + "[" + port1 + "]," +
                             host0 + "[" + port2 + "]";
     final Properties properties = new Properties();
@@ -498,7 +504,7 @@ public class LocatorDUnitTest extends DistributedTestCase {
     properties.put("enable-network-partition-detection", "true");
     properties.put("disable-auto-reconnect", "true");
     properties.put("member-timeout", "2000");
-    properties.put("log-level", getDUnitLogLevel());
+    properties.put("log-level", LogWriterSupport.getDUnitLogLevel());
 //    properties.put("log-level", "fine");
     properties.put(DistributionConfig.ENABLE_CLUSTER_CONFIGURATION_NAME, "false");
     
@@ -547,7 +553,7 @@ public class LocatorDUnitTest extends DistributedTestCase {
       assertEquals(sys.getDistributedMember(), MembershipManagerHelper.getCoordinator(sys));
       
       // crash the second vm and the locator.  Should be okay
-      crashDistributedSystem(vm2);
+      DistributedSystemSupport.crashDistributedSystem(vm2);
       locvm.invoke(crashLocator);
       
       assertTrue("Distributed system should not have disconnected",
@@ -560,14 +566,14 @@ public class LocatorDUnitTest extends DistributedTestCase {
   
       // disconnect the first vm and demonstrate that the third vm and the
       // locator notice the failure and exit
-      crashDistributedSystem(vm1);
+      DistributedSystemSupport.crashDistributedSystem(vm1);
 
       /* This vm is watching vm1, which is watching vm2 which is watching locvm.
        * It will take 3 * (3 * member-timeout) milliseconds to detect the full
        * failure and eject the lost members from the view.
        */
       
-      getLogWriter().info("waiting for my distributed system to disconnect due to partition detection");
+      com.gemstone.gemfire.test.dunit.LogWriterSupport.getLogWriter().info("waiting for my distributed system to disconnect due to partition detection");
       WaitCriterion ev = new WaitCriterion() {
         public boolean done() {
           return !sys.isConnected();
@@ -576,7 +582,7 @@ public class LocatorDUnitTest extends DistributedTestCase {
           return null;
         }
       };
-      DistributedTestCase.waitForCriterion(ev, 12 * 2000, 200, true);
+      Wait.waitForCriterion(ev, 12 * 2000, 200, true);
       if (sys.isConnected()) {
         fail("Distributed system did not disconnect as expected - network partition detection is broken");
       }
@@ -623,8 +629,8 @@ public class LocatorDUnitTest extends DistributedTestCase {
     this.port1 = port1;
     final int port2 = AvailablePort.getRandomAvailablePort(AvailablePort.SOCKET);
     this.port2 = port2;
-    deleteLocatorStateFile(port1, port2);
-    final String host0 = getServerHostName(host);
+    DistributedSystemSupport.deleteLocatorStateFile(port1, port2);
+    final String host0 = NetworkSupport.getServerHostName(host);
     final String locators = host0 + "[" + port1 + "],"
           + host0 + "[" + port2 + "]";
     final Properties properties = new Properties();
@@ -684,7 +690,7 @@ public class LocatorDUnitTest extends DistributedTestCase {
       // crash the lead vm. Should be okay
       vm1.invoke(crashSystem);
 
-      pause(4 * 2000); // 4 x the member-timeout
+      Wait.pause(4 * 2000); // 4 x the member-timeout
       
       assertTrue("Distributed system should not have disconnected",
           isSystemConnected());
@@ -700,7 +706,7 @@ public class LocatorDUnitTest extends DistributedTestCase {
       
       if (!Locator.getLocators().isEmpty()) {
         // log this for debugging purposes before throwing assertion error
-        getLogWriter().warning("found locator " + Locator.getLocators().iterator().next());
+        com.gemstone.gemfire.test.dunit.LogWriterSupport.getLogWriter().warning("found locator " + Locator.getLocators().iterator().next());
       }
       assertTrue("locator is not stopped", Locator.getLocators().isEmpty());
       
@@ -738,7 +744,7 @@ public class LocatorDUnitTest extends DistributedTestCase {
       try {
         locvm.invoke(stopLocator);
       } catch (Exception e) {
-        getLogWriter().severe("failed to stop locator in vm 3", e);
+        com.gemstone.gemfire.test.dunit.LogWriterSupport.getLogWriter().severe("failed to stop locator in vm 3", e);
       }
     }
   }
@@ -770,8 +776,8 @@ public class LocatorDUnitTest extends DistributedTestCase {
     this.port1 = port1;
     final int port2 = AvailablePort.getRandomAvailablePort(AvailablePort.SOCKET);
     this.port2 = port2;
-    deleteLocatorStateFile(port1, port2);
-    final String host0 = getServerHostName(host);
+    DistributedSystemSupport.deleteLocatorStateFile(port1, port2);
+    final String host0 = NetworkSupport.getServerHostName(host);
     final String locators = host0 + "[" + port1 + "]," + host0 + "[" + port2 + "]";
 
     final Properties properties = new Properties();
@@ -780,7 +786,7 @@ public class LocatorDUnitTest extends DistributedTestCase {
     properties.put("enable-network-partition-detection", "true");
     properties.put("disable-auto-reconnect", "true");
     properties.put("member-timeout", "2000");
-    properties.put("log-level", getDUnitLogLevel());
+    properties.put("log-level", LogWriterSupport.getDUnitLogLevel());
     properties.put(DistributionConfig.ENABLE_CLUSTER_CONFIGURATION_NAME, "false");
 
     SerializableRunnable stopLocator = getStopLocatorRunnable();
@@ -848,7 +854,7 @@ public class LocatorDUnitTest extends DistributedTestCase {
 
       vm2.invokeAsync(crashSystem);
 
-      pause(1000); // 4 x the member-timeout
+      Wait.pause(1000); // 4 x the member-timeout
       
       // request member removal for first peer from second peer.
       vm2.invoke(new SerializableRunnable("Request Member Removal") {
@@ -909,8 +915,8 @@ public class LocatorDUnitTest extends DistributedTestCase {
     this.port1 = port1;
     final int port2 = AvailablePort.getRandomAvailablePort(AvailablePort.SOCKET);
     this.port2 = port2;
-    deleteLocatorStateFile(port1, port2);
-    final String host0 = getServerHostName(host);
+    DistributedSystemSupport.deleteLocatorStateFile(port1, port2);
+    final String host0 = NetworkSupport.getServerHostName(host);
     final String locators = host0 + "[" + port1 + "],"
           + host0 + "[" + port2 + "]";
     final Properties properties = new Properties();
@@ -987,7 +993,7 @@ public class LocatorDUnitTest extends DistributedTestCase {
       
       // crash the lead locator.  Should be okay
       locvm.invoke(crashLocator);
-      pause(10 * 1000);
+      Wait.pause(10 * 1000);
 
       assertTrue("Distributed system should not have disconnected",
           sys.isConnected());
@@ -1001,7 +1007,7 @@ public class LocatorDUnitTest extends DistributedTestCase {
       // disconnect the first vm and demonstrate that the non-lead vm and the
       // locator notice the failure and continue to run
       vm1.invoke(disconnect);
-      pause(10 * 1000);
+      Wait.pause(10 * 1000);
       
       assertTrue("Distributed system should not have disconnected",
           vm2.invokeBoolean(LocatorDUnitTest.class, "isSystemConnected"));
@@ -1030,8 +1036,8 @@ public class LocatorDUnitTest extends DistributedTestCase {
     Host host = Host.getHost(0);
     int port =
       AvailablePort.getRandomAvailablePort(AvailablePort.SOCKET);
-    deleteLocatorStateFile(port1);
-    String locators = getServerHostName(host) + "[" + port + "]";
+    DistributedSystemSupport.deleteLocatorStateFile(port1);
+    String locators = NetworkSupport.getServerHostName(host) + "[" + port + "]";
     Properties props = new Properties();
     props.setProperty("mcast-port", "0");
     props.setProperty("locators", locators);
@@ -1093,8 +1099,8 @@ public class LocatorDUnitTest extends DistributedTestCase {
 
     final int port =
       AvailablePort.getRandomAvailablePort(AvailablePort.SOCKET);
-    deleteLocatorStateFile(port1);
-    final String locators = getServerHostName(host) + "[" + port + "]";
+    DistributedSystemSupport.deleteLocatorStateFile(port1);
+    final String locators = NetworkSupport.getServerHostName(host) + "[" + port + "]";
     final String uniqueName = getUniqueName();
     
     vm0.invoke(new SerializableRunnable("Start locator " + locators) {
@@ -1133,7 +1139,7 @@ public class LocatorDUnitTest extends DistributedTestCase {
     system = (InternalDistributedSystem)DistributedSystem.connect(props);
     
     final DistributedMember coord = MembershipManagerHelper.getCoordinator(system);
-    getLogWriter().info("coordinator before termination of locator is " + coord);
+    com.gemstone.gemfire.test.dunit.LogWriterSupport.getLogWriter().info("coordinator before termination of locator is " + coord);
 
     vm0.invoke(getStopLocatorRunnable());
     
@@ -1147,9 +1153,9 @@ public class LocatorDUnitTest extends DistributedTestCase {
           MembershipManagerHelper.getCoordinator(system);
       }
     };
-    DistributedTestCase.waitForCriterion(ev, 15 * 1000, 200, true);
+    Wait.waitForCriterion(ev, 15 * 1000, 200, true);
     DistributedMember newCoord = MembershipManagerHelper.getCoordinator(system); 
-    getLogWriter().info("coordinator after shutdown of locator was " +
+    com.gemstone.gemfire.test.dunit.LogWriterSupport.getLogWriter().info("coordinator after shutdown of locator was " +
         newCoord);
     if (coord.equals(newCoord)) {
       fail("another member should have become coordinator after the locator was stopped");
@@ -1205,8 +1211,8 @@ public class LocatorDUnitTest extends DistributedTestCase {
 
     final int port =
       AvailablePort.getRandomAvailablePort(AvailablePort.SOCKET);
-    deleteLocatorStateFile(port1);
-    final String locators = getServerHostName(host) + "[" + port + "]";
+    DistributedSystemSupport.deleteLocatorStateFile(port1);
+    final String locators = NetworkSupport.getServerHostName(host) + "[" + port + "]";
     
     vm0.invoke(getStartSBLocatorRunnable(port, getUniqueName()+"1"));
     try {
@@ -1230,7 +1236,7 @@ public class LocatorDUnitTest extends DistributedTestCase {
     system = (InternalDistributedSystem)getSystem(props);
 
     final DistributedMember coord = MembershipManagerHelper.getCoordinator(system);
-    getLogWriter().info("coordinator before termination of locator is " + coord);
+    com.gemstone.gemfire.test.dunit.LogWriterSupport.getLogWriter().info("coordinator before termination of locator is " + coord);
 
     vm0.invoke(getStopLocatorRunnable());
     
@@ -1244,9 +1250,9 @@ public class LocatorDUnitTest extends DistributedTestCase {
           MembershipManagerHelper.getCoordinator(system);
       }
     };
-    DistributedTestCase.waitForCriterion(ev, 15000, 200, true);
+    Wait.waitForCriterion(ev, 15000, 200, true);
     DistributedMember newCoord = MembershipManagerHelper.getCoordinator(system); 
-    getLogWriter().info("coordinator after shutdown of locator was " +
+    com.gemstone.gemfire.test.dunit.LogWriterSupport.getLogWriter().info("coordinator after shutdown of locator was " +
         newCoord);
     if (newCoord == null || coord.equals(newCoord)) {
       fail("another member should have become coordinator after the locator was stopped: "
@@ -1268,7 +1274,7 @@ public class LocatorDUnitTest extends DistributedTestCase {
         return null;
       }
     };
-    DistributedTestCase.waitForCriterion(ev, 5000, 200, true);
+    Wait.waitForCriterion(ev, 5000, 200, true);
     
     system.disconnect();
     LogWriter bgexecLogger =
@@ -1338,8 +1344,8 @@ public class LocatorDUnitTest extends DistributedTestCase {
     this.port1 = port1;
     final int port2 = freeTCPPorts[1];
     this.port2 = port2;
-    deleteLocatorStateFile(port1, port2);
-    final String host0 = getServerHostName(host); 
+    DistributedSystemSupport.deleteLocatorStateFile(port1, port2);
+    final String host0 = NetworkSupport.getServerHostName(host); 
     final String locators = host0 + "[" + port1 + "]," +
                             host0 + "[" + port2 + "]";
 
@@ -1410,7 +1416,7 @@ public class LocatorDUnitTest extends DistributedTestCase {
             return null;
           }
         };
-        DistributedTestCase.waitForCriterion(ev, 10 * 1000, 200, true);
+        Wait.waitForCriterion(ev, 10 * 1000, 200, true);
 
         // three applications plus
         assertEquals(5, system.getDM().getViewMembers().size());
@@ -1442,7 +1448,7 @@ public class LocatorDUnitTest extends DistributedTestCase {
    */
   public void testMultipleMcastLocators() throws Exception {
     disconnectAllFromDS();
-    IgnoredException.addExpectedException("Could not stop  Distribution Locator"); // shutdown timing issue in InternalLocator
+    IgnoredException.addIgnoredException("Could not stop  Distribution Locator"); // shutdown timing issue in InternalLocator
     Host host = Host.getHost(0);
     VM vm0 = host.getVM(0);
     VM vm1 = host.getVM(1);
@@ -1454,10 +1460,10 @@ public class LocatorDUnitTest extends DistributedTestCase {
     this.port1 = port1;
     final int port2 = freeTCPPorts[1];
     this.port2 = port2;
-    deleteLocatorStateFile(port1, port2);
+    DistributedSystemSupport.deleteLocatorStateFile(port1, port2);
     final int mcastport = AvailablePort.getRandomAvailablePort(AvailablePort.MULTICAST);
     
-    final String host0 = getServerHostName(host); 
+    final String host0 = NetworkSupport.getServerHostName(host); 
     final String locators = host0 + "[" + port1 + "]," +
                             host0 + "[" + port2 + "]";
     final String uniqueName = getUniqueName();
@@ -1469,7 +1475,7 @@ public class LocatorDUnitTest extends DistributedTestCase {
             Properties props = new Properties();
             props.setProperty("mcast-port", String.valueOf(mcastport));
             props.setProperty("locators", locators);
-            props.setProperty("log-level", getDUnitLogLevel());
+            props.setProperty("log-level", LogWriterSupport.getDUnitLogLevel());
             props.setProperty("mcast-ttl", "0");
             props.setProperty("enable-network-partition-detection", "true");
             props.setProperty(DistributionConfig.ENABLE_CLUSTER_CONFIGURATION_NAME, "false");
@@ -1488,7 +1494,7 @@ public class LocatorDUnitTest extends DistributedTestCase {
             Properties props = new Properties();
             props.setProperty("mcast-port", String.valueOf(mcastport));
             props.setProperty("locators", locators);
-            props.setProperty("log-level", getDUnitLogLevel());
+            props.setProperty("log-level", LogWriterSupport.getDUnitLogLevel());
             props.setProperty("mcast-ttl", "0");
             props.setProperty("enable-network-partition-detection", "true");
             props.setProperty(DistributionConfig.ENABLE_CLUSTER_CONFIGURATION_NAME, "false");
@@ -1506,7 +1512,7 @@ public class LocatorDUnitTest extends DistributedTestCase {
             Properties props = new Properties();
             props.setProperty("mcast-port", String.valueOf(mcastport));
             props.setProperty("locators", locators);
-            props.setProperty("log-level", getDUnitLogLevel());
+            props.setProperty("log-level", LogWriterSupport.getDUnitLogLevel());
             props.setProperty("mcast-ttl", "0");
             props.setProperty("enable-network-partition-detection", "true");
             DistributedSystem.connect(props);
@@ -1519,7 +1525,7 @@ public class LocatorDUnitTest extends DistributedTestCase {
       Properties props = new Properties();
       props.setProperty("mcast-port", String.valueOf(mcastport));
       props.setProperty("locators", locators);
-      props.setProperty("log-level", getDUnitLogLevel());
+      props.setProperty("log-level", LogWriterSupport.getDUnitLogLevel());
       props.setProperty("mcast-ttl", "0");
       props.setProperty("enable-network-partition-detection", "true");
 
@@ -1538,7 +1544,7 @@ public class LocatorDUnitTest extends DistributedTestCase {
           return "waiting for 5 members - have " + system.getDM().getViewMembers().size();
         }
       };
-      DistributedTestCase.waitForCriterion(ev, WAIT2_MS, 200, true);
+      Wait.waitForCriterion(ev, WAIT2_MS, 200, true);
       system.disconnect();
 
       SerializableRunnable disconnect =
@@ -1574,12 +1580,12 @@ public class LocatorDUnitTest extends DistributedTestCase {
 
     port1 =
       AvailablePort.getRandomAvailablePort(AvailablePort.SOCKET);
-    deleteLocatorStateFile(port1);
+    DistributedSystemSupport.deleteLocatorStateFile(port1);
     File logFile = new File("");
     Locator locator = Locator.startLocator(port1, logFile);
     try {
 
-    final String locators = getServerHostName(host) + "[" + port1 + "]";
+    final String locators = NetworkSupport.getServerHostName(host) + "[" + port1 + "]";
 
     Properties props = new Properties();
     props.setProperty("mcast-port", "0");
@@ -1604,8 +1610,8 @@ public class LocatorDUnitTest extends DistributedTestCase {
     
     try {
       port1 = AvailablePort.getRandomAvailablePort(AvailablePort.SOCKET);
-      deleteLocatorStateFile(port1);
-      final String locators = getServerHostName(host) + "[" + port1 + "]";
+      DistributedSystemSupport.deleteLocatorStateFile(port1);
+      final String locators = NetworkSupport.getServerHostName(host) + "[" + port1 + "]";
       final Properties properties = new Properties();
       properties.put("mcast-port", "0");
       properties.put("locators", locators);
@@ -1681,7 +1687,7 @@ public class LocatorDUnitTest extends DistributedTestCase {
     port1 =
       AvailablePort.getRandomAvailablePort(AvailablePort.SOCKET);
     File logFile1 = new File("");
-    deleteLocatorStateFile(port1);
+    DistributedSystemSupport.deleteLocatorStateFile(port1);
     Locator locator1 = Locator.startLocator(port1, logFile1);
     
     try {
@@ -1690,7 +1696,7 @@ public class LocatorDUnitTest extends DistributedTestCase {
       AvailablePort.getRandomAvailablePort(AvailablePort.SOCKET);
     File logFile2 = new File("");
 
-    deleteLocatorStateFile(port2);
+    DistributedSystemSupport.deleteLocatorStateFile(port2);
     
     try {
       Locator locator2 = Locator.startLocator(port2, logFile2);
@@ -1698,7 +1704,7 @@ public class LocatorDUnitTest extends DistributedTestCase {
     } catch (IllegalStateException expected) {
     }
 
-    final String host0 = getServerHostName(host);
+    final String host0 = NetworkSupport.getServerHostName(host);
     final String locators = host0 + "[" + port1 + "]," +
                             host0 + "[" + port2 + "]";
 
@@ -1708,7 +1714,7 @@ public class LocatorDUnitTest extends DistributedTestCase {
             Properties props = new Properties();
             props.setProperty("mcast-port", "0");
             props.setProperty("locators", locators);
-            props.setProperty("log-level", getDUnitLogLevel());
+            props.setProperty("log-level", LogWriterSupport.getDUnitLogLevel());
             DistributedSystem.connect(props);
           }
         };
@@ -1743,7 +1749,7 @@ public class LocatorDUnitTest extends DistributedTestCase {
     disconnectAllFromDS();
     port1 =
       AvailablePort.getRandomAvailablePort(AvailablePort.SOCKET);
-    deleteLocatorStateFile(port1);
+    DistributedSystemSupport.deleteLocatorStateFile(port1);
     File logFile = new File("");
     File stateFile = new File("locator"+port1+"state.dat");
     VM vm0 = Host.getHost(0).getVM(0);
@@ -1755,7 +1761,7 @@ public class LocatorDUnitTest extends DistributedTestCase {
       stateFile.delete();
     }
 
-    getLogWriter().info("Starting locator");
+    com.gemstone.gemfire.test.dunit.LogWriterSupport.getLogWriter().info("Starting locator");
     Locator locator = Locator.startLocatorAndDS(port1, logFile, p);
     try {
     
@@ -1767,10 +1773,10 @@ public class LocatorDUnitTest extends DistributedTestCase {
         };
     vm0.invoke(connect);
     
-    getLogWriter().info("Stopping locator");
+    com.gemstone.gemfire.test.dunit.LogWriterSupport.getLogWriter().info("Stopping locator");
     locator.stop();
     
-    getLogWriter().info("Starting locator");
+    com.gemstone.gemfire.test.dunit.LogWriterSupport.getLogWriter().info("Starting locator");
     locator = Locator.startLocatorAndDS(port1, logFile, p);
     
     vm0.invoke(new SerializableRunnable("disconnect") {
@@ -1829,7 +1835,7 @@ public class LocatorDUnitTest extends DistributedTestCase {
           System.setProperty("p2p.joinTimeout", "1000");
           Properties locProps = new Properties();
           locProps.put("mcast-port", "0");
-          locProps.put("log-level", getDUnitLogLevel());
+          locProps.put("log-level", LogWriterSupport.getDUnitLogLevel());
           Locator.startLocatorAndDS(port, logFile, locProps);
         } catch (IOException ex) {
           com.gemstone.gemfire.test.dunit.Assert.fail("While starting locator on port " + port, ex);
@@ -1867,7 +1873,7 @@ public class LocatorDUnitTest extends DistributedTestCase {
       long giveUp = System.currentTimeMillis() + 30000;
       if (cause instanceof ForcedDisconnectException) {
         while (unboundedWait && System.currentTimeMillis() < giveUp) {
-          pause(1000);
+          Wait.pause(1000);
         }
       } else {
         cause.printStackTrace();
@@ -1896,7 +1902,7 @@ public class LocatorDUnitTest extends DistributedTestCase {
     public void quorumLost(Set<InternalDistributedMember> failures,
         List<InternalDistributedMember> remaining) {
       quorumLostInvoked = true;
-      getLogWriter().info("quorumLost invoked in test code");
+      com.gemstone.gemfire.test.dunit.LogWriterSupport.getLogWriter().info("quorumLost invoked in test code");
     }
   }
   

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/76e324b5/gemfire-core/src/test/java/com/gemstone/gemfire/distributed/LocatorJUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/distributed/LocatorJUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/distributed/LocatorJUnitTest.java
index c369f19..3c80d9a 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/distributed/LocatorJUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/distributed/LocatorJUnitTest.java
@@ -51,7 +51,6 @@ import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
 import com.gemstone.gemfire.internal.cache.tier.sockets.ClientProxyMembershipID;
 import com.gemstone.gemfire.management.internal.JmxManagerAdvisor.JmxManagerProfile;
 import com.gemstone.gemfire.test.dunit.DistributedTestCase;
-import com.gemstone.gemfire.test.dunit.DistributedTestCase.WaitCriterion;
 import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
 
 @Category(IntegrationTest.class)

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/76e324b5/gemfire-core/src/test/java/com/gemstone/gemfire/distributed/SystemAdminDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/distributed/SystemAdminDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/distributed/SystemAdminDUnitTest.java
index 42d4ed1..895c11b 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/distributed/SystemAdminDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/distributed/SystemAdminDUnitTest.java
@@ -29,7 +29,9 @@ import java.util.Properties;
 import com.gemstone.gemfire.distributed.internal.DistributionManager;
 import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
 import com.gemstone.gemfire.internal.SystemAdmin;
-import com.gemstone.gemfire.test.dunit.DistributedTestCase;
+import com.gemstone.gemfire.test.dunit.DistributedTestCase;
+import com.gemstone.gemfire.test.dunit.DistributedTestSupport;
+import com.gemstone.gemfire.test.dunit.LogWriterSupport;
 
 public class SystemAdminDUnitTest extends DistributedTestCase {
 
@@ -54,7 +56,7 @@ public class SystemAdminDUnitTest extends DistributedTestCase {
     system = null;
     InternalDistributedSystem sys = InternalDistributedSystem.getAnyInstance();
     if (sys != null && sys.isConnected()) {
-      getLogWriter().info("disconnecting(3)");
+      LogWriterSupport.getLogWriter().info("disconnecting(3)");
       sys.disconnect();
     }
   }
@@ -62,7 +64,7 @@ public class SystemAdminDUnitTest extends DistributedTestCase {
   public void testPrintStacks() throws Exception {
 
     // create a gemfire.properties that lets SystemAdmin find the dunit locator
-    Properties p = getAllDistributedSystemProperties(getDistributedSystemProperties());
+    Properties p = DistributedTestSupport.getAllDistributedSystemProperties(getDistributedSystemProperties());
     try {
       
       SystemAdmin.setDistributedSystemProperties(p);

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/76e324b5/gemfire-core/src/test/java/com/gemstone/gemfire/distributed/internal/Bug40751DUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/distributed/internal/Bug40751DUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/distributed/internal/Bug40751DUnitTest.java
index cedf650..5289fac 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/distributed/internal/Bug40751DUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/distributed/internal/Bug40751DUnitTest.java
@@ -36,6 +36,7 @@ import com.gemstone.gemfire.cache.SubscriptionAttributes;
 import com.gemstone.gemfire.cache30.CacheTestCase;
 import com.gemstone.gemfire.internal.cache.lru.Sizeable;
 import com.gemstone.gemfire.test.dunit.Host;
+import com.gemstone.gemfire.test.dunit.Invoke;
 import com.gemstone.gemfire.test.dunit.SerializableCallable;
 import com.gemstone.gemfire.test.dunit.SerializableRunnable;
 import com.gemstone.gemfire.test.dunit.VM;
@@ -95,7 +96,7 @@ public class Bug40751DUnitTest extends CacheTestCase {
 
       vm1.invoke(createEmptyRegion);
     } finally {
-      invokeInEveryVM(new SerializableCallable() {
+      Invoke.invokeInEveryVM(new SerializableCallable() {
         public Object call() throws Exception {
           System.getProperties().remove("p2p.oldIO");
           System.getProperties().remove("p2p.nodirectBuffers");

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/76e324b5/gemfire-core/src/test/java/com/gemstone/gemfire/distributed/internal/ConsoleDistributionManagerDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/distributed/internal/ConsoleDistributionManagerDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/distributed/internal/ConsoleDistributionManagerDUnitTest.java
index 86b2563..6272017 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/distributed/internal/ConsoleDistributionManagerDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/distributed/internal/ConsoleDistributionManagerDUnitTest.java
@@ -42,11 +42,13 @@ import com.gemstone.gemfire.internal.admin.GfManagerAgentConfig;
 import com.gemstone.gemfire.internal.admin.GfManagerAgentFactory;
 import com.gemstone.gemfire.internal.admin.StatResource;
 import com.gemstone.gemfire.internal.admin.remote.RemoteTransportConfig;
-import com.gemstone.gemfire.test.dunit.DistributedTestCase;
 import com.gemstone.gemfire.test.dunit.Host;
 import com.gemstone.gemfire.test.dunit.IgnoredException;
+import com.gemstone.gemfire.test.dunit.LogWriterSupport;
 import com.gemstone.gemfire.test.dunit.SerializableRunnable;
 import com.gemstone.gemfire.test.dunit.VM;
+import com.gemstone.gemfire.test.dunit.Wait;
+import com.gemstone.gemfire.test.dunit.WaitCriterion;
 
 /**
  * This class tests the functionality of the {@linkplain com.gemstone.gemfire.internal.admin internal
@@ -65,13 +67,13 @@ public class ConsoleDistributionManagerDUnitTest
 //  private volatile Alert lastAlert = null;
 
   public void alert(Alert alert) {
-    getLogWriter().info("DEBUG: alert=" + alert);
+    LogWriterSupport.getLogWriter().info("DEBUG: alert=" + alert);
 //    this.lastAlert = alert;
   }
 
   public void setUp() throws Exception {
     boolean finishedSetup = false;
-    IgnoredException.addExpectedException("Error occurred while reading system log");
+    IgnoredException.addIgnoredException("Error occurred while reading system log");
     try {
       if (firstTime) {
         disconnectFromDS(); //make sure there's no ldm lying around
@@ -95,7 +97,7 @@ public class ConsoleDistributionManagerDUnitTest
       }
       // create a GfManagerAgent in the master vm.
       this.agent = GfManagerAgentFactory.
-        getManagerAgent(new GfManagerAgentConfig(null, transport, getLogWriter(), Alert.SEVERE, this, null));
+        getManagerAgent(new GfManagerAgentConfig(null, transport, LogWriterSupport.getLogWriter(), Alert.SEVERE, this, null));
       if (!agent.isConnected()) {
         WaitCriterion ev = new WaitCriterion() {
           public boolean done() {
@@ -105,7 +107,7 @@ public class ConsoleDistributionManagerDUnitTest
             return null;
           }
         };
-        DistributedTestCase.waitForCriterion(ev, 60 * 1000, 200, true);
+        Wait.waitForCriterion(ev, 60 * 1000, 200, true);
       }
       finishedSetup = true;
     } finally {
@@ -190,7 +192,7 @@ public class ConsoleDistributionManagerDUnitTest
           return null;
         }
       };
-      DistributedTestCase.waitForCriterion(ev, 60 * 1000, 200, true);
+      Wait.waitForCriterion(ev, 60 * 1000, 200, true);
     }
 
     //final Serializable controllerId = getSystem().getDistributionManager().getId(); //can't do this...
@@ -250,7 +252,7 @@ public class ConsoleDistributionManagerDUnitTest
       
       Region[] roots = apps[i].getRootRegions();
       if (roots.length == 0) {
-        getLogWriter().info("DEBUG: testApplications: apps[" + i + "]=" + apps[i] + " did not have a root region");
+        LogWriterSupport.getLogWriter().info("DEBUG: testApplications: apps[" + i + "]=" + apps[i] + " did not have a root region");
       } else {
         Region root = roots[0];
         assertNotNull(root);
@@ -291,7 +293,7 @@ public class ConsoleDistributionManagerDUnitTest
         assertTrue(!node.isPrimitiveOrString());
         EntryValueNode[] fields = node.getChildren();
         assertNotNull(fields);
-        getLogWriter().warning("The tests use StringBuffers for values which might be implmented differently in jdk 1.5");
+        LogWriterSupport.getLogWriter().warning("The tests use StringBuffers for values which might be implmented differently in jdk 1.5");
        // assertTrue(fields.length > 0);
         
         /// test destruction in the last valid app
@@ -315,7 +317,7 @@ public class ConsoleDistributionManagerDUnitTest
               return "Waited 20 seconds for region " + r.getFullPath() + "to be destroyed.";
             }
           };
-          DistributedTestCase.waitForCriterion(ev, 20 * 1000, 200, true);
+          Wait.waitForCriterion(ev, 20 * 1000, 200, true);
         }
       }
     }
@@ -368,7 +370,7 @@ public class ConsoleDistributionManagerDUnitTest
     region.create(entryName, value);
     
     
-    getLogWriter().info("Put value " + value + " in entry " +
+    LogWriterSupport.getLogWriter().info("Put value " + value + " in entry " +
                         entryName + " in region '" +
                         region.getFullPath() +"'");
     

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/76e324b5/gemfire-core/src/test/java/com/gemstone/gemfire/distributed/internal/DistributionAdvisorDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/distributed/internal/DistributionAdvisorDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/distributed/internal/DistributionAdvisorDUnitTest.java
index 98bfbbd..5a045fe 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/distributed/internal/DistributionAdvisorDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/distributed/internal/DistributionAdvisorDUnitTest.java
@@ -25,6 +25,7 @@ import java.util.Set;
 import com.gemstone.gemfire.CancelCriterion;
 import com.gemstone.gemfire.distributed.internal.membership.InternalDistributedMember;
 import com.gemstone.gemfire.test.dunit.DistributedTestCase;
+import com.gemstone.gemfire.test.dunit.Invoke;
 import com.gemstone.gemfire.test.dunit.SerializableRunnable;
 
 /**
@@ -43,7 +44,7 @@ public class DistributionAdvisorDUnitTest extends DistributedTestCase {
   public void setUp() throws Exception {
     super.setUp();
     // connect to distributed system in every VM
-    invokeInEveryVM(new SerializableRunnable("DistributionAdvisorDUnitTest: SetUp") {
+    Invoke.invokeInEveryVM(new SerializableRunnable("DistributionAdvisorDUnitTest: SetUp") {
       public void run() {
         getSystem();
       }


Mime
View raw message