geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kl...@apache.org
Subject [18/44] incubator-geode git commit: Refactor dunit
Date Tue, 02 Feb 2016 20:21:25 GMT
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/76e324b5/gemfire-core/src/test/java/com/gemstone/gemfire/internal/jta/dunit/IdleTimeOutDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/jta/dunit/IdleTimeOutDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/jta/dunit/IdleTimeOutDUnitTest.java
index 9e36e88..7bb0e9e 100755
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/jta/dunit/IdleTimeOutDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/jta/dunit/IdleTimeOutDUnitTest.java
@@ -41,6 +41,8 @@ import com.gemstone.gemfire.test.dunit.Assert;
 import com.gemstone.gemfire.test.dunit.AsyncInvocation;
 import com.gemstone.gemfire.test.dunit.DistributedTestCase;
 import com.gemstone.gemfire.test.dunit.Host;
+import com.gemstone.gemfire.test.dunit.LogWriterSupport;
+import com.gemstone.gemfire.test.dunit.Threads;
 import com.gemstone.gemfire.test.dunit.VM;
 import com.gemstone.gemfire.util.test.TestUtil;
 
@@ -63,7 +65,7 @@ public class IdleTimeOutDUnitTest extends DistributedTestCase {
       //
       //    sb.append(lineSep);
     }
-    getLogWriter().info("***********\n " + sb);
+    LogWriterSupport.getLogWriter().info("***********\n " + sb);
     return sb.toString();
   }
 
@@ -113,22 +115,22 @@ public class IdleTimeOutDUnitTest extends DistributedTestCase {
      * value=\"83f0069202c571faf1ae6c42b4ad46030e4e31c17409e19a\"/>";
      */
     int n1 = str.indexOf(search);
-    getLogWriter().info("Start Index = " + n1);
+    LogWriterSupport.getLogWriter().info("Start Index = " + n1);
     int n2 = str.indexOf(last_search, n1);
     StringBuffer sbuff = new StringBuffer(str);
-    getLogWriter().info("END Index = " + n2);
+    LogWriterSupport.getLogWriter().info("END Index = " + n2);
     String modified_str = sbuff.replace(n1, n2, new_str).toString();
     return modified_str;
   }
 
   public static String init(String className) throws Exception {
-    getLogWriter().fine("PATH11 ");
+    LogWriterSupport.getLogWriter().fine("PATH11 ");
     Properties props = new Properties();
     String path = System.getProperty("CACHEXMLFILE");
-    getLogWriter().fine("PATH2 " + path);
+    LogWriterSupport.getLogWriter().fine("PATH2 " + path);
     int pid = OSProcess.getId();
     path = File.createTempFile("dunit-cachejta_", ".xml").getAbsolutePath();
-    getLogWriter().fine("PATH " + path);
+    LogWriterSupport.getLogWriter().fine("PATH " + path);
     /** * Return file as string and then modify the string accordingly ** */
     String file_as_str = readFile(TestUtil.getResourcePath(CacheUtils.class, "cachejta.xml"));
     file_as_str = file_as_str.replaceAll("newDB", "newDB_" + pid);
@@ -170,7 +172,7 @@ public class IdleTimeOutDUnitTest extends DistributedTestCase {
     String sql = "create table "
         + tableName
         + " (id integer NOT NULL, name varchar(50), CONSTRAINT "+tableName+"_key PRIMARY KEY(id))";
-    getLogWriter().info(sql);
+    LogWriterSupport.getLogWriter().info(sql);
     Connection conn = ds.getConnection();
     Statement sm = conn.createStatement();
     sm.execute(sql);
@@ -179,7 +181,7 @@ public class IdleTimeOutDUnitTest extends DistributedTestCase {
     for (int i = 1; i <= 10; i++) {
       sql = "insert into " + tableName + " values (" + i + ",'name" + i + "')";
       sm.addBatch(sql);
-      getLogWriter().info(sql);
+      LogWriterSupport.getLogWriter().info(sql);
     }
     sm.executeBatch();
     conn.close();
@@ -191,18 +193,18 @@ public class IdleTimeOutDUnitTest extends DistributedTestCase {
       Context ctx = cache.getJNDIContext();
       DataSource ds = (DataSource) ctx.lookup("java:/SimpleDataSource");
       Connection conn = ds.getConnection();
-      getLogWriter().info(" trying to drop table: " + tableName);
+      LogWriterSupport.getLogWriter().info(" trying to drop table: " + tableName);
       String sql = "drop table " + tableName;
       Statement sm = conn.createStatement();
       sm.execute(sql);
       conn.close();
     }
     catch (NamingException ne) {
-      getLogWriter().info("destroy table naming exception: " + ne);
+      LogWriterSupport.getLogWriter().info("destroy table naming exception: " + ne);
       throw ne;
     }
     catch (SQLException se) {
-      getLogWriter().info("destroy table sql exception: " + se);
+      LogWriterSupport.getLogWriter().info("destroy table sql exception: " + se);
       throw se;
     }
     finally {
@@ -238,7 +240,7 @@ public class IdleTimeOutDUnitTest extends DistributedTestCase {
       ds.disconnect();
     }
     catch (Exception e) {
-      getLogWriter().info("Error in disconnecting from Distributed System");
+      LogWriterSupport.getLogWriter().info("Error in disconnecting from Distributed System");
     }
   }
 
@@ -265,7 +267,7 @@ public class IdleTimeOutDUnitTest extends DistributedTestCase {
     vm0.invoke(IdleTimeOutDUnitTest.class, "runTest1");
     AsyncInvocation asyncObj = vm0.invokeAsync(IdleTimeOutDUnitTest.class,
         "runTest2");
-    DistributedTestCase.join(asyncObj, 30 * 1000, getLogWriter());
+    Threads.join(asyncObj, 30 * 1000, LogWriterSupport.getLogWriter());
     if(asyncObj.exceptionOccurred()){
       Assert.fail("asyncObj failed", asyncObj.getException());
     }				   
@@ -279,27 +281,27 @@ public class IdleTimeOutDUnitTest extends DistributedTestCase {
       ds = (DataSource) ctx.lookup("java:/XAPooledDataSource");
     }
     catch (NamingException e) {
-      getLogWriter().info("Naming Exception caught in lookup: " + e);
+      LogWriterSupport.getLogWriter().info("Naming Exception caught in lookup: " + e);
       fail("failed in naming lookup: " + e);
       return;
     }
     catch (Exception e) {
-      getLogWriter().info("Exception caught during naming lookup: " + e);
+      LogWriterSupport.getLogWriter().info("Exception caught during naming lookup: " + e);
       fail("failed in naming lookup: " + e);
       return;
     }
     try {
       for (int count = 0; count < MAX_CONNECTIONS; count++) {
         ds.getConnection();
-        getLogWriter().info("runTest1 :acquired connection #" + count);
+        LogWriterSupport.getLogWriter().info("runTest1 :acquired connection #" + count);
       }
     }
     catch (SQLException e) {
-      getLogWriter().info("Success SQLException caught in runTest1: " + e);
+      LogWriterSupport.getLogWriter().info("Success SQLException caught in runTest1: " + e);
       fail("runTest1 SQL Exception caught: " + e);
     }
     catch (Exception e) {
-      getLogWriter().info("Exception caught in runTest1: " + e);
+      LogWriterSupport.getLogWriter().info("Exception caught in runTest1: " + e);
       fail("Exception caught in runTest1: " + e);
       e.printStackTrace();
     }
@@ -315,12 +317,12 @@ public class IdleTimeOutDUnitTest extends DistributedTestCase {
       ds = (DataSource) ctx.lookup("java:/XAPooledDataSource");
     }
     catch (NamingException e) {
-      getLogWriter().info("Exception caught during naming lookup: " + e);
+      LogWriterSupport.getLogWriter().info("Exception caught during naming lookup: " + e);
       fail("failed in naming lookup: " + e);
       return;
     }
     catch (Exception e) {
-      getLogWriter().info("Exception caught during naming lookup: " + e);
+      LogWriterSupport.getLogWriter().info("Exception caught during naming lookup: " + e);
       fail("failed in because of unhandled excpetion: " + e);
       return;
     }
@@ -328,16 +330,16 @@ public class IdleTimeOutDUnitTest extends DistributedTestCase {
       for (int count = 0; count < MAX_CONNECTIONS; count++) {
         Connection con = ds.getConnection();
         assertNotNull("Connection object is null", con);
-        getLogWriter().info("runTest2 :acquired connection #" + count);
+        LogWriterSupport.getLogWriter().info("runTest2 :acquired connection #" + count);
       }
     }
     catch (SQLException sqle) {
-      getLogWriter().info("SQLException caught in runTest2: " + sqle);
+      LogWriterSupport.getLogWriter().info("SQLException caught in runTest2: " + sqle);
       fail("failed because of SQL exception : " + sqle);
       sqle.printStackTrace();
     }
     catch (Exception e) {
-      getLogWriter().info("Exception caught in runTest2: " + e);
+      LogWriterSupport.getLogWriter().info("Exception caught in runTest2: " + e);
       fail("failed because of unhandled exception : " + e);
       e.printStackTrace();
     }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/76e324b5/gemfire-core/src/test/java/com/gemstone/gemfire/internal/jta/dunit/LoginTimeOutDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/jta/dunit/LoginTimeOutDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/jta/dunit/LoginTimeOutDUnitTest.java
index d3aac82..5362107 100755
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/jta/dunit/LoginTimeOutDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/jta/dunit/LoginTimeOutDUnitTest.java
@@ -44,8 +44,12 @@ import com.gemstone.gemfire.test.dunit.Assert;
 import com.gemstone.gemfire.test.dunit.AsyncInvocation;
 import com.gemstone.gemfire.test.dunit.DistributedTestCase;
 import com.gemstone.gemfire.test.dunit.Host;
+import com.gemstone.gemfire.test.dunit.LogWriterSupport;
 import com.gemstone.gemfire.test.dunit.RMIException;
+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.util.test.TestUtil;
 
 public class LoginTimeOutDUnitTest extends DistributedTestCase {
@@ -249,11 +253,11 @@ public class LoginTimeOutDUnitTest extends DistributedTestCase {
     VM vm0 = host.getVM(0);
     AsyncInvocation test1 = vm0.invokeAsync(LoginTimeOutDUnitTest.class, "runTest1");
     AsyncInvocation test2 = vm0.invokeAsync(LoginTimeOutDUnitTest.class, "runTest2");
-    DistributedTestCase.join(test2, 120 * 1000, getLogWriter());
+    Threads.join(test2, 120 * 1000, LogWriterSupport.getLogWriter());
     if(test2.exceptionOccurred()){
       Assert.fail("asyncObj failed", test2.getException());
     }
-    DistributedTestCase.join(test1, 30000, getLogWriter());
+    Threads.join(test1, 30000, LogWriterSupport.getLogWriter());
   }
 
   public static void runTest1() throws Exception {
@@ -293,7 +297,7 @@ public class LoginTimeOutDUnitTest extends DistributedTestCase {
         return null;
       }
     };
-    DistributedTestCase.waitForCriterion(ev, 60 * 1000, 200, true);
+    Wait.waitForCriterion(ev, 60 * 1000, 200, true);
   }
 
   public static void runTest2() throws Exception {
@@ -307,7 +311,7 @@ public class LoginTimeOutDUnitTest extends DistributedTestCase {
           return null;
         }
       };
-      DistributedTestCase.waitForCriterion(ev, 60 * 1000, 200, true);
+      Wait.waitForCriterion(ev, 60 * 1000, 200, true);
       
       DataSource ds = null;
       try {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/76e324b5/gemfire-core/src/test/java/com/gemstone/gemfire/internal/jta/dunit/MaxPoolSizeDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/jta/dunit/MaxPoolSizeDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/jta/dunit/MaxPoolSizeDUnitTest.java
index 609b3af..1411d20 100755
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/jta/dunit/MaxPoolSizeDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/jta/dunit/MaxPoolSizeDUnitTest.java
@@ -41,6 +41,8 @@ import com.gemstone.gemfire.test.dunit.Assert;
 import com.gemstone.gemfire.test.dunit.AsyncInvocation;
 import com.gemstone.gemfire.test.dunit.DistributedTestCase;
 import com.gemstone.gemfire.test.dunit.Host;
+import com.gemstone.gemfire.test.dunit.LogWriterSupport;
+import com.gemstone.gemfire.test.dunit.Threads;
 import com.gemstone.gemfire.test.dunit.VM;
 import com.gemstone.gemfire.util.test.TestUtil;
 
@@ -63,7 +65,7 @@ public class MaxPoolSizeDUnitTest extends DistributedTestCase {
       //
       //    sb.append(lineSep);
     }
-    getLogWriter().fine("***********\n " + sb);
+    LogWriterSupport.getLogWriter().fine("***********\n " + sb);
     return sb.toString();
   }
 
@@ -113,20 +115,20 @@ public class MaxPoolSizeDUnitTest extends DistributedTestCase {
      * value=\"83f0069202c571faf1ae6c42b4ad46030e4e31c17409e19a\"/>";
      */
     int n1 = str.indexOf(search);
-    getLogWriter().fine("Start Index = " + n1);
+    LogWriterSupport.getLogWriter().fine("Start Index = " + n1);
     int n2 = str.indexOf(last_search, n1);
     StringBuffer sbuff = new StringBuffer(str);
-    getLogWriter().fine("END Index = " + n2);
+    LogWriterSupport.getLogWriter().fine("END Index = " + n2);
     String modified_str = sbuff.replace(n1, n2, new_str).toString();
     return modified_str;
   }
 
   public static String init(String className) throws Exception {
-    getLogWriter().fine("PATH11 ");
+    LogWriterSupport.getLogWriter().fine("PATH11 ");
     Properties props = new Properties();
     int pid = OSProcess.getId();
     String path = File.createTempFile("dunit-cachejta_", ".xml").getAbsolutePath();
-    getLogWriter().fine("PATH " + path);
+    LogWriterSupport.getLogWriter().fine("PATH " + path);
     /** * Return file as string and then modify the string accordingly ** */
     String file_as_str = readFile(TestUtil.getResourcePath(CacheUtils.class, "cachejta.xml"));
     file_as_str = file_as_str.replaceAll("newDB", "newDB_" + pid);
@@ -168,7 +170,7 @@ public class MaxPoolSizeDUnitTest extends DistributedTestCase {
     String sql = "create table "
         + tableName
         + " (id integer NOT NULL, name varchar(50), CONSTRAINT "+tableName+"_key PRIMARY KEY(id))";
-    getLogWriter().fine(sql);
+    LogWriterSupport.getLogWriter().fine(sql);
     Connection conn = ds.getConnection();
     Statement sm = conn.createStatement();
     sm.execute(sql);
@@ -177,7 +179,7 @@ public class MaxPoolSizeDUnitTest extends DistributedTestCase {
     for (int i = 1; i <= 10; i++) {
       sql = "insert into " + tableName + " values (" + i + ",'name" + i + "')";
       sm.addBatch(sql);
-      getLogWriter().fine(sql);
+      LogWriterSupport.getLogWriter().fine(sql);
     }
     sm.executeBatch();
     conn.close();
@@ -189,19 +191,19 @@ public class MaxPoolSizeDUnitTest extends DistributedTestCase {
       Context ctx = cache.getJNDIContext();
       DataSource ds = (DataSource) ctx.lookup("java:/SimpleDataSource");
       Connection conn = ds.getConnection();
-      getLogWriter().fine(" trying to drop table: " + tableName);
+      LogWriterSupport.getLogWriter().fine(" trying to drop table: " + tableName);
       String sql = "drop table " + tableName;
       Statement sm = conn.createStatement();
       sm.execute(sql);
       conn.close();
     }
     catch (NamingException ne) {
-      getLogWriter().fine("destroy table naming exception: " + ne);
+      LogWriterSupport.getLogWriter().fine("destroy table naming exception: " + ne);
       throw ne;
     }
     catch (SQLException se) {
       if (!se.getMessage().contains("A lock could not be obtained within the time requested")) {
-        getLogWriter().fine("destroy table sql exception: " + se);
+        LogWriterSupport.getLogWriter().fine("destroy table sql exception: " + se);
         throw se;
       } else {
         // disregard - this happens sometimes on unit test runs on slower
@@ -239,7 +241,7 @@ public class MaxPoolSizeDUnitTest extends DistributedTestCase {
       ds.disconnect();
     }
     catch (Exception e) {
-      getLogWriter().fine("Error in disconnecting from Distributed System");
+      LogWriterSupport.getLogWriter().fine("Error in disconnecting from Distributed System");
     }
   }
 
@@ -268,7 +270,7 @@ public class MaxPoolSizeDUnitTest extends DistributedTestCase {
     VM vm0 = host.getVM(0);
     AsyncInvocation asyncObj = vm0.invokeAsync(MaxPoolSizeDUnitTest.class,
         "runTest1");
-    DistributedTestCase.join(asyncObj, 30 * 1000, getLogWriter());
+    Threads.join(asyncObj, 30 * 1000, LogWriterSupport.getLogWriter());
     if(asyncObj.exceptionOccurred()){
       Assert.fail("asyncObj failed", asyncObj.getException());
     }
@@ -283,19 +285,19 @@ public class MaxPoolSizeDUnitTest extends DistributedTestCase {
       ds = (DataSource) ctx.lookup("java:/XAPooledDataSource");
     }
     catch (NamingException e) {
-      getLogWriter().fine("Naming Exception caught in lookup: " + e);
+      LogWriterSupport.getLogWriter().fine("Naming Exception caught in lookup: " + e);
       fail("failed in naming lookup: " + e);
       return;
     }
     catch (Exception e) {
-      getLogWriter().fine("Exception caught during naming lookup: " + e);
+      LogWriterSupport.getLogWriter().fine("Exception caught during naming lookup: " + e);
       fail("failed in naming lookup: " + e);
       return;
     }
     try {
       for (count = 0; count < MAX_CONNECTIONS; count++) {
         ds.getConnection();
-        getLogWriter().fine("Thread 1 acquired connection #" + count);
+        LogWriterSupport.getLogWriter().fine("Thread 1 acquired connection #" + count);
       }
       fail("expected max connect exception");
     }
@@ -304,7 +306,7 @@ public class MaxPoolSizeDUnitTest extends DistributedTestCase {
         Assert.fail("runTest1 SQL Exception", e);
       }
       else {
-        getLogWriter().fine("Success SQLException caught at connection #"
+        LogWriterSupport.getLogWriter().fine("Success SQLException caught at connection #"
             + count);
       }
     }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/76e324b5/gemfire-core/src/test/java/com/gemstone/gemfire/internal/jta/dunit/TransactionTimeOutDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/jta/dunit/TransactionTimeOutDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/jta/dunit/TransactionTimeOutDUnitTest.java
index 6b443c4..be397a6 100755
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/jta/dunit/TransactionTimeOutDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/jta/dunit/TransactionTimeOutDUnitTest.java
@@ -45,6 +45,8 @@ import com.gemstone.gemfire.test.dunit.Assert;
 import com.gemstone.gemfire.test.dunit.AsyncInvocation;
 import com.gemstone.gemfire.test.dunit.DistributedTestCase;
 import com.gemstone.gemfire.test.dunit.Host;
+import com.gemstone.gemfire.test.dunit.LogWriterSupport;
+import com.gemstone.gemfire.test.dunit.Threads;
 import com.gemstone.gemfire.test.dunit.VM;
 import com.gemstone.gemfire.util.test.TestUtil;
 
@@ -136,8 +138,8 @@ public class TransactionTimeOutDUnitTest extends DistributedTestCase {
     AsyncInvocation async1 = vm0.invokeAsync(TransactionTimeOutDUnitTest.class, "runTest1");
     AsyncInvocation async2 =vm0.invokeAsync(TransactionTimeOutDUnitTest.class, "runTest2");
     
-    DistributedTestCase.join(async1, 30 * 1000, getLogWriter());
-    DistributedTestCase.join(async2, 30 * 1000, getLogWriter());
+    Threads.join(async1, 30 * 1000, LogWriterSupport.getLogWriter());
+    Threads.join(async2, 30 * 1000, LogWriterSupport.getLogWriter());
     if(async1.exceptionOccurred()){
       Assert.fail("async1 failed", async1.getException());
     }
@@ -214,7 +216,7 @@ public class TransactionTimeOutDUnitTest extends DistributedTestCase {
       return;
     }
     catch (Exception e) {
-      getLogWriter().fine("Exception caught " + e);
+      LogWriterSupport.getLogWriter().fine("Exception caught " + e);
       fail("failed in naming lookup: " + e);
       return;
     }
@@ -240,7 +242,7 @@ public class TransactionTimeOutDUnitTest extends DistributedTestCase {
       return;
     }
     catch (Exception e) {
-      getLogWriter().fine("Exception caught " + e);
+      LogWriterSupport.getLogWriter().fine("Exception caught " + e);
       fail("failed in naming lookup: " + e);
       return;
     }
@@ -493,7 +495,7 @@ public class TransactionTimeOutDUnitTest extends DistributedTestCase {
       //
       //    sb.append(lineSep);
     }
-    getLogWriter().fine("***********\n " + sb);
+    LogWriterSupport.getLogWriter().fine("***********\n " + sb);
     return sb.toString();
   }
 }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/76e324b5/gemfire-core/src/test/java/com/gemstone/gemfire/internal/jta/dunit/TxnManagerMultiThreadDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/jta/dunit/TxnManagerMultiThreadDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/jta/dunit/TxnManagerMultiThreadDUnitTest.java
index 16fb461..9f55949 100755
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/jta/dunit/TxnManagerMultiThreadDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/jta/dunit/TxnManagerMultiThreadDUnitTest.java
@@ -46,6 +46,8 @@ import com.gemstone.gemfire.test.dunit.Assert;
 import com.gemstone.gemfire.test.dunit.AsyncInvocation;
 import com.gemstone.gemfire.test.dunit.DistributedTestCase;
 import com.gemstone.gemfire.test.dunit.Host;
+import com.gemstone.gemfire.test.dunit.LogWriterSupport;
+import com.gemstone.gemfire.test.dunit.Threads;
 import com.gemstone.gemfire.test.dunit.VM;
 import com.gemstone.gemfire.util.test.TestUtil;
 
@@ -185,7 +187,7 @@ public class TxnManagerMultiThreadDUnitTest extends DistributedTestCase {
     String jtest = System.getProperty("JTESTS");
     int pid = OSProcess.getId();
     String path = File.createTempFile("dunit-cachejta_", ".xml").getAbsolutePath();
-    getLogWriter().fine("PATH " + path);
+    LogWriterSupport.getLogWriter().fine("PATH " + path);
     /** * Return file as string and then modify the string accordingly ** */
     String file_as_str = readFile(TestUtil.getResourcePath(CacheUtils.class, "cachejta.xml"));
     file_as_str = file_as_str.replaceAll("newDB", "newDB_" + pid);
@@ -211,7 +213,7 @@ public class TxnManagerMultiThreadDUnitTest extends DistributedTestCase {
       }
     }
     catch (Exception e) {
-      getLogWriter().info("", e);
+      LogWriterSupport.getLogWriter().info("", e);
       throw new Exception("" + e);
     }
     return tableName;
@@ -226,7 +228,7 @@ public class TxnManagerMultiThreadDUnitTest extends DistributedTestCase {
     String sql = "create table "
         + tableName
         + " (id integer NOT NULL, name varchar(50), CONSTRAINT "+tableName+"_key PRIMARY KEY(id))";
-    getLogWriter().fine(sql);
+    LogWriterSupport.getLogWriter().fine(sql);
     Connection conn = ds.getConnection();
     Statement sm = conn.createStatement();
     sm.execute(sql);
@@ -235,7 +237,7 @@ public class TxnManagerMultiThreadDUnitTest extends DistributedTestCase {
     for (int i = 1; i <= 10; i++) {
       sql = "insert into " + tableName + " values (" + i + ",'name" + i + "')";
       sm.addBatch(sql);
-      getLogWriter().fine(sql);
+      LogWriterSupport.getLogWriter().fine(sql);
     }
     sm.executeBatch();
     conn.close();
@@ -253,28 +255,28 @@ public class TxnManagerMultiThreadDUnitTest extends DistributedTestCase {
     }
     try {
       String tableName = tblName;
-      getLogWriter().fine("Destroying table: " + tableName);
+      LogWriterSupport.getLogWriter().fine("Destroying table: " + tableName);
       cache = TxnManagerMultiThreadDUnitTest.getCache();
       Context ctx = cache.getJNDIContext();
       DataSource ds = (DataSource) ctx.lookup("java:/SimpleDataSource");
       Connection conn = ds.getConnection();
-      getLogWriter().fine(" trying to drop table: " + tableName);
+      LogWriterSupport.getLogWriter().fine(" trying to drop table: " + tableName);
       String sql = "drop table " + tableName;
       Statement sm = conn.createStatement();
       sm.execute(sql);
       conn.close();
-      getLogWriter().fine("destroyTable is Successful!");
+      LogWriterSupport.getLogWriter().fine("destroyTable is Successful!");
     }
     catch (NamingException ne) {
-      getLogWriter().fine("destroy table naming exception: " + ne);
+      LogWriterSupport.getLogWriter().fine("destroy table naming exception: " + ne);
       throw ne;
     }
     catch (SQLException se) {
-      getLogWriter().fine("destroy table sql exception: " + se);
+      LogWriterSupport.getLogWriter().fine("destroy table sql exception: " + se);
       throw se;
     }
     finally {
-      getLogWriter().fine("Closing cache...");
+      LogWriterSupport.getLogWriter().fine("Closing cache...");
       closeCache();
     }
   }//end of destroyTable
@@ -290,7 +292,7 @@ public class TxnManagerMultiThreadDUnitTest extends DistributedTestCase {
       }
     }
     catch (Exception e) {
-      getLogWriter().warning("exception while creating cache", e);
+      LogWriterSupport.getLogWriter().warning("exception while creating cache", e);
     }
   }//end of startCache
 
@@ -298,18 +300,18 @@ public class TxnManagerMultiThreadDUnitTest extends DistributedTestCase {
     try {
       if (!cache.isClosed()) {
         cache.close();
-        getLogWriter().fine("Cache closed");
+        LogWriterSupport.getLogWriter().fine("Cache closed");
       }
     }
     catch (Exception e) {
-      getLogWriter().warning("exception while closing cache", e);
+      LogWriterSupport.getLogWriter().warning("exception while closing cache", e);
     }
     try {
       CacheUtils.ds.disconnect();
-      getLogWriter().fine("Disconnected from Distribuited System");
+      LogWriterSupport.getLogWriter().fine("Disconnected from Distribuited System");
     }
     catch (Exception e) {
-      getLogWriter().fine("Error in disconnecting from Distributed System");
+      LogWriterSupport.getLogWriter().fine("Error in disconnecting from Distributed System");
     }
   }//end of closeCache
 
@@ -349,7 +351,7 @@ public class TxnManagerMultiThreadDUnitTest extends DistributedTestCase {
       /*int rowsDeleted = */jtaObj.deleteRows(tblName_delRows);
     }
     catch (Exception e) {
-      getLogWriter().warning("Error: while deleting rows from database using JTAUtils", e);
+      LogWriterSupport.getLogWriter().warning("Error: while deleting rows from database using JTAUtils", e);
     }
   }//end of delRows
 
@@ -406,11 +408,11 @@ public class TxnManagerMultiThreadDUnitTest extends DistributedTestCase {
     //get how many rows actually got committed
     try {
       int rows = jtaObj.getRows(tblName);
-      getLogWriter().fine("Number of rows committed current test method  are: "
+      LogWriterSupport.getLogWriter().fine("Number of rows committed current test method  are: "
           + rows);
     }
     catch (Exception e) {
-      getLogWriter().warning("Error: while getting rows from database using JTAUtils", e);
+      LogWriterSupport.getLogWriter().warning("Error: while getting rows from database using JTAUtils", e);
     }
   }//end of getNumberOfRows
 
@@ -423,7 +425,7 @@ public class TxnManagerMultiThreadDUnitTest extends DistributedTestCase {
     VM vm0 = Host.getHost(0).getVM(0);
     AsyncInvocation asyncObj1 = vm0.invokeAsync(
         TxnManagerMultiThreadDUnitTest.class, "callCommitThreads");
-    DistributedTestCase.join(asyncObj1, 30 * 1000, getLogWriter());
+    Threads.join(asyncObj1, 30 * 1000, LogWriterSupport.getLogWriter());
     if(asyncObj1.exceptionOccurred()){
       Assert.fail("asyncObj1 failed", asyncObj1.getException());
     }
@@ -435,15 +437,15 @@ public class TxnManagerMultiThreadDUnitTest extends DistributedTestCase {
    *  
    */
   public static void callCommitThreads() {
-    getLogWriter().fine("This is callCommitThreads method");
+    LogWriterSupport.getLogWriter().fine("This is callCommitThreads method");
     try {
-      new CommitThread("ct1", getLogWriter());
-      new CommitThread("ct2", getLogWriter());
-      new CommitThread("ct3", getLogWriter());
-      new CommitThread("ct4", getLogWriter());
+      new CommitThread("ct1", LogWriterSupport.getLogWriter());
+      new CommitThread("ct2", LogWriterSupport.getLogWriter());
+      new CommitThread("ct3", LogWriterSupport.getLogWriter());
+      new CommitThread("ct4", LogWriterSupport.getLogWriter());
     }
     catch (Exception e) {
-      getLogWriter().warning("Failed in Commit Threads", e);
+      LogWriterSupport.getLogWriter().warning("Failed in Commit Threads", e);
       fail("Failed in Commit Threads" + e);
     }
   }//end of callCommitTheads
@@ -456,7 +458,7 @@ public class TxnManagerMultiThreadDUnitTest extends DistributedTestCase {
     VM vm0 = Host.getHost(0).getVM(0);
     AsyncInvocation asyncObj1 = vm0.invokeAsync(
         TxnManagerMultiThreadDUnitTest.class, "callCommitandRollbackThreads");
-    DistributedTestCase.join(asyncObj1, 30 * 1000, getLogWriter());
+    Threads.join(asyncObj1, 30 * 1000, LogWriterSupport.getLogWriter());
     if(asyncObj1.exceptionOccurred()){
       Assert.fail("asyncObj1 failed", asyncObj1.getException());
     }
@@ -464,16 +466,16 @@ public class TxnManagerMultiThreadDUnitTest extends DistributedTestCase {
   }//end of test3Commit2Rollback
 
   public static void callCommitandRollbackThreads() {
-    getLogWriter().fine("This is callCommitandRollbackThreads method");
+    LogWriterSupport.getLogWriter().fine("This is callCommitandRollbackThreads method");
     try {
-      new CommitThread("ct1", getLogWriter());
-      new CommitThread("ct2", getLogWriter());
-      new CommitThread("ct3", getLogWriter());
-      new RollbackThread("rt1", getLogWriter());
-      new RollbackThread("rt2", getLogWriter());
+      new CommitThread("ct1", LogWriterSupport.getLogWriter());
+      new CommitThread("ct2", LogWriterSupport.getLogWriter());
+      new CommitThread("ct3", LogWriterSupport.getLogWriter());
+      new RollbackThread("rt1", LogWriterSupport.getLogWriter());
+      new RollbackThread("rt2", LogWriterSupport.getLogWriter());
     }
     catch (Exception e) {
-      getLogWriter().info("Failed in Commit and Rollback threads", e);
+      LogWriterSupport.getLogWriter().info("Failed in Commit and Rollback threads", e);
       fail("Failed in Commit and Rollback Threads" + e);
     }
   }//end of callCommitandRollbackThreads

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/76e324b5/gemfire-core/src/test/java/com/gemstone/gemfire/internal/jta/dunit/TxnTimeOutDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/jta/dunit/TxnTimeOutDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/jta/dunit/TxnTimeOutDUnitTest.java
index e28a752..01a8da0 100755
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/jta/dunit/TxnTimeOutDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/jta/dunit/TxnTimeOutDUnitTest.java
@@ -39,6 +39,8 @@ import com.gemstone.gemfire.test.dunit.Assert;
 import com.gemstone.gemfire.test.dunit.AsyncInvocation;
 import com.gemstone.gemfire.test.dunit.DistributedTestCase;
 import com.gemstone.gemfire.test.dunit.Host;
+import com.gemstone.gemfire.test.dunit.LogWriterSupport;
+import com.gemstone.gemfire.test.dunit.Threads;
 import com.gemstone.gemfire.test.dunit.VM;
 import com.gemstone.gemfire.util.test.TestUtil;
 
@@ -70,7 +72,7 @@ public class TxnTimeOutDUnitTest extends DistributedTestCase {
     wr.close();
     props.setProperty("cache-xml-file", path);
 //    props.setProperty("mcast-port", "10321");
-    props.setProperty("log-level", getDUnitLogLevel());
+    props.setProperty("log-level", LogWriterSupport.getDUnitLogLevel());
     try {
 //      ds = DistributedSystem.connect(props);
       ds = (new TxnTimeOutDUnitTest("temp")).getSystem(props);
@@ -155,27 +157,27 @@ public class TxnTimeOutDUnitTest extends DistributedTestCase {
         AsyncInvocation asyncObj5 = vm0.invokeAsync(TxnTimeOutDUnitTest.class,
         "runTest3",o4);
 
-        DistributedTestCase.join(asyncObj1, 5 * 60 * 1000, getLogWriter());        
+        Threads.join(asyncObj1, 5 * 60 * 1000, LogWriterSupport.getLogWriter());        
         if(asyncObj1.exceptionOccurred()){
           Assert.fail("asyncObj1 failed", asyncObj1.getException());
         }
         
-        DistributedTestCase.join(asyncObj2, 5 * 60 * 1000, getLogWriter());        
+        Threads.join(asyncObj2, 5 * 60 * 1000, LogWriterSupport.getLogWriter());        
         if(asyncObj2.exceptionOccurred()){
           Assert.fail("asyncObj2 failed", asyncObj2.getException());
         }
         
-        DistributedTestCase.join(asyncObj3, 5 * 60 * 1000, getLogWriter());        
+        Threads.join(asyncObj3, 5 * 60 * 1000, LogWriterSupport.getLogWriter());        
         if(asyncObj3.exceptionOccurred()){
           Assert.fail("asyncObj3 failed", asyncObj3.getException());
         }
         
-        DistributedTestCase.join(asyncObj4, 5 * 60 * 1000, getLogWriter());        
+        Threads.join(asyncObj4, 5 * 60 * 1000, LogWriterSupport.getLogWriter());        
         if(asyncObj4.exceptionOccurred()){
           Assert.fail("asyncObj4 failed", asyncObj4.getException());
         }
         
-        DistributedTestCase.join(asyncObj5, 5 * 60 * 1000, getLogWriter());        
+        Threads.join(asyncObj5, 5 * 60 * 1000, LogWriterSupport.getLogWriter());        
         if(asyncObj5.exceptionOccurred()){
           Assert.fail("asyncObj5 failed", asyncObj5.getException());
         }
@@ -194,12 +196,12 @@ public class TxnTimeOutDUnitTest extends DistributedTestCase {
         "runTest2");
     AsyncInvocation asyncObj2 =    vm0.invokeAsync(TxnTimeOutDUnitTest.class, "runTest1");
 
-    DistributedTestCase.join(asyncObj1, 5 * 60 * 1000, getLogWriter());
+    Threads.join(asyncObj1, 5 * 60 * 1000, LogWriterSupport.getLogWriter());
     if(asyncObj1.exceptionOccurred()){
       Assert.fail("asyncObj1 failed", asyncObj1.getException());
     }
     
-    DistributedTestCase.join(asyncObj2, 5 * 60 * 1000, getLogWriter());
+    Threads.join(asyncObj2, 5 * 60 * 1000, LogWriterSupport.getLogWriter());
     if(asyncObj2.exceptionOccurred()){
       Assert.fail("asyncObj2 failed", asyncObj2.getException());
     }
@@ -228,7 +230,7 @@ public class TxnTimeOutDUnitTest extends DistributedTestCase {
           fail("Exception did not occur although was supposed to occur");
     }
     catch (Exception e) {
-      getLogWriter().fine("Exception caught " + e);
+      LogWriterSupport.getLogWriter().fine("Exception caught " + e);
       fail("failed in naming lookup: " + e);
     }
     finally {
@@ -257,7 +259,7 @@ public class TxnTimeOutDUnitTest extends DistributedTestCase {
           fail("Exception did not occur although was supposed to occur");
     }
     catch (Exception e) {
-      getLogWriter().fine("Exception caught " + e);
+      LogWriterSupport.getLogWriter().fine("Exception caught " + e);
       fail("failed in naming lookup: " + e);
     }
   }
@@ -301,7 +303,7 @@ public class TxnTimeOutDUnitTest extends DistributedTestCase {
       //
       //    sb.append(lineSep);
     }
-    getLogWriter().fine("***********\n " + sb);
+    LogWriterSupport.getLogWriter().fine("***********\n " + sb);
     return sb.toString();
   }
 } 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/76e324b5/gemfire-core/src/test/java/com/gemstone/gemfire/internal/logging/DistributedSystemLogFileJUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/logging/DistributedSystemLogFileJUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/logging/DistributedSystemLogFileJUnitTest.java
index a8b664e..b3f4029 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/logging/DistributedSystemLogFileJUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/logging/DistributedSystemLogFileJUnitTest.java
@@ -43,8 +43,8 @@ import com.gemstone.gemfire.distributed.internal.DistributionConfig;
 import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
 import com.gemstone.gemfire.internal.logging.log4j.FastLogger;
 import com.gemstone.gemfire.internal.logging.log4j.LogWriterLogger;
-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;
 
 /**
@@ -113,7 +113,7 @@ public class DistributedSystemLogFileJUnitTest {
     assertEquals("Expected " + LogWriterImpl.levelToString(InternalLogWriter.INFO_LEVEL) + " but was " + LogWriterImpl.levelToString(logWriter.getLogWriterLevel()),
         InternalLogWriter.INFO_LEVEL, logWriter.getLogWriterLevel());
     
-    DistributedTestCase.waitForCriterion(new WaitCriterion() {
+    Wait.waitForCriterion(new WaitCriterion() {
       @Override
       public boolean done() {
         return logFile.exists();
@@ -504,7 +504,7 @@ public class DistributedSystemLogFileJUnitTest {
     assertTrue(logWriter instanceof FastLogger);
     assertTrue(((FastLogger)logWriter).isDelegating());
 
-    DistributedTestCase.waitForCriterion(new WaitCriterion() {
+    Wait.waitForCriterion(new WaitCriterion() {
       @Override
       public boolean done() {
         return logFile.exists();
@@ -720,7 +720,7 @@ public class DistributedSystemLogFileJUnitTest {
     assertTrue(logWriter instanceof FastLogger);
     assertTrue(((FastLogger)logWriter).isDelegating());
 
-    DistributedTestCase.waitForCriterion(new WaitCriterion() {
+    Wait.waitForCriterion(new WaitCriterion() {
       @Override
       public boolean done() {
         return logFile.exists();
@@ -961,7 +961,7 @@ public class DistributedSystemLogFileJUnitTest {
     assertTrue(((FastLogger)logWriter).isDelegating());
 
     
-    DistributedTestCase.waitForCriterion(new WaitCriterion() {
+    Wait.waitForCriterion(new WaitCriterion() {
       @Override
       public boolean done() {
         return securityLogFile.exists() && logFile.exists();
@@ -1076,7 +1076,7 @@ public class DistributedSystemLogFileJUnitTest {
     assertTrue(((FastLogger)securityLogWriter).isDelegating());
     assertTrue(((FastLogger)logWriter).isDelegating());
 
-    DistributedTestCase.waitForCriterion(new WaitCriterion() {
+    Wait.waitForCriterion(new WaitCriterion() {
       @Override
       public boolean done() {
         return securityLogFile.exists() && logFile.exists();
@@ -1248,7 +1248,7 @@ public class DistributedSystemLogFileJUnitTest {
     assertTrue(((FastLogger)securityLogWriter).isDelegating());
     assertTrue(((FastLogger)logWriter).isDelegating());
 
-    DistributedTestCase.waitForCriterion(new WaitCriterion() {
+    Wait.waitForCriterion(new WaitCriterion() {
       @Override
       public boolean done() {
         return logFile.exists();
@@ -1397,7 +1397,7 @@ public class DistributedSystemLogFileJUnitTest {
     assertTrue(((FastLogger)securityLogWriter).isDelegating());
     assertTrue(((FastLogger)logWriter).isDelegating());
 
-    DistributedTestCase.waitForCriterion(new WaitCriterion() {
+    Wait.waitForCriterion(new WaitCriterion() {
       @Override
       public boolean done() {
         return logFile.exists();

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/76e324b5/gemfire-core/src/test/java/com/gemstone/gemfire/internal/logging/LocatorLogFileJUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/logging/LocatorLogFileJUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/logging/LocatorLogFileJUnitTest.java
index d817f74..ffb09ce 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/logging/LocatorLogFileJUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/logging/LocatorLogFileJUnitTest.java
@@ -35,8 +35,8 @@ import com.gemstone.gemfire.distributed.internal.DistributionConfig;
 import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
 import com.gemstone.gemfire.internal.AvailablePort;
 import com.gemstone.gemfire.internal.logging.log4j.LogWriterLogger;
-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;
 
 /**
@@ -103,7 +103,7 @@ public class LocatorLogFileJUnitTest {
         InternalLogWriter.INFO_LEVEL, logWriter.getLogWriterLevel());
     
     assertNotNull(this.locator);
-    DistributedTestCase.waitForCriterion(new WaitCriterion() {
+    Wait.waitForCriterion(new WaitCriterion() {
       @Override
       public boolean done() {
         return logFile.exists();

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/76e324b5/gemfire-core/src/test/java/com/gemstone/gemfire/internal/logging/MergeLogFilesJUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/logging/MergeLogFilesJUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/logging/MergeLogFilesJUnitTest.java
index e076d04..d1ec86e 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/logging/MergeLogFilesJUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/logging/MergeLogFilesJUnitTest.java
@@ -41,7 +41,7 @@ import org.junit.experimental.categories.Category;
 
 import com.gemstone.gemfire.LogWriter;
 import com.gemstone.gemfire.SystemFailure;
-import com.gemstone.gemfire.test.dunit.DistributedTestCase;
+import com.gemstone.gemfire.test.dunit.Threads;
 import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
 
 /**
@@ -79,7 +79,7 @@ public class MergeLogFilesJUnitTest {
 
     for (Iterator iter = workers.iterator(); iter.hasNext(); ) {
       Worker worker = (Worker) iter.next();
-      DistributedTestCase.join(worker, 120 * 1000, null);
+      Threads.join(worker, 120 * 1000, null);
     }
 
     if (group.exceptionOccurred()) {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/76e324b5/gemfire-core/src/test/java/com/gemstone/gemfire/internal/offheap/OffHeapRegionBase.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/offheap/OffHeapRegionBase.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/offheap/OffHeapRegionBase.java
index 1c3a33a..b515959 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/offheap/OffHeapRegionBase.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/offheap/OffHeapRegionBase.java
@@ -44,7 +44,7 @@ import com.gemstone.gemfire.internal.offheap.annotations.Retained;
 import com.gemstone.gemfire.pdx.PdxReader;
 import com.gemstone.gemfire.pdx.PdxSerializable;
 import com.gemstone.gemfire.pdx.PdxWriter;
-import com.gemstone.gemfire.test.dunit.DistributedTestCase.WaitCriterion;
+import com.gemstone.gemfire.test.dunit.WaitCriterion;
 
 /**
  * Basic test of regions that use off heap storage.
@@ -146,7 +146,7 @@ public abstract class OffHeapRegionBase {
           return "Waiting for disconnect to complete";
         }
       };
-      com.gemstone.gemfire.test.dunit.DistributedTestCase.waitForCriterion(waitForDisconnect, 10*1000, 100, true);
+      com.gemstone.gemfire.test.dunit.Wait.waitForCriterion(waitForDisconnect, 10*1000, 100, true);
 
       assertTrue(gfc.isClosed());
     } finally {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/76e324b5/gemfire-core/src/test/java/com/gemstone/gemfire/internal/offheap/OutOfOffHeapMemoryDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/offheap/OutOfOffHeapMemoryDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/offheap/OutOfOffHeapMemoryDUnitTest.java
index ec37780..9e13005 100755
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/offheap/OutOfOffHeapMemoryDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/offheap/OutOfOffHeapMemoryDUnitTest.java
@@ -39,7 +39,10 @@ import com.gemstone.gemfire.internal.logging.LogService;
 import com.gemstone.gemfire.internal.util.StopWatch;
 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.SerializableRunnable;
+import com.gemstone.gemfire.test.dunit.Wait;
+import com.gemstone.gemfire.test.dunit.WaitCriterion;
 
 /**
  * Test behavior of region when running out of off-heap memory.
@@ -62,7 +65,7 @@ public class OutOfOffHeapMemoryDUnitTest extends CacheTestCase {
   public void setUp() throws Exception {
     disconnectAllFromDS();
     super.setUp();
-    IgnoredException.addExpectedException(OutOfOffHeapMemoryException.class.getSimpleName());
+    IgnoredException.addIgnoredException(OutOfOffHeapMemoryException.class.getSimpleName());
   }
   
 //  public static void caseSetUp() {
@@ -90,11 +93,11 @@ public class OutOfOffHeapMemoryDUnitTest extends CacheTestCase {
         }
       }
     };
-    invokeInEveryVM(checkOrphans);
+    Invoke.invokeInEveryVM(checkOrphans);
     try {
       checkOrphans.run();
     } finally {
-      invokeInEveryVM(getClass(), "cleanup");
+      Invoke.invokeInEveryVM(getClass(), "cleanup");
       super.tearDown2();
     }
   }
@@ -163,7 +166,7 @@ public class OutOfOffHeapMemoryDUnitTest extends CacheTestCase {
         return "Waiting for cache, system and dm to close";
       }
     };
-    waitForCriterion(waitForDisconnect, 10*1000, 100, true);
+    Wait.waitForCriterion(waitForDisconnect, 10*1000, 100, true);
     
     // wait for cache instance to be nulled out
     final WaitCriterion waitForNull = new WaitCriterion() {
@@ -174,7 +177,7 @@ public class OutOfOffHeapMemoryDUnitTest extends CacheTestCase {
         return "Waiting for GemFireCacheImpl to null its instance";
       }
     };
-    waitForCriterion(waitForNull, 10*1000, 100, true);
+    Wait.waitForCriterion(waitForNull, 10*1000, 100, true);
     assertNull(GemFireCacheImpl.getInstance());
     
     // verify system was closed out due to OutOfOffHeapMemoryException
@@ -331,7 +334,7 @@ public class OutOfOffHeapMemoryDUnitTest extends CacheTestCase {
               return msg;
             }
           };
-          waitForCriterion(waitForDisconnect, 30*1000, 10, true);
+          Wait.waitForCriterion(waitForDisconnect, 30*1000, 10, true);
         }
       });
     }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/76e324b5/gemfire-core/src/test/java/com/gemstone/gemfire/internal/statistics/StatisticsDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/statistics/StatisticsDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/statistics/StatisticsDUnitTest.java
index 65457dd..1238333 100755
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/statistics/StatisticsDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/statistics/StatisticsDUnitTest.java
@@ -63,8 +63,11 @@ import com.gemstone.gemfire.internal.StatArchiveReader.StatValue;
 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.SerializableCallable;
 import com.gemstone.gemfire.test.dunit.VM;
+import com.gemstone.gemfire.test.dunit.Wait;
+import com.gemstone.gemfire.test.dunit.WaitCriterion;
 
 /**
  * Integration tests for Statistics. VM0 performs puts and VM1 receives
@@ -129,7 +132,7 @@ public class StatisticsDUnitTest extends CacheTestCase {
 
   @Override
   public void tearDown2() throws Exception {
-    invokeInEveryVM(getClass(), "cleanup");
+    Invoke.invokeInEveryVM(getClass(), "cleanup");
     disconnectAllFromDS(); // because this test enabled stat sampling!
   }
   
@@ -174,7 +177,7 @@ public class StatisticsDUnitTest extends CacheTestCase {
               return "sampler.getSampleCollector() is still null!";
             }
           };
-          waitForCriterion(waitForSampleCollector, 4*1000, 10, true);
+          Wait.waitForCriterion(waitForSampleCollector, 4*1000, 10, true);
   
           final SampleCollector sampleCollector = sampler.getSampleCollector();
           assertNotNull(sampleCollector);
@@ -231,7 +234,7 @@ public class StatisticsDUnitTest extends CacheTestCase {
             return "sampler.getSampleCollector() is still null!";
           }
         };
-        waitForCriterion(waitForSampleCollector, 2*1000, 10, true);
+        Wait.waitForCriterion(waitForSampleCollector, 2*1000, 10, true);
 
         final SampleCollector sampleCollector = sampler.getSampleCollector();
         assertNotNull(sampleCollector);
@@ -285,7 +288,7 @@ public class StatisticsDUnitTest extends CacheTestCase {
                 return rml.members + " should contain " + subMember;
               }
             };
-            waitForCriterion(wc, 4*1000, 10, true);
+            Wait.waitForCriterion(wc, 4*1000, 10, true);
             
             // publish lots of puts cycling through the NUM_KEYS
             assertEquals(0, statistics.getPuts());
@@ -332,7 +335,7 @@ public class StatisticsDUnitTest extends CacheTestCase {
                 return "Waiting for " + StatSamplerStats.SAMPLE_COUNT + " >= " + initialSampleCount + 2;
               }
             };
-            waitForCriterion(wc, 4*1000, 10, true);
+            Wait.waitForCriterion(wc, 4*1000, 10, true);
           }
         });
       }
@@ -362,7 +365,7 @@ public class StatisticsDUnitTest extends CacheTestCase {
             return "Waiting for " + StatSamplerStats.SAMPLE_COUNT + " >= " + initialSampleCount + 2;
           }
         };
-        waitForCriterion(wc, 4*1000, 10, true);
+        Wait.waitForCriterion(wc, 4*1000, 10, true);
         
         // now post total updateEvents to static
         final PubSubStats statistics = subStatsRef.get();

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/76e324b5/gemfire-core/src/test/java/com/gemstone/gemfire/internal/statistics/ValueMonitorJUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/statistics/ValueMonitorJUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/statistics/ValueMonitorJUnitTest.java
index cc76ce2..1d1a738 100755
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/statistics/ValueMonitorJUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/statistics/ValueMonitorJUnitTest.java
@@ -39,8 +39,8 @@ import com.gemstone.gemfire.StatisticsType;
 import com.gemstone.gemfire.internal.NanoTimer;
 import com.gemstone.gemfire.internal.StatisticsManager;
 import com.gemstone.gemfire.internal.statistics.StatisticsNotification.Type;
-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;
 
 import junit.framework.TestCase;
@@ -369,6 +369,6 @@ public class ValueMonitorJUnitTest {
         return "waiting for notification";
       }
     };
-    DistributedTestCase.waitForCriterion(wc, ms, interval, throwOnTimeout);
+    Wait.waitForCriterion(wc, ms, interval, throwOnTimeout);
   }
 }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/76e324b5/gemfire-core/src/test/java/com/gemstone/gemfire/management/CacheManagementDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/management/CacheManagementDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/management/CacheManagementDUnitTest.java
index 2698e2a..4509ada 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/management/CacheManagementDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/management/CacheManagementDUnitTest.java
@@ -46,9 +46,11 @@ import com.gemstone.gemfire.management.internal.ManagementConstants;
 import com.gemstone.gemfire.management.internal.SystemManagementService;
 import com.gemstone.gemfire.management.internal.NotificationHub.NotificationHubListener;
 import com.gemstone.gemfire.test.dunit.AsyncInvocation;
-import com.gemstone.gemfire.test.dunit.DistributedTestCase;
+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;
 
 import static com.jayway.awaitility.Awaitility.*;
 import static org.hamcrest.Matchers.*;
@@ -142,7 +144,7 @@ public class CacheManagementDUnitTest extends ManagementTestBase {
       String log = (String) vm.invoke(CacheManagementDUnitTest.class,
           "fetchLog");
       assertNotNull(log);
-      getLogWriter().info(
+      LogWriterSupport.getLogWriter().info(
           "<ExpectedString> Log Of Member is " + log.toString()
               + "</ExpectedString> ");
 
@@ -658,7 +660,7 @@ public class CacheManagementDUnitTest extends ManagementTestBase {
         .getMemberMXBean();
     JVMMetrics metrics = bean.showJVMMetrics();
 
-    getLogWriter().info(
+    LogWriterSupport.getLogWriter().info(
         "<ExpectedString> JVMMetrics is " + metrics.toString()
             + "</ExpectedString> ");
 
@@ -669,7 +671,7 @@ public class CacheManagementDUnitTest extends ManagementTestBase {
         .getMemberMXBean();
     OSMetrics metrics = bean.showOSMetrics();
 
-    getLogWriter().info(
+    LogWriterSupport.getLogWriter().info(
         "<ExpectedString> OSMetrics is " + metrics.toString()
             + "</ExpectedString> ");
 
@@ -683,7 +685,7 @@ public class CacheManagementDUnitTest extends ManagementTestBase {
   }
 
   public static void assertExpectedMembers(int expectedMemberCount) {
-    DistributedTestCase.waitForCriterion(new WaitCriterion() {
+    Wait.waitForCriterion(new WaitCriterion() {
       public String description() {
         return "Waiting all nodes to shutDown";
       }
@@ -710,14 +712,14 @@ public class CacheManagementDUnitTest extends ManagementTestBase {
       MemberMXBean bean = MBeanUtil.getMemberMbeanProxy(member);
       JVMMetrics metrics = bean.showJVMMetrics();
 
-      getLogWriter().info(
+      LogWriterSupport.getLogWriter().info(
           "<ExpectedString> JVMMetrics is " + metrics.toString()
               + "</ExpectedString> ");
-      getLogWriter().info(
+      LogWriterSupport.getLogWriter().info(
           "<ExpectedString> OSMetrics is " + metrics.toString()
               + "</ExpectedString> ");
       
-      getLogWriter().info(
+      LogWriterSupport.getLogWriter().info(
           "<ExpectedString> Boolean Data Check " +bean.isManager()
               + "</ExpectedString> ");
       
@@ -841,7 +843,7 @@ public class CacheManagementDUnitTest extends ManagementTestBase {
     SystemManagementService service = (SystemManagementService) getManagementService();
     final Map<ObjectName, NotificationHubListener> hubMap = service.getNotificationHub().getListenerObjectMap();
 
-    DistributedTestCase.waitForCriterion(new WaitCriterion() {
+    Wait.waitForCriterion(new WaitCriterion() {
       public String description() {
         return "Waiting for manager to register the listener";
       }
@@ -919,7 +921,7 @@ public class CacheManagementDUnitTest extends ManagementTestBase {
 
       public void run() {
 
-        DistributedTestCase.waitForCriterion(new WaitCriterion() {
+        Wait.waitForCriterion(new WaitCriterion() {
           public String description() {
             return "Waiting for all the RegionCreated notification to reach the manager " + notifList.size();
           }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/76e324b5/gemfire-core/src/test/java/com/gemstone/gemfire/management/ClientHealthStatsDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/management/ClientHealthStatsDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/management/ClientHealthStatsDUnitTest.java
index 06898a6..277e451 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/management/ClientHealthStatsDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/management/ClientHealthStatsDUnitTest.java
@@ -49,10 +49,12 @@ import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
 import com.gemstone.gemfire.test.dunit.DistributedTestCase;
 import com.gemstone.gemfire.test.dunit.Host;
 import com.gemstone.gemfire.test.dunit.IgnoredException;
+import com.gemstone.gemfire.test.dunit.LogWriterSupport;
 import com.gemstone.gemfire.test.dunit.SerializableCallable;
 import com.gemstone.gemfire.test.dunit.SerializableRunnable;
 import com.gemstone.gemfire.test.dunit.VM;
-import com.gemstone.gemfire.test.dunit.DistributedTestCase.WaitCriterion;
+import com.gemstone.gemfire.test.dunit.Wait;
+import com.gemstone.gemfire.test.dunit.WaitCriterion;
 
 /**
  * Client health stats check
@@ -102,7 +104,7 @@ public class ClientHealthStatsDUnitTest extends DistributedTestCase {
     server = host.getVM(1);
     client = host.getVM(2);
     client2 = host.getVM(3);
-    IgnoredException.addExpectedException("Connection reset");
+    IgnoredException.addIgnoredException("Connection reset");
   }
 
   public void tearDown2() throws Exception {
@@ -341,7 +343,7 @@ public class ClientHealthStatsDUnitTest extends DistributedTestCase {
         return "Did not receive last key.";
       }
     };
-    DistributedTestCase.waitForCriterion(wc, 60*1000, 500, true);
+    Wait.waitForCriterion(wc, 60*1000, 500, true);
   }
 
 
@@ -359,8 +361,8 @@ public class ClientHealthStatsDUnitTest extends DistributedTestCase {
 
       String[] clientIds = bean.getClientIds();
       assertTrue(clientIds.length == 2);
-      getLogWriter().info("<ExpectedString> ClientId-1 of the Server is  " + clientIds[0] + "</ExpectedString> ");
-      getLogWriter().info("<ExpectedString> ClientId-2 of the Server is  " + clientIds[1] + "</ExpectedString> ");
+      LogWriterSupport.getLogWriter().info("<ExpectedString> ClientId-1 of the Server is  " + clientIds[0] + "</ExpectedString> ");
+      LogWriterSupport.getLogWriter().info("<ExpectedString> ClientId-2 of the Server is  " + clientIds[1] + "</ExpectedString> ");
       
       ClientHealthStatus[] clientStatuses = bean.showAllClientStats();
 
@@ -370,15 +372,15 @@ public class ClientHealthStatsDUnitTest extends DistributedTestCase {
       ClientHealthStatus clientStatus2 = bean.showClientStats(clientIds[1]);
       assertNotNull(clientStatus1);
       assertNotNull(clientStatus2);
-      getLogWriter().info("<ExpectedString> ClientStats-1 of the Server is  " + clientStatus1 + "</ExpectedString> ");
-      getLogWriter().info("<ExpectedString> ClientStats-2 of the Server is  " + clientStatus2 + "</ExpectedString> ");
+      LogWriterSupport.getLogWriter().info("<ExpectedString> ClientStats-1 of the Server is  " + clientStatus1 + "</ExpectedString> ");
+      LogWriterSupport.getLogWriter().info("<ExpectedString> ClientStats-2 of the Server is  " + clientStatus2 + "</ExpectedString> ");
 
-      getLogWriter().info("<ExpectedString> clientStatuses " + clientStatuses + "</ExpectedString> ");
+      LogWriterSupport.getLogWriter().info("<ExpectedString> clientStatuses " + clientStatuses + "</ExpectedString> ");
       assertNotNull(clientStatuses);
       
       assertTrue(clientStatuses.length == 2);
       for (ClientHealthStatus status : clientStatuses) {
-        getLogWriter().info("<ExpectedString> ClientStats of the Server is  " + status + "</ExpectedString> ");
+        LogWriterSupport.getLogWriter().info("<ExpectedString> ClientStats of the Server is  " + status + "</ExpectedString> ");
 
       }
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/76e324b5/gemfire-core/src/test/java/com/gemstone/gemfire/management/CompositeTypeTestDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/management/CompositeTypeTestDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/management/CompositeTypeTestDUnitTest.java
index e7c11a7..54c7630 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/management/CompositeTypeTestDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/management/CompositeTypeTestDUnitTest.java
@@ -26,6 +26,8 @@ import com.gemstone.gemfire.management.internal.ManagementConstants;
 import com.gemstone.gemfire.management.internal.SystemManagementService;
 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 CompositeTypeTestDUnitTest extends ManagementTestBase {
 
@@ -117,7 +119,7 @@ public class CompositeTypeTestDUnitTest extends ManagementTestBase {
         try {
           final ObjectName objectName = new ObjectName("GemFire:service=custom,type=composite,member="+memberID);
           
-          waitForCriterion(new WaitCriterion() {
+          Wait.waitForCriterion(new WaitCriterion() {
             public String description() {
               return "Waiting for Composite Type MBean";
             }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/76e324b5/gemfire-core/src/test/java/com/gemstone/gemfire/management/DLockManagementDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/management/DLockManagementDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/management/DLockManagementDUnitTest.java
index 793526c..5523de9 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/management/DLockManagementDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/management/DLockManagementDUnitTest.java
@@ -29,8 +29,11 @@ import com.gemstone.gemfire.distributed.internal.membership.InternalDistributedM
 import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
 import com.gemstone.gemfire.management.internal.MBeanJMXAdapter;
 import com.gemstone.gemfire.management.internal.SystemManagementService;
+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;
 
 public class DLockManagementDUnitTest extends ManagementTestBase {
 
@@ -145,7 +148,7 @@ public class DLockManagementDUnitTest extends ManagementTestBase {
           RegionMXBean bean = null;
           try {
 
-            waitForCriterion(new WaitCriterion() {
+            Wait.waitForCriterion(new WaitCriterion() {
 
               LockServiceMXBean bean = null;
 
@@ -199,7 +202,7 @@ public class DLockManagementDUnitTest extends ManagementTestBase {
 
         assertNotNull(grantor);
 
-        getLogWriter().info("In identifyLockGrantor - grantor is " + grantor);
+        LogWriterSupport.getLogWriter().info("In identifyLockGrantor - grantor is " + grantor);
 
        
 
@@ -305,7 +308,7 @@ public class DLockManagementDUnitTest extends ManagementTestBase {
 
         final String LOCK_OBJECT = "lockObject_" + vm.getPid();
 
-        waitForCriterion(new WaitCriterion() {
+        Wait.waitForCriterion(new WaitCriterion() {
           DistributedLockService service = null;
 
           public String description() {
@@ -337,10 +340,10 @@ public class DLockManagementDUnitTest extends ManagementTestBase {
         assertNotNull(bean);
         String[] listHeldLock = bean.listHeldLocks();
         assertEquals(listHeldLock.length, 1);
-        getLogWriter().info("List Of Lock Object is  " + listHeldLock[0]);
+        LogWriterSupport.getLogWriter().info("List Of Lock Object is  " + listHeldLock[0]);
         Map<String, String> lockThreadMap = bean.listThreadsHoldingLock();
         assertEquals(lockThreadMap.size(), 1);
-        getLogWriter().info(
+        LogWriterSupport.getLogWriter().info(
             "List Of Lock Thread is  " + lockThreadMap.toString());
       }
     };
@@ -373,10 +376,10 @@ public class DLockManagementDUnitTest extends ManagementTestBase {
           assertNotNull(bean);
           String[] listHeldLock = bean.listHeldLocks();
           assertEquals(listHeldLock.length, 1);
-          getLogWriter().info("List Of Lock Object is  " + listHeldLock[0]);
+          LogWriterSupport.getLogWriter().info("List Of Lock Object is  " + listHeldLock[0]);
           Map<String, String> lockThreadMap = bean.listThreadsHoldingLock();
           assertEquals(lockThreadMap.size(), 1);
-          getLogWriter().info(
+          LogWriterSupport.getLogWriter().info(
               "List Of Lock Thread is  " + lockThreadMap.toString());
         }
 
@@ -432,7 +435,7 @@ public class DLockManagementDUnitTest extends ManagementTestBase {
         final ManagementService service = getManagementService();
         if (expectedMembers == 0) {
           try {
-            waitForCriterion(new WaitCriterion() {
+            Wait.waitForCriterion(new WaitCriterion() {
 
               DistributedLockServiceMXBean bean = null;
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/76e324b5/gemfire-core/src/test/java/com/gemstone/gemfire/management/DiskManagementDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/management/DiskManagementDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/management/DiskManagementDUnitTest.java
index b9f49ab..fb2b35c 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/management/DiskManagementDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/management/DiskManagementDUnitTest.java
@@ -45,6 +45,8 @@ import com.gemstone.gemfire.test.dunit.AsyncInvocation;
 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;
 
 /**
  * Test cases to cover all test cases which pertains to disk from Management
@@ -176,9 +178,9 @@ public class DiskManagementDUnitTest extends ManagementTestBase {
     VM vm1 = getManagedNodeList().get(1);
     VM vm2 = getManagedNodeList().get(2);
     
-    getLogWriter().info("Creating region in VM0");
+    com.gemstone.gemfire.test.dunit.LogWriterSupport.getLogWriter().info("Creating region in VM0");
     createPersistentRegion(vm0);
-    getLogWriter().info("Creating region in VM1");
+    com.gemstone.gemfire.test.dunit.LogWriterSupport.getLogWriter().info("Creating region in VM1");
     createPersistentRegion(vm1);
 
     putAnEntry(vm0);
@@ -197,12 +199,12 @@ public class DiskManagementDUnitTest extends ManagementTestBase {
       }
     });
 
-    getLogWriter().info("closing region in vm0");
+    com.gemstone.gemfire.test.dunit.LogWriterSupport.getLogWriter().info("closing region in vm0");
     closeRegion(vm0);
 
     updateTheEntry(vm1);
 
-    getLogWriter().info("closing region in vm1");
+    com.gemstone.gemfire.test.dunit.LogWriterSupport.getLogWriter().info("closing region in vm1");
     closeRegion(vm1);
     AsyncInvocation future = createPersistentRegionAsync(vm0);
     waitForBlockedInitialization(vm0);
@@ -217,14 +219,14 @@ public class DiskManagementDUnitTest extends ManagementTestBase {
         DistributedSystemMXBean bean = service.getDistributedSystemMXBean();
         PersistentMemberDetails[] missingDiskStores = bean
         .listMissingDiskStores();
-        getLogWriter().info("waiting members=" + missingDiskStores);
+        com.gemstone.gemfire.test.dunit.LogWriterSupport.getLogWriter().info("waiting members=" + missingDiskStores);
         assertNotNull(missingDiskStores);
         assertEquals(1, missingDiskStores.length);
 
         for (PersistentMemberDetails id : missingDiskStores) {
-          getLogWriter().info("Missing DiskStoreID is =" + id.getDiskStoreId());
-          getLogWriter().info("Missing Host is =" + id.getHost());
-          getLogWriter().info("Missing Directory is =" + id.getDirectory());
+          com.gemstone.gemfire.test.dunit.LogWriterSupport.getLogWriter().info("Missing DiskStoreID is =" + id.getDiskStoreId());
+          com.gemstone.gemfire.test.dunit.LogWriterSupport.getLogWriter().info("Missing Host is =" + id.getHost());
+          com.gemstone.gemfire.test.dunit.LogWriterSupport.getLogWriter().info("Missing Directory is =" + id.getDirectory());
 
           try {
             bean.revokeMissingDiskStores(id.getDiskStoreId());
@@ -377,11 +379,11 @@ public class DiskManagementDUnitTest extends ManagementTestBase {
         Cache cache = getCache();
         Region region = cache.getRegion(REGION_NAME);
         DiskRegion dr = ((LocalRegion) region).getDiskRegion();
-        getLogWriter().info("putting key1");
+        com.gemstone.gemfire.test.dunit.LogWriterSupport.getLogWriter().info("putting key1");
         region.put("key1", "value1");
-        getLogWriter().info("putting key2");
+        com.gemstone.gemfire.test.dunit.LogWriterSupport.getLogWriter().info("putting key2");
         region.put("key2", "value2");
-        getLogWriter().info("removing key2");
+        com.gemstone.gemfire.test.dunit.LogWriterSupport.getLogWriter().info("removing key2");
         region.remove("key2");
         // now that it is compactable the following forceCompaction should
         // go ahead and do a roll and compact it.
@@ -413,7 +415,7 @@ public class DiskManagementDUnitTest extends ManagementTestBase {
 
         assertTrue(compactedDiskStores.length > 0);
         for (int i = 0; i < compactedDiskStores.length; i++) {
-          getLogWriter().info(
+          com.gemstone.gemfire.test.dunit.LogWriterSupport.getLogWriter().info(
               "<ExpectedString> Compacted Store " + i + " "
                   + compactedDiskStores[i] + "</ExpectedString> ");
         }
@@ -463,13 +465,13 @@ public class DiskManagementDUnitTest extends ManagementTestBase {
             String[] allDisks = bean.listDiskStores(true);
             assertNotNull(allDisks);
             List<String> listString = Arrays.asList(allDisks);
-            getLogWriter().info(
+            com.gemstone.gemfire.test.dunit.LogWriterSupport.getLogWriter().info(
                 "<ExpectedString> Remote All Disk Stores Are  "
                     + listString.toString() + "</ExpectedString> ");
             String[] compactedDiskStores = bean.compactAllDiskStores();
             assertTrue(compactedDiskStores.length > 0);
             for (int i = 0; i < compactedDiskStores.length; i++) {
-              getLogWriter().info(
+              com.gemstone.gemfire.test.dunit.LogWriterSupport.getLogWriter().info(
                   "<ExpectedString> Remote Compacted Store " + i + " "
                       + compactedDiskStores[i] + "</ExpectedString> ");
             }
@@ -578,7 +580,7 @@ public class DiskManagementDUnitTest extends ManagementTestBase {
     vm.invoke(new SerializableRunnable() {
 
       public void run() {
-        waitForCriterion(new WaitCriterion() {
+        Wait.waitForCriterion(new WaitCriterion() {
 
           public String description() {
             return "Waiting to blocked waiting for another persistent member to come online";

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/76e324b5/gemfire-core/src/test/java/com/gemstone/gemfire/management/DistributedSystemDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/management/DistributedSystemDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/management/DistributedSystemDUnitTest.java
index 262033a..a7aa187 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/management/DistributedSystemDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/management/DistributedSystemDUnitTest.java
@@ -50,10 +50,13 @@ import com.gemstone.gemfire.management.internal.SystemManagementService;
 import com.gemstone.gemfire.management.internal.beans.MemberMBean;
 import com.gemstone.gemfire.management.internal.beans.SequenceNumber;
 import com.gemstone.gemfire.test.dunit.IgnoredException;
+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;
 
 /**
  * Distributed System tests
@@ -206,7 +209,7 @@ public class DistributedSystemDUnitTest extends ManagementTestBase {
 
         public Object call() throws Exception {
           
-          waitForCriterion(new WaitCriterion() {
+          Wait.waitForCriterion(new WaitCriterion() {
             public String description() {
               return "Waiting for all alert Listener to register with managed node";
             }
@@ -285,7 +288,7 @@ public class DistributedSystemDUnitTest extends ManagementTestBase {
             ManagementService service = getManagementService();
             final DistributedSystemMXBean bean = service.getDistributedSystemMXBean();
             
-            waitForCriterion(new WaitCriterion() {
+            Wait.waitForCriterion(new WaitCriterion() {
               public String description() {
                 return "Waiting for all members to send their initial Data";
               }
@@ -305,7 +308,7 @@ public class DistributedSystemDUnitTest extends ManagementTestBase {
                     null);
                 notificationListenerMap.put(objectName, listener);
               } catch (InstanceNotFoundException e) {
-                getLogWriter().error(e);
+                LogWriterSupport.getLogWriter().error(e);
               }
             }
           }
@@ -360,7 +363,7 @@ public class DistributedSystemDUnitTest extends ManagementTestBase {
 
       public void run() {
 
-        waitForCriterion(new WaitCriterion() {
+        Wait.waitForCriterion(new WaitCriterion() {
           public String description() {
             return "Waiting for all Notifications to reach the Managing Node";
           }
@@ -384,9 +387,9 @@ public class DistributedSystemDUnitTest extends ManagementTestBase {
           try {
             mbeanServer.removeNotificationListener(objectName, listener);
           } catch (ListenerNotFoundException e) {
-            getLogWriter().error(e);
+            LogWriterSupport.getLogWriter().error(e);
           } catch (InstanceNotFoundException e) {
-            getLogWriter().error(e);
+            LogWriterSupport.getLogWriter().error(e);
           }
         }
 
@@ -431,7 +434,7 @@ public class DistributedSystemDUnitTest extends ManagementTestBase {
         ManagementService service = getManagementService();
         final DistributedSystemMXBean bean = service.getDistributedSystemMXBean();
         
-        waitForCriterion(new WaitCriterion() {
+        Wait.waitForCriterion(new WaitCriterion() {
           public String description() {
             return "Waiting for all members to send their initial Data";
           }
@@ -451,7 +454,7 @@ public class DistributedSystemDUnitTest extends ManagementTestBase {
           try {
             mbeanServer.removeNotificationListener(objectName, listener);
           } catch (InstanceNotFoundException e) {
-            getLogWriter().error(e);
+            LogWriterSupport.getLogWriter().error(e);
           } catch (ListenerNotFoundException e) {
             // TODO: apparently there is never a notification listener on any these mbeans at this point 
             // fix this test so it doesn't hit these unexpected exceptions -- getLogWriter().error(e);
@@ -481,7 +484,7 @@ public class DistributedSystemDUnitTest extends ManagementTestBase {
             } catch (ListenerNotFoundException e) {
               // Expected Exception Do nothing
             } catch (InstanceNotFoundException e) {
-              getLogWriter().error(e);
+              LogWriterSupport.getLogWriter().error(e);
             }
           }
         }
@@ -564,7 +567,7 @@ public class DistributedSystemDUnitTest extends ManagementTestBase {
 
         public Object call() throws Exception {
           final AlertNotifListener nt = AlertNotifListener.getInstance();
-          waitForCriterion(new WaitCriterion() {
+          Wait.waitForCriterion(new WaitCriterion() {
             public String description() {
               return "Waiting for all alerts to reach the Managing Node";
             }
@@ -615,7 +618,7 @@ public class DistributedSystemDUnitTest extends ManagementTestBase {
       vm1.invoke(new SerializableCallable("Warning level Alerts") {
 
         public Object call() throws Exception {
-          final IgnoredException warnEx = IgnoredException.addExpectedException(WARNING_LEVEL_MESSAGE);
+          final IgnoredException warnEx = IgnoredException.addIgnoredException(WARNING_LEVEL_MESSAGE);
           logger.warn(WARNING_LEVEL_MESSAGE);
           warnEx.remove();
           return null;
@@ -649,7 +652,7 @@ public class DistributedSystemDUnitTest extends ManagementTestBase {
         public Object call() throws Exception {
           // add expected exception strings         
           
-          final IgnoredException severeEx = IgnoredException.addExpectedException(SEVERE_LEVEL_MESSAGE);
+          final IgnoredException severeEx = IgnoredException.addIgnoredException(SEVERE_LEVEL_MESSAGE);
           logger.fatal(SEVERE_LEVEL_MESSAGE);
           severeEx.remove();
           return null;
@@ -707,7 +710,7 @@ public class DistributedSystemDUnitTest extends ManagementTestBase {
           final DistributedSystemMXBean bean = service.getDistributedSystemMXBean();
           assertNotNull(service.getDistributedSystemMXBean());
           
-          waitForCriterion(new WaitCriterion() {
+          Wait.waitForCriterion(new WaitCriterion() {
             public String description() {
               return "Waiting All members to intitialize DistributedSystemMBean expect 5 but found " + bean.getMemberCount();
             }
@@ -730,10 +733,10 @@ public class DistributedSystemDUnitTest extends ManagementTestBase {
           Iterator<DistributedMember> memberIt = otherMemberSet.iterator();
           while (memberIt.hasNext()) {
             DistributedMember member = memberIt.next();
-            getLogWriter().info(
+            LogWriterSupport.getLogWriter().info(
                 "JVM Metrics For Member " + member.getId() + ":"
                     + bean.showJVMMetrics(member.getId()));
-            getLogWriter().info(
+            LogWriterSupport.getLogWriter().info(
                 "OS Metrics For Member " + member.getId() + ":"
                     + bean.showOSMetrics(member.getId()));
           }
@@ -779,7 +782,7 @@ public class DistributedSystemDUnitTest extends ManagementTestBase {
           DistributedSystemMXBean bean = service.getDistributedSystemMXBean();
           assertNotNull(service.getDistributedSystemMXBean());
           bean.shutDownAllMembers();
-          staticPause(2000);
+          Wait.staticPause(2000);
           assertEquals(
               cache.getDistributedSystem().getAllOtherMembers().size(), 1);
           return null;
@@ -806,7 +809,7 @@ public class DistributedSystemDUnitTest extends ManagementTestBase {
           waitForAllMembers(4);
           
           for(int i =0; i< bean.listMemberObjectNames().length ; i++){
-            getLogWriter().info(
+            LogWriterSupport.getLogWriter().info(
                 "ObjectNames Of the Mmeber" + bean.listMemberObjectNames()[i] );
           }
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/76e324b5/gemfire-core/src/test/java/com/gemstone/gemfire/management/LocatorManagementDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/management/LocatorManagementDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/management/LocatorManagementDUnitTest.java
index 12b60e7..8444047 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/management/LocatorManagementDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/management/LocatorManagementDUnitTest.java
@@ -33,8 +33,11 @@ import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
 import com.gemstone.gemfire.management.internal.ManagementConstants;
 import com.gemstone.gemfire.test.dunit.Assert;
 import com.gemstone.gemfire.test.dunit.Host;
+import com.gemstone.gemfire.test.dunit.LogWriterSupport;
 import com.gemstone.gemfire.test.dunit.SerializableCallable;
 import com.gemstone.gemfire.test.dunit.VM;
+import com.gemstone.gemfire.test.dunit.Wait;
+import com.gemstone.gemfire.test.dunit.WaitCriterion;
 
 
 /**
@@ -164,7 +167,7 @@ public class LocatorManagementDUnitTest extends ManagementTestBase {
         props.setProperty(DistributionConfig.MCAST_PORT_NAME,"0");
         
         props.setProperty(DistributionConfig.LOCATORS_NAME, "");
-        props.setProperty(DistributionConfig.LOG_LEVEL_NAME, getDUnitLogLevel());
+        props.setProperty(DistributionConfig.LOG_LEVEL_NAME, LogWriterSupport.getDUnitLogLevel());
 
         InetAddress bindAddr = null;
         try {
@@ -226,8 +229,8 @@ public class LocatorManagementDUnitTest extends ManagementTestBase {
         LocatorMXBean bean = service.getLocalLocatorMXBean();
         assertNotNull(bean);
         assertEquals(locPort, bean.getPort());
-        getLogWriter().info("Log of Locator" + bean.viewLog());
-        getLogWriter().info("BindAddress" + bean.getBindAddress());
+        LogWriterSupport.getLogWriter().info("Log of Locator" + bean.viewLog());
+        LogWriterSupport.getLogWriter().info("BindAddress" + bean.getBindAddress());
         assertEquals(isPeer, bean.isPeerLocator());
         return null;
       }
@@ -252,8 +255,8 @@ public class LocatorManagementDUnitTest extends ManagementTestBase {
         LocatorMXBean bean = MBeanUtil.getLocatorMbeanProxy(member);
         assertNotNull(bean);
 
-        getLogWriter().info("Log of Locator" + bean.viewLog());
-        getLogWriter().info("BindAddress" + bean.getBindAddress());
+        LogWriterSupport.getLogWriter().info("Log of Locator" + bean.viewLog());
+        LogWriterSupport.getLogWriter().info("BindAddress" + bean.getBindAddress());
 
         return null;
       }
@@ -279,7 +282,7 @@ public class LocatorManagementDUnitTest extends ManagementTestBase {
         final LocatorMXBean bean = service.getLocalLocatorMXBean();
         assertNotNull(bean);
 
-        waitForCriterion(new WaitCriterion() {
+        Wait.waitForCriterion(new WaitCriterion() {
 
           public String description() {
             return "Waiting for the managers List";
@@ -318,7 +321,7 @@ public class LocatorManagementDUnitTest extends ManagementTestBase {
         final LocatorMXBean bean = service.getLocalLocatorMXBean();
         assertNotNull(bean);
 
-        waitForCriterion(new WaitCriterion() {
+        Wait.waitForCriterion(new WaitCriterion() {
 
           public String description() {
             return "Waiting for the Willing managers List";

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/76e324b5/gemfire-core/src/test/java/com/gemstone/gemfire/management/MBeanUtil.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/management/MBeanUtil.java b/gemfire-core/src/test/java/com/gemstone/gemfire/management/MBeanUtil.java
index 171204c..af085b3 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/management/MBeanUtil.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/management/MBeanUtil.java
@@ -37,7 +37,9 @@ import com.gemstone.gemfire.management.internal.MBeanJMXAdapter;
 import com.gemstone.gemfire.management.internal.ManagementConstants;
 import com.gemstone.gemfire.management.internal.SystemManagementService;
 import com.gemstone.gemfire.test.dunit.DistributedTestCase;
-import com.gemstone.gemfire.test.dunit.DistributedTestCase.WaitCriterion;
+import com.gemstone.gemfire.test.dunit.LogWriterSupport;
+import com.gemstone.gemfire.test.dunit.Wait;
+import com.gemstone.gemfire.test.dunit.WaitCriterion;
 
 /**
  * Utility test class to get various proxies
@@ -66,7 +68,7 @@ public class MBeanUtil {
     final SystemManagementService service = (SystemManagementService) ManagementTestBase
         .getManagementService();
     final ObjectName memberMBeanName = service.getMemberMBeanName(member);
-    DistributedTestCase.waitForCriterion(new WaitCriterion() {
+    Wait.waitForCriterion(new WaitCriterion() {
       MemberMXBean bean = null;
 
       public String description() {
@@ -110,7 +112,7 @@ public class MBeanUtil {
     final ObjectName cacheServerMBeanName = service
         .getCacheServerMBeanName(port,member);
 
-    DistributedTestCase.waitForCriterion(new WaitCriterion() {
+    Wait.waitForCriterion(new WaitCriterion() {
       CacheServerMXBean bean = null;
 
       public String description() {
@@ -159,7 +161,7 @@ public class MBeanUtil {
     final ObjectName lockServiceMBeanName = service.getLockServiceMBeanName(
         member, lockServiceName);
 
-    DistributedTestCase.waitForCriterion(new WaitCriterion() {
+    Wait.waitForCriterion(new WaitCriterion() {
       LockServiceMXBean bean = null;
 
       public String description() {
@@ -208,7 +210,7 @@ public class MBeanUtil {
     final ObjectName regionMBeanName = service.getRegionMBeanName(
         member, regionPath);
     
-    DistributedTestCase.waitForCriterion(new WaitCriterion(){ 
+    Wait.waitForCriterion(new WaitCriterion(){ 
       
       RegionMXBean bean = null;
       public String description() {
@@ -258,7 +260,7 @@ public class MBeanUtil {
 
     final ObjectName senderMBeanName = service.getGatewaySenderMBeanName(member, gatwaySenderId);
 
-    DistributedTestCase.waitForCriterion(new WaitCriterion() {
+    Wait.waitForCriterion(new WaitCriterion() {
 
       GatewaySenderMXBean bean = null;
 
@@ -310,7 +312,7 @@ public class MBeanUtil {
     final ObjectName queueMBeanName = service.getAsyncEventQueueMBeanName(
         member, queueId);
 
-    DistributedTestCase.waitForCriterion(new WaitCriterion() {
+    Wait.waitForCriterion(new WaitCriterion() {
 
       AsyncEventQueueMXBean bean = null;
 
@@ -358,7 +360,7 @@ public class MBeanUtil {
 
     final ObjectName receiverMBeanName = service.getGatewayReceiverMBeanName(member);
 
-    DistributedTestCase.waitForCriterion(new WaitCriterion() {
+    Wait.waitForCriterion(new WaitCriterion() {
 
       GatewayReceiverMXBean bean = null;
 
@@ -406,7 +408,7 @@ public class MBeanUtil {
     final ManagementService service = ManagementTestBase
         .getManagementService();
 
-    DistributedTestCase.waitForCriterion(new WaitCriterion() {
+    Wait.waitForCriterion(new WaitCriterion() {
 
       DistributedRegionMXBean bean = null;
 
@@ -444,7 +446,7 @@ public class MBeanUtil {
 
     final ManagementService service = ManagementTestBase
         .getManagementService();
-    DistributedTestCase.waitForCriterion(new WaitCriterion() {
+    Wait.waitForCriterion(new WaitCriterion() {
 
       DistributedLockServiceMXBean bean = null;
 
@@ -483,7 +485,7 @@ public class MBeanUtil {
 
     final ObjectName locatorMBeanName = service.getLocatorMBeanName(member);
 
-    DistributedTestCase.waitForCriterion(new WaitCriterion() {
+    Wait.waitForCriterion(new WaitCriterion() {
 
       LocatorMXBean bean = null;
 
@@ -536,7 +538,7 @@ public class MBeanUtil {
       try {
         propertyName = attributeInfo.getName();
         propertyValue = mbeanServer.getAttribute(objName, propertyName);
-        DistributedTestCase.getLogWriter().info(
+        LogWriterSupport.getLogWriter().info(
             "<ExpectedString> " + propertyName + " = " + propertyValue
                 + "</ExpectedString> ");
       } catch (Exception e) {



Mime
View raw message