geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kl...@apache.org
Subject [23/27] incubator-geode git commit: GEODE 773 rough draft
Date Tue, 26 Jan 2016 00:49:33 GMT
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/e2f18f97/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/dunit/SelectStarQueryDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/dunit/SelectStarQueryDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/dunit/SelectStarQueryDUnitTest.java
index b943aca..59cc096 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/dunit/SelectStarQueryDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/dunit/SelectStarQueryDUnitTest.java
@@ -40,7 +40,9 @@ import com.gemstone.gemfire.internal.AvailablePortHelper;
 import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
 import com.gemstone.gemfire.internal.cache.VMCachedDeserializable;
 import com.gemstone.gemfire.pdx.PdxInstance;
+import com.gemstone.gemfire.test.dunit.Assert;
 import com.gemstone.gemfire.test.dunit.Host;
+import com.gemstone.gemfire.test.dunit.NetworkSupport;
 import com.gemstone.gemfire.test.dunit.SerializableCallable;
 import com.gemstone.gemfire.test.dunit.VM;
 
@@ -116,9 +118,9 @@ public class SelectStarQueryDUnitTest extends CacheTestCase {
       @Override
       public Object call() throws Exception {
         ClientCacheFactory cf = new ClientCacheFactory();
-        cf.addPoolServer(getServerHostName(server1.getHost()), port1);
-        cf.addPoolServer(getServerHostName(server2.getHost()), port2);
-        cf.addPoolServer(getServerHostName(server3.getHost()), port3);
+        cf.addPoolServer(NetworkSupport.getServerHostName(server1.getHost()), port1);
+        cf.addPoolServer(NetworkSupport.getServerHostName(server2.getHost()), port2);
+        cf.addPoolServer(NetworkSupport.getServerHostName(server3.getHost()), port3);
         ClientCache cache = getClientCache(cf);
         cache.createClientRegionFactory(ClientRegionShortcut.CACHING_PROXY)
             .create(regName);
@@ -149,7 +151,7 @@ public class SelectStarQueryDUnitTest extends CacheTestCase {
           localQS = ((ClientCache) getCache()).getLocalQueryService();
           remoteQS = ((ClientCache) getCache()).getQueryService();
         } catch (Exception e) {
-          fail("Exception getting query service ", e);
+          Assert.fail("Exception getting query service ", e);
         }
         SelectResults[][] sr = new SelectResults[1][2];
         SelectResults res = null;
@@ -161,7 +163,7 @@ public class SelectStarQueryDUnitTest extends CacheTestCase {
             sr[0][1] = res;
             CacheUtils.compareResultsOfWithAndWithoutIndex(sr);
           } catch (Exception e) {
-            fail("Error executing query: " + queries[i], e);
+            Assert.fail("Error executing query: " + queries[i], e);
           }
           assertEquals(resultSize[i], res.size());
           if (i == 3) {
@@ -215,14 +217,14 @@ public class SelectStarQueryDUnitTest extends CacheTestCase {
         try {
           qs = getCache().getQueryService();
         } catch (Exception e) {
-          fail("Exception getting query service ", e);
+          Assert.fail("Exception getting query service ", e);
         }
         SelectResults res = null;
         for (int i = 0; i < queries.length; i++) {
           try {
             res = (SelectResults) qs.newQuery(queries[i]).execute();
           } catch (Exception e) {
-            fail("Error executing query: " + queries[i], e);
+            Assert.fail("Error executing query: " + queries[i], e);
           }
           assertEquals(resultSize[i], res.size());
           if (i == 3) {
@@ -288,7 +290,7 @@ public class SelectStarQueryDUnitTest extends CacheTestCase {
       @Override
       public Object call() throws Exception {
         ClientCacheFactory cf = new ClientCacheFactory();
-        cf.addPoolServer(getServerHostName(server1.getHost()), port1);
+        cf.addPoolServer(NetworkSupport.getServerHostName(server1.getHost()), port1);
         ClientCache cache = getClientCache(cf);
         cache.createClientRegionFactory(ClientRegionShortcut.CACHING_PROXY)
             .create(regName);
@@ -323,7 +325,7 @@ public class SelectStarQueryDUnitTest extends CacheTestCase {
           localQS = ((ClientCache) getCache()).getLocalQueryService();
           remoteQS = ((ClientCache) getCache()).getQueryService();
         } catch (Exception e) {
-          fail("Exception getting query service ", e);
+          Assert.fail("Exception getting query service ", e);
         }
         SelectResults res = null;
         SelectResults[][] sr = new SelectResults[1][2];
@@ -338,7 +340,7 @@ public class SelectStarQueryDUnitTest extends CacheTestCase {
             sr[0][1] = res;
             CacheUtils.compareResultsOfWithAndWithoutIndex(sr);
           } catch (Exception e) {
-            fail("Error executing query: " + multipleRegionQueries[i], e);
+            Assert.fail("Error executing query: " + multipleRegionQueries[i], e);
           }
           assertEquals(resultSize2[i], res.size());
           if (i == 4) {
@@ -395,7 +397,7 @@ public class SelectStarQueryDUnitTest extends CacheTestCase {
         try {
           qs = getCache().getQueryService();
         } catch (Exception e) {
-          fail("Exception getting query service ", e);
+          Assert.fail("Exception getting query service ", e);
         }
         SelectResults res = null;
         for (int i = 0; i < multipleRegionQueries.length; i++) {
@@ -403,7 +405,7 @@ public class SelectStarQueryDUnitTest extends CacheTestCase {
             res = (SelectResults) qs.newQuery(multipleRegionQueries[i])
                 .execute();
           } catch (Exception e) {
-            fail("Error executing query: " + multipleRegionQueries[i], e);
+            Assert.fail("Error executing query: " + multipleRegionQueries[i], e);
           }
           assertEquals(resultSize2[i], res.size());
           if (i == 4) {
@@ -488,7 +490,7 @@ public class SelectStarQueryDUnitTest extends CacheTestCase {
       @Override
       public Object call() throws Exception {
         ClientCacheFactory cf = new ClientCacheFactory();
-        cf.addPoolServer(getServerHostName(server1.getHost()), port);
+        cf.addPoolServer(NetworkSupport.getServerHostName(server1.getHost()), port);
         ClientCache cache = getClientCache(cf);
         cache.createClientRegionFactory(ClientRegionShortcut.CACHING_PROXY)
             .create(regName);
@@ -519,7 +521,7 @@ public class SelectStarQueryDUnitTest extends CacheTestCase {
           localQS = ((ClientCache) getCache()).getLocalQueryService();
           remoteQS = ((ClientCache) getCache()).getQueryService();
         } catch (Exception e) {
-          fail("Exception getting query service ", e);
+          Assert.fail("Exception getting query service ", e);
         }
         SelectResults res = null;
         SelectResults[][] sr = new SelectResults[1][2];
@@ -532,7 +534,7 @@ public class SelectStarQueryDUnitTest extends CacheTestCase {
             sr[0][1] = res;
             CacheUtils.compareResultsOfWithAndWithoutIndex(sr);
           } catch (Exception e) {
-            fail("Error executing query: " + queries[i], e);
+            Assert.fail("Error executing query: " + queries[i], e);
           }
           assertEquals(resultSize[i], res.size());
           if (i == 3) {
@@ -583,14 +585,14 @@ public class SelectStarQueryDUnitTest extends CacheTestCase {
         try {
           qs = getCache().getQueryService();
         } catch (Exception e) {
-          fail("Exception getting query service ", e);
+          Assert.fail("Exception getting query service ", e);
         }
         SelectResults res = null;
         for (int i = 0; i < 6; i++) {
           try {
             res = (SelectResults) qs.newQuery(queries[i]).execute();
           } catch (Exception e) {
-            fail("Error executing query: " + queries[i], e);
+            Assert.fail("Error executing query: " + queries[i], e);
           }
           assertEquals(resultSize[i], res.size());
           if (i == 3) {
@@ -661,9 +663,9 @@ public class SelectStarQueryDUnitTest extends CacheTestCase {
       @Override
       public Object call() throws Exception {
         ClientCacheFactory cf = new ClientCacheFactory();
-        cf.addPoolServer(getServerHostName(server1.getHost()), port1);
-        cf.addPoolServer(getServerHostName(server2.getHost()), port2);
-        cf.addPoolServer(getServerHostName(server3.getHost()), port3);
+        cf.addPoolServer(NetworkSupport.getServerHostName(server1.getHost()), port1);
+        cf.addPoolServer(NetworkSupport.getServerHostName(server2.getHost()), port2);
+        cf.addPoolServer(NetworkSupport.getServerHostName(server3.getHost()), port3);
         ClientCache cache = getClientCache(cf);
         cache.createClientRegionFactory(ClientRegionShortcut.CACHING_PROXY)
             .create(regName);
@@ -694,7 +696,7 @@ public class SelectStarQueryDUnitTest extends CacheTestCase {
           localQS = ((ClientCache) getCache()).getLocalQueryService();
           remoteQS = ((ClientCache) getCache()).getQueryService();
         } catch (Exception e) {
-          fail("Exception getting query service ", e);
+          Assert.fail("Exception getting query service ", e);
         }
         SelectResults res = null;
         SelectResults[][] sr = new SelectResults[1][2];
@@ -707,7 +709,7 @@ public class SelectStarQueryDUnitTest extends CacheTestCase {
             sr[0][1] = res;
             CacheUtils.compareResultsOfWithAndWithoutIndex(sr);
           } catch (Exception e) {
-            fail("Error executing query: " + queries[i], e);
+            Assert.fail("Error executing query: " + queries[i], e);
           }
           assertEquals(resultSize[i], res.size());
           if (i == 3) {
@@ -758,14 +760,14 @@ public class SelectStarQueryDUnitTest extends CacheTestCase {
         try {
           qs = getCache().getQueryService();
         } catch (Exception e) {
-          fail("Exception getting query service ", e);
+          Assert.fail("Exception getting query service ", e);
         }
         SelectResults res = null;
         for (int i = 0; i < 6; i++) {
           try {
             res = (SelectResults) qs.newQuery(queries[i]).execute();
           } catch (Exception e) {
-            fail("Error executing query: " + queries[i], e);
+            Assert.fail("Error executing query: " + queries[i], e);
           }
           assertEquals(resultSize[i], res.size());
           if (i == 3) {
@@ -817,7 +819,7 @@ public class SelectStarQueryDUnitTest extends CacheTestCase {
       @Override
       public Object call() throws Exception {
         ClientCacheFactory cf = new ClientCacheFactory();
-        cf.addPoolServer(getServerHostName(server1.getHost()), port1);
+        cf.addPoolServer(NetworkSupport.getServerHostName(server1.getHost()), port1);
         ClientCache cache = getClientCache(cf);
         cache.createClientRegionFactory(ClientRegionShortcut.CACHING_PROXY)
             .create(regName);
@@ -850,7 +852,7 @@ public class SelectStarQueryDUnitTest extends CacheTestCase {
           qs = getCache().getQueryService();
           qs.createIndex("status", "status", "/" + regName);
         } catch (Exception e) {
-          fail("Exception getting query service ", e);
+          Assert.fail("Exception getting query service ", e);
         }
 
         return null;
@@ -868,7 +870,7 @@ public class SelectStarQueryDUnitTest extends CacheTestCase {
           localQS = ((ClientCache) getCache()).getLocalQueryService();
           remoteQS = ((ClientCache) getCache()).getQueryService();
         } catch (Exception e) {
-          fail("Exception getting query service ", e);
+          Assert.fail("Exception getting query service ", e);
         }
         SelectResults res = null;
         SelectResults[][] sr = new SelectResults[1][2];
@@ -883,7 +885,7 @@ public class SelectStarQueryDUnitTest extends CacheTestCase {
             sr[0][1] = res;
             CacheUtils.compareResultsOfWithAndWithoutIndex(sr);
           } catch (Exception e) {
-            fail("Error executing query: " + multipleRegionQueries[i], e);
+            Assert.fail("Error executing query: " + multipleRegionQueries[i], e);
           }
           assertEquals(resultSize2[i], res.size());
           if (i == 4) {
@@ -926,7 +928,7 @@ public class SelectStarQueryDUnitTest extends CacheTestCase {
           qs = getCache().getQueryService();
           qs.createIndex("status", "status", "/" + regName2);
         } catch (Exception e) {
-          fail("Exception getting query service ", e);
+          Assert.fail("Exception getting query service ", e);
         }
 
         return null;
@@ -944,7 +946,7 @@ public class SelectStarQueryDUnitTest extends CacheTestCase {
           localQS = ((ClientCache) getCache()).getLocalQueryService();
           remoteQS = ((ClientCache) getCache()).getQueryService();
         } catch (Exception e) {
-          fail("Exception getting query service ", e);
+          Assert.fail("Exception getting query service ", e);
         }
         SelectResults res = null;
         SelectResults[][] sr = new SelectResults[1][2];
@@ -959,7 +961,7 @@ public class SelectStarQueryDUnitTest extends CacheTestCase {
             sr[0][1] = res;
             CacheUtils.compareResultsOfWithAndWithoutIndex(sr);
           } catch (Exception e) {
-            fail("Error executing query: " + multipleRegionQueries[i], e);
+            Assert.fail("Error executing query: " + multipleRegionQueries[i], e);
           }
           assertEquals(resultSize2[i], res.size());
           if (i == 4) {
@@ -1019,7 +1021,7 @@ public class SelectStarQueryDUnitTest extends CacheTestCase {
       @Override
       public Object call() throws Exception {
         ClientCacheFactory cf = new ClientCacheFactory();
-        cf.addPoolServer(getServerHostName(server1.getHost()), port1);
+        cf.addPoolServer(NetworkSupport.getServerHostName(server1.getHost()), port1);
         ClientCache cache = getClientCache(cf);
         cache.createClientRegionFactory(ClientRegionShortcut.CACHING_PROXY)
             .create(regName);
@@ -1050,7 +1052,7 @@ public class SelectStarQueryDUnitTest extends CacheTestCase {
           localQS = ((ClientCache) getCache()).getLocalQueryService();
           remoteQS = ((ClientCache) getCache()).getQueryService();
         } catch (Exception e) {
-          fail("Exception getting query service ", e);
+          Assert.fail("Exception getting query service ", e);
         }
         SelectResults res = null;
         SelectResults[][] sr = new SelectResults[1][2];
@@ -1063,7 +1065,7 @@ public class SelectStarQueryDUnitTest extends CacheTestCase {
             sr[0][1] = res;
             CacheUtils.compareResultsOfWithAndWithoutIndex(sr);
           } catch (Exception e) {
-            fail("Error executing query: " + queries[i], e);
+            Assert.fail("Error executing query: " + queries[i], e);
           }
           assertEquals(resultSize[i], res.size());
           if (i == 3) {
@@ -1118,14 +1120,14 @@ public class SelectStarQueryDUnitTest extends CacheTestCase {
         try {
           qs = getCache().getQueryService();
         } catch (Exception e) {
-          fail("Exception getting query service ", e);
+          Assert.fail("Exception getting query service ", e);
         }
         SelectResults res = null;
         for (int i = 0; i < queries.length; i++) {
           try {
             res = (SelectResults) qs.newQuery(queries[i]).execute();
           } catch (Exception e) {
-            fail("Error executing query: " + queries[i], e);
+            Assert.fail("Error executing query: " + queries[i], e);
           }
           assertEquals(resultSize[i], res.size());
           if (i == 3) {
@@ -1174,14 +1176,14 @@ public class SelectStarQueryDUnitTest extends CacheTestCase {
         try {
           qs = getCache().getQueryService();
         } catch (Exception e) {
-          fail("Exception getting query service ", e);
+          Assert.fail("Exception getting query service ", e);
         }
         SelectResults res = null;
         for (int i = 0; i < queries.length; i++) {
           try {
             res = (SelectResults) qs.newQuery(queries[i]).execute();
           } catch (Exception e) {
-            fail("Error executing query: " + queries[i], e);
+            Assert.fail("Error executing query: " + queries[i], e);
           }
           assertEquals(resultSize[i], res.size());
           if (i == 3) {
@@ -1240,7 +1242,7 @@ public class SelectStarQueryDUnitTest extends CacheTestCase {
       @Override
       public Object call() throws Exception {
         ClientCacheFactory cf = new ClientCacheFactory();
-        cf.addPoolServer(getServerHostName(server1.getHost()), port1);
+        cf.addPoolServer(NetworkSupport.getServerHostName(server1.getHost()), port1);
         ClientCache cache = getClientCache(cf);
         cache.createClientRegionFactory(ClientRegionShortcut.CACHING_PROXY)
             .create(regName);
@@ -1271,7 +1273,7 @@ public class SelectStarQueryDUnitTest extends CacheTestCase {
           localQS = ((ClientCache) getCache()).getLocalQueryService();
           remoteQS = ((ClientCache) getCache()).getQueryService();
         } catch (Exception e) {
-          fail("Exception getting query service ", e);
+          Assert.fail("Exception getting query service ", e);
         }
         SelectResults res = null;
         SelectResults[][] sr = new SelectResults[1][2];
@@ -1284,7 +1286,7 @@ public class SelectStarQueryDUnitTest extends CacheTestCase {
             sr[0][1] = res;
             CacheUtils.compareResultsOfWithAndWithoutIndex(sr);
           } catch (Exception e) {
-            fail("Error executing query: " + queries[i], e);
+            Assert.fail("Error executing query: " + queries[i], e);
           }
           assertEquals(resultSize[i], res.size());
           if (i == 3) {
@@ -1341,14 +1343,14 @@ public class SelectStarQueryDUnitTest extends CacheTestCase {
         try {
           qs = getCache().getQueryService();
         } catch (Exception e) {
-          fail("Exception getting query service ", e);
+          Assert.fail("Exception getting query service ", e);
         }
         SelectResults res = null;
         for (int i = 0; i < queries.length; i++) {
           try {
             res = (SelectResults) qs.newQuery(queries[i]).execute();
           } catch (Exception e) {
-            fail("Error executing query: " + queries[i], e);
+            Assert.fail("Error executing query: " + queries[i], e);
           }
           assertEquals(resultSize[i], res.size());
           if (i == 3) {
@@ -1397,14 +1399,14 @@ public class SelectStarQueryDUnitTest extends CacheTestCase {
         try {
           qs = getCache().getQueryService();
         } catch (Exception e) {
-          fail("Exception getting query service ", e);
+          Assert.fail("Exception getting query service ", e);
         }
         SelectResults res = null;
         for (int i = 0; i < queries.length; i++) {
           try {
             res = (SelectResults) qs.newQuery(queries[i]).execute();
           } catch (Exception e) {
-            fail("Error executing query: " + queries[i], e);
+            Assert.fail("Error executing query: " + queries[i], e);
           }
           assertEquals(resultSize[i], res.size());
           if (i == 3) {
@@ -1467,7 +1469,7 @@ public class SelectStarQueryDUnitTest extends CacheTestCase {
       @Override
       public Object call() throws Exception {
         ClientCacheFactory cf = new ClientCacheFactory();
-        cf.addPoolServer(getServerHostName(server1.getHost()), port);
+        cf.addPoolServer(NetworkSupport.getServerHostName(server1.getHost()), port);
         ClientCache cache = getClientCache(cf);
         cache.createClientRegionFactory(ClientRegionShortcut.CACHING_PROXY)
             .create(regName);
@@ -1490,7 +1492,7 @@ public class SelectStarQueryDUnitTest extends CacheTestCase {
           localQS = ((ClientCache) getCache()).getLocalQueryService();
           remoteQS = ((ClientCache) getCache()).getQueryService();
         } catch (Exception e) {
-          fail("Exception getting query service ", e);
+          Assert.fail("Exception getting query service ", e);
         }
         SelectResults res = null;
         SelectResults[][] sr = new SelectResults[1][2];
@@ -1503,7 +1505,7 @@ public class SelectStarQueryDUnitTest extends CacheTestCase {
             sr[0][1] = res;
             CacheUtils.compareResultsOfWithAndWithoutIndex(sr);
           } catch (Exception e) {
-            fail("Error executing query: " + queries[i], e);
+            Assert.fail("Error executing query: " + queries[i], e);
           }
           assertEquals(resultSize[i], res.size());
           if (i == 3) {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/e2f18f97/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/functional/IndexCreationDeadLockJUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/functional/IndexCreationDeadLockJUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/functional/IndexCreationDeadLockJUnitTest.java
index 37abacf..ba99b5c 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/functional/IndexCreationDeadLockJUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/functional/IndexCreationDeadLockJUnitTest.java
@@ -46,7 +46,7 @@ import com.gemstone.gemfire.cache.query.IndexType;
 import com.gemstone.gemfire.cache.query.QueryService;
 import com.gemstone.gemfire.cache.query.data.Portfolio;
 import com.gemstone.gemfire.cache.util.CacheWriterAdapter;
-import com.gemstone.gemfire.test.dunit.DistributedTestCase;
+import com.gemstone.gemfire.test.dunit.Threads;
 import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
 
 /**
@@ -190,7 +190,7 @@ public class IndexCreationDeadLockJUnitTest
 
     Thread th = new IndexCreationDeadLockJUnitTest.PutThread("put thread");
     th.start();
-    DistributedTestCase.join(th, 60 * 1000, null);
+    Threads.join(th, 60 * 1000);
   }
 
   /**
@@ -294,7 +294,7 @@ public class IndexCreationDeadLockJUnitTest
         Thread indxCreationThread = new HelperThread("index creator thread");
         indxCreationThread.start();
         try {
-          DistributedTestCase.join(indxCreationThread, 30 * 1000, null);
+          Threads.join(indxCreationThread, 30 * 1000);
         }
         catch (Exception e) {
           e.printStackTrace();

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/e2f18f97/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/functional/IndexMaintenanceAsynchJUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/functional/IndexMaintenanceAsynchJUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/functional/IndexMaintenanceAsynchJUnitTest.java
index 84612b5..ac3b8bb 100755
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/functional/IndexMaintenanceAsynchJUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/functional/IndexMaintenanceAsynchJUnitTest.java
@@ -45,8 +45,8 @@ import com.gemstone.gemfire.cache.query.data.Portfolio;
 import com.gemstone.gemfire.cache.query.internal.QueryObserverAdapter;
 import com.gemstone.gemfire.cache.query.internal.QueryObserverHolder;
 import com.gemstone.gemfire.cache.query.internal.index.IndexProtocol;
-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;
 
 /**
@@ -137,7 +137,7 @@ public class IndexMaintenanceAsynchJUnitTest {
             return "index updates never became 8";
           }
         };
-        DistributedTestCase.waitForCriterion(ev, 5000, 200, true);
+        Wait.waitForCriterion(ev, 5000, 200, true);
 
         //queryString= "SELECT DISTINCT * FROM /portfolios p, p.positions.values pos where pos.secId='IBM'";
         queryString= "SELECT DISTINCT * FROM /portfolios where status = 'active'";

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/e2f18f97/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/functional/LikePredicateJUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/functional/LikePredicateJUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/functional/LikePredicateJUnitTest.java
index 3e4a570..309adff 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/functional/LikePredicateJUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/functional/LikePredicateJUnitTest.java
@@ -57,7 +57,7 @@ import com.gemstone.gemfire.cache.query.internal.ResultsCollectionWrapper;
 import com.gemstone.gemfire.cache.query.internal.index.IndexManager;
 import com.gemstone.gemfire.cache.query.internal.index.IndexManager.TestHook;
 import com.gemstone.gemfire.cache.query.internal.types.ObjectTypeImpl;
-import com.gemstone.gemfire.test.dunit.DistributedTestCase;
+import com.gemstone.gemfire.test.dunit.Threads;
 import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
 
 /**
@@ -2054,7 +2054,7 @@ public class LikePredicateJUnitTest {
     assertEquals(5, rs[0][0].size());
 
     // wait for remove to complete
-    DistributedTestCase.join(LikeQueryIndexTestHook.th, 60 * 1000, null);
+    Threads.join(LikeQueryIndexTestHook.th, 60 * 1000);
 
     // The index should have been removed by now
     assertEquals(0, cache.getQueryService().getIndexes().size());

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/e2f18f97/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/internal/ExecutionContextJUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/internal/ExecutionContextJUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/internal/ExecutionContextJUnitTest.java
index 35b5995..0dc5910 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/internal/ExecutionContextJUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/internal/ExecutionContextJUnitTest.java
@@ -44,7 +44,7 @@ import com.gemstone.gemfire.cache.query.SelectResults;
 import com.gemstone.gemfire.cache.query.data.Portfolio;
 import com.gemstone.gemfire.cache.query.data.Position;
 import com.gemstone.gemfire.internal.cache.InternalCache;
-import com.gemstone.gemfire.test.dunit.DistributedTestCase;
+import com.gemstone.gemfire.test.dunit.Threads;
 import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
 
 /**
@@ -368,7 +368,7 @@ public class ExecutionContextJUnitTest {
     
     for (int i =0; i < th.length ;++i) {
       try {
-        DistributedTestCase.join(th[i], 30 * 1000, null);
+        Threads.join(th[i], 30 * 1000);
       }catch(Exception e) {
         fail(e.toString());
       }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/e2f18f97/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/AsynchIndexMaintenanceJUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/AsynchIndexMaintenanceJUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/AsynchIndexMaintenanceJUnitTest.java
index 7ad5f66..161841a 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/AsynchIndexMaintenanceJUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/AsynchIndexMaintenanceJUnitTest.java
@@ -28,8 +28,9 @@ import com.gemstone.gemfire.cache.query.CacheUtils;
 import com.gemstone.gemfire.cache.query.IndexType;
 import com.gemstone.gemfire.cache.query.QueryService;
 import com.gemstone.gemfire.cache.query.data.Portfolio;
-import com.gemstone.gemfire.test.dunit.DistributedTestCase;
-import com.gemstone.gemfire.test.dunit.DistributedTestCase.WaitCriterion;
+import com.gemstone.gemfire.test.dunit.Threads;
+import com.gemstone.gemfire.test.dunit.Wait;
+import com.gemstone.gemfire.test.dunit.WaitCriterion;
 import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
 
 import java.util.HashSet;
@@ -113,7 +114,7 @@ public class AsynchIndexMaintenanceJUnitTest {
         return "valueToEntriesMap never became 50";
       }
     };
-    DistributedTestCase.waitForCriterion(ev, 3000, 200, true);
+    Wait.waitForCriterion(ev, 3000, 200, true);
   }
   
   @Test
@@ -140,7 +141,7 @@ public class AsynchIndexMaintenanceJUnitTest {
       }
     };
 
-    DistributedTestCase.waitForCriterion(evSize, 17 * 1000, 200, true);
+    Wait.waitForCriterion(evSize, 17 * 1000, 200, true);
     
     // clear region.
     region.clear();
@@ -153,7 +154,7 @@ public class AsynchIndexMaintenanceJUnitTest {
         return "valueToEntriesMap never became size :" + 0;
       }
     };
-    DistributedTestCase.waitForCriterion(evClear, 17 * 1000, 200, true);
+    Wait.waitForCriterion(evClear, 17 * 1000, 200, true);
     
     // Add to region.
     for( int i=0; i<size ; ++i) {
@@ -161,7 +162,7 @@ public class AsynchIndexMaintenanceJUnitTest {
       idSet.add((i+1) + "");
     }    
     //assertEquals(0, getIndexSize(ri));
-    DistributedTestCase.waitForCriterion(evSize, 17 * 1000, 200, true);
+    Wait.waitForCriterion(evSize, 17 * 1000, 200, true);
   }
   
   @Test
@@ -183,7 +184,7 @@ public class AsynchIndexMaintenanceJUnitTest {
         return "valueToEntries map never became size 3";
       }
     };
-    DistributedTestCase.waitForCriterion(ev, 10 * 1000, 200, true);
+    Wait.waitForCriterion(ev, 10 * 1000, 200, true);
   }
   
   @Test
@@ -247,7 +248,7 @@ public class AsynchIndexMaintenanceJUnitTest {
     }
     try {
       for (int i = 0; i < TOTAL_THREADS; ++i) {
-        DistributedTestCase.join(threads[i], 30 * 1000, null);
+        Threads.join(threads[i], 30 * 1000);
       }
     }
     catch (Exception e) {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/e2f18f97/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/ConcurrentIndexInitOnOverflowRegionDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/ConcurrentIndexInitOnOverflowRegionDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/ConcurrentIndexInitOnOverflowRegionDUnitTest.java
index 3e69990..d50fbd9 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/ConcurrentIndexInitOnOverflowRegionDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/ConcurrentIndexInitOnOverflowRegionDUnitTest.java
@@ -45,9 +45,12 @@ import com.gemstone.gemfire.cache30.CacheSerializableRunnable;
 import com.gemstone.gemfire.cache30.CacheTestCase;
 import com.gemstone.gemfire.internal.cache.EvictionAttributesImpl;
 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.IgnoredException;
+import com.gemstone.gemfire.test.dunit.NetworkSupport;
+import com.gemstone.gemfire.test.dunit.Threads;
 import com.gemstone.gemfire.test.dunit.VM;
+import com.gemstone.gemfire.test.dunit.Wait;
 
 /**
  * @author shobhit
@@ -165,7 +168,7 @@ public class ConcurrentIndexInitOnOverflowRegionDUnitTest extends CacheTestCase
         Cache cache = PRQHelp.getCache();
 
         while (!hooked) {
-          pause(100);
+          Wait.pause(100);
         }
         // Create and hence initialize Index
         try {
@@ -180,10 +183,8 @@ public class ConcurrentIndexInitOnOverflowRegionDUnitTest extends CacheTestCase
     });
 
     // If we take more than 30 seconds then its a deadlock.
-    DistributedTestCase.join(asyncInv2, 30 * 1000, PRQHelp.getCache()
-        .getLogger());
-    DistributedTestCase.join(asyncInv1, 30 * 1000, PRQHelp.getCache()
-        .getLogger());
+    Threads.join(asyncInv2, 30 * 1000);
+    Threads.join(asyncInv1, 30 * 1000);
   }
 
   /**
@@ -194,8 +195,8 @@ public class ConcurrentIndexInitOnOverflowRegionDUnitTest extends CacheTestCase
     VM vm0 = host.getVM(0);
     VM vm1 = host.getVM(1);
     
-    addExpectedException("Unexpected IOException:");
-    addExpectedException("java.net.SocketException");
+    IgnoredException.addIgnoredException("Unexpected IOException:");
+    IgnoredException.addIgnoredException("java.net.SocketException");
 
     name = "PartionedPortfoliosPR";
     // Create Overflow Persistent Partition Region
@@ -254,7 +255,7 @@ public class ConcurrentIndexInitOnOverflowRegionDUnitTest extends CacheTestCase
     
     final int port = vm0.invokeInt(ConcurrentIndexInitOnOverflowRegionDUnitTest.class,
     "getCacheServerPort");
-    final String host0 = getServerHostName(vm0.getHost());
+    final String host0 = NetworkSupport.getServerHostName(vm0.getHost());
 
     // Start changing the value in Region which should turn into a deadlock if
     // the fix is not there
@@ -308,7 +309,7 @@ public class ConcurrentIndexInitOnOverflowRegionDUnitTest extends CacheTestCase
         Cache cache = PRQHelp.getCache();
 
         while (!hooked) {
-          pause(100);
+          Wait.pause(100);
         }
         // Create Indexes
         try {
@@ -323,10 +324,8 @@ public class ConcurrentIndexInitOnOverflowRegionDUnitTest extends CacheTestCase
     });
 
     // If we take more than 30 seconds then its a deadlock.
-    DistributedTestCase.join(asyncInv2, 30 * 1000, PRQHelp.getCache()
-        .getLogger());
-    DistributedTestCase.join(asyncInv1, 30 * 1000, PRQHelp.getCache()
-        .getLogger());
+    Threads.join(asyncInv2, 30 * 1000);
+    Threads.join(asyncInv1, 30 * 1000);
     
     vm0.invoke(new CacheSerializableRunnable("Set Test Hook") {
       
@@ -378,7 +377,7 @@ public class ConcurrentIndexInitOnOverflowRegionDUnitTest extends CacheTestCase
         case 6: // processAction in IndexManager
           hooked = true;
           //wait untill some thread unhooks.
-          while (hooked) { pause(20); }
+          while (hooked) { Wait.pause(20); }
           break;
         default:
           break;
@@ -397,7 +396,7 @@ public class ConcurrentIndexInitOnOverflowRegionDUnitTest extends CacheTestCase
         for (int i=0; i<100; i++) {
           if (i == 50) IndexManager.testHook = new LocalTestHook();
           region.put(i, new Portfolio(i));
-          if (i == 50) pause(20);
+          if (i == 50) Wait.pause(20);
         }
       }
     });
@@ -410,7 +409,7 @@ public class ConcurrentIndexInitOnOverflowRegionDUnitTest extends CacheTestCase
         Region region = PRQHelp.getCache().getRegion(regionName);
         
         while(!hooked) {
-          pause(100);
+          Wait.pause(100);
         }
         if (hooked) {
           hooked = false;
@@ -431,8 +430,7 @@ public class ConcurrentIndexInitOnOverflowRegionDUnitTest extends CacheTestCase
     });
 
     // Kill asynch thread
-    DistributedTestCase.join(indexUpdateAsysnch, 20000, PRQHelp.getCache()
-        .getLogger());
+    Threads.join(indexUpdateAsysnch, 20000);
 
     //Verify region size which must be 50
     vm0.invoke(new CacheSerializableRunnable("Check region size") {
@@ -454,7 +452,7 @@ public class ConcurrentIndexInitOnOverflowRegionDUnitTest extends CacheTestCase
       case 6: // Before Index update and after region entry lock.
         hooked = true;
         getLogWriter().fine("IndexManagerTestHook is hooked.");
-        pause(10000);
+        Wait.pause(10000);
         hooked = false;
         break;
       default:

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/e2f18f97/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/ConcurrentIndexOperationsOnOverflowRegionDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/ConcurrentIndexOperationsOnOverflowRegionDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/ConcurrentIndexOperationsOnOverflowRegionDUnitTest.java
index e999787..7611eda 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/ConcurrentIndexOperationsOnOverflowRegionDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/ConcurrentIndexOperationsOnOverflowRegionDUnitTest.java
@@ -45,9 +45,10 @@ import com.gemstone.gemfire.cache30.CacheTestCase;
 import com.gemstone.gemfire.internal.cache.EvictionAttributesImpl;
 import com.gemstone.gemfire.internal.cache.PartitionedRegionQueryEvaluator.TestHook;
 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.Threads;
 import com.gemstone.gemfire.test.dunit.VM;
+import com.gemstone.gemfire.test.dunit.Wait;
 
 /**
  * Test creates a persistent-overflow region and performs updates in region
@@ -167,7 +168,7 @@ public class ConcurrentIndexOperationsOnOverflowRegionDUnitTest extends
             .newQuery("select * from /" + name + " p where p.ID > -1");
 
         while (!hooked) {
-          pause(100);
+          Wait.pause(100);
         }
         try {
           PRQHelp.getCache().getLogger().fine("Querying the region");
@@ -180,8 +181,8 @@ public class ConcurrentIndexOperationsOnOverflowRegionDUnitTest extends
     });
 
     //If we take more than 30 seconds then its a deadlock.
-    DistributedTestCase.join(asyncInv2, 30*1000, PRQHelp.getCache().getLogger());
-    DistributedTestCase.join(asyncInv1, 30*1000, PRQHelp.getCache().getLogger());
+    Threads.join(asyncInv2, 30*1000);
+    Threads.join(asyncInv1, 30*1000);
   }
 
   /**
@@ -269,7 +270,7 @@ public class ConcurrentIndexOperationsOnOverflowRegionDUnitTest extends
             .newQuery("select * from /" + name + " p where p.ID > -1");
 
         while (!hooked) {
-          pause(100);
+          Wait.pause(100);
         }
         try {
           PRQHelp.getCache().getLogger().fine("Querying the region");
@@ -282,8 +283,8 @@ public class ConcurrentIndexOperationsOnOverflowRegionDUnitTest extends
     });
 
     //If we take more than 30 seconds then its a deadlock.
-    DistributedTestCase.join(asyncInv2, 30*1000, PRQHelp.getCache().getLogger());
-    DistributedTestCase.join(asyncInv1, 30*1000, PRQHelp.getCache().getLogger());
+    Threads.join(asyncInv2, 30*1000);
+    Threads.join(asyncInv1, 30*1000);
   }
 
   /**
@@ -378,7 +379,7 @@ public class ConcurrentIndexOperationsOnOverflowRegionDUnitTest extends
             .newQuery("select * from /" + name + " p where p.ID > -1");
 
         while (!hooked) {
-          pause(100);
+          Wait.pause(100);
         }
         try {
           PRQHelp.getCache().getLogger().fine("Querying the region");
@@ -391,10 +392,8 @@ public class ConcurrentIndexOperationsOnOverflowRegionDUnitTest extends
     });
 
     // If we take more than 30 seconds then its a deadlock.
-    DistributedTestCase.join(asyncInv2, 30 * 1000, PRQHelp.getCache()
-        .getLogger());
-    DistributedTestCase.join(asyncInv1, 30 * 1000, PRQHelp.getCache()
-        .getLogger());
+    Threads.join(asyncInv2, 30 * 1000);
+    Threads.join(asyncInv1, 30 * 1000);
   }
 
   /**
@@ -489,7 +488,7 @@ public class ConcurrentIndexOperationsOnOverflowRegionDUnitTest extends
             .newQuery("select * from /" + name + " p where p.ID > -1");
 
         while (!hooked) {
-          pause(100);
+          Wait.pause(100);
         }
         try {
           PRQHelp.getCache().getLogger().fine("Querying the region");
@@ -502,10 +501,8 @@ public class ConcurrentIndexOperationsOnOverflowRegionDUnitTest extends
     });
 
     // If we take more than 30 seconds then its a deadlock.
-    DistributedTestCase.join(asyncInv2, 30 * 1000, PRQHelp.getCache()
-        .getLogger());
-    DistributedTestCase.join(asyncInv1, 30 * 1000, PRQHelp.getCache()
-        .getLogger());
+    Threads.join(asyncInv2, 30 * 1000);
+    Threads.join(asyncInv1, 30 * 1000);
   }
 
   /**
@@ -584,7 +581,7 @@ public class ConcurrentIndexOperationsOnOverflowRegionDUnitTest extends
            .newQuery("select * from /" + name + " p where p.ID > -1");
 
        while (!hooked) {
-         pause(10);
+         Wait.pause(10);
        }
        try {
          PRQHelp.getCache().getLogger().fine("Querying the region");
@@ -597,8 +594,8 @@ public class ConcurrentIndexOperationsOnOverflowRegionDUnitTest extends
    });
 
    //If we take more than 30 seconds then its a deadlock.
-   DistributedTestCase.join(asyncInv2, 30*1000, PRQHelp.getCache().getLogger());
-   DistributedTestCase.join(asyncInv1, 30*1000, PRQHelp.getCache().getLogger());
+   Threads.join(asyncInv2, 30*1000);
+   Threads.join(asyncInv1, 30*1000);
  }
 
  /**
@@ -677,7 +674,7 @@ public class ConcurrentIndexOperationsOnOverflowRegionDUnitTest extends
            .newQuery("select * from /" + name + " p where p.ID > -1");
 
        while (!hooked) {
-         pause(10);
+         Wait.pause(10);
        }
        try {
          PRQHelp.getCache().getLogger().fine("Querying the region");
@@ -690,8 +687,8 @@ public class ConcurrentIndexOperationsOnOverflowRegionDUnitTest extends
    });
 
    //If we take more than 30 seconds then its a deadlock.
-   DistributedTestCase.join(asyncInv2, 30*1000, PRQHelp.getCache().getLogger());
-   DistributedTestCase.join(asyncInv1, 30*1000, PRQHelp.getCache().getLogger());
+   Threads.join(asyncInv2, 30*1000);
+   Threads.join(asyncInv1, 30*1000);
  }
 
   public class IndexManagerTestHook implements com.gemstone.gemfire.cache.query.internal.index.IndexManager.TestHook{
@@ -700,7 +697,7 @@ public class ConcurrentIndexOperationsOnOverflowRegionDUnitTest extends
       case 5: //Before Index update and after region entry lock.
         hooked  = true;
         getLogWriter().fine("IndexManagerTestHook is hooked.");
-        pause(10000);
+        Wait.pause(10000);
         //hooked = false;
         break;
       default:
@@ -714,7 +711,7 @@ public class ConcurrentIndexOperationsOnOverflowRegionDUnitTest extends
       case 5: //Before Index update and after region entry lock.
         hooked  = true;
         getLogWriter().fine("IndexManagerTestHook is hooked.");
-        pause(100);
+        Wait.pause(100);
        // hooked = false;
         break;
       default:

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/e2f18f97/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/ConcurrentIndexUpdateWithInplaceObjectModFalseDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/ConcurrentIndexUpdateWithInplaceObjectModFalseDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/ConcurrentIndexUpdateWithInplaceObjectModFalseDUnitTest.java
index 5faba97..2fa76b8 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/ConcurrentIndexUpdateWithInplaceObjectModFalseDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/ConcurrentIndexUpdateWithInplaceObjectModFalseDUnitTest.java
@@ -41,11 +41,14 @@ import com.gemstone.gemfire.internal.cache.PartitionedRegion;
 import com.gemstone.gemfire.internal.cache.RegionEntry;
 import com.gemstone.gemfire.internal.cache.Token;
 import com.gemstone.gemfire.internal.cache.persistence.query.CloseableIterator;
+import com.gemstone.gemfire.test.dunit.Assert;
 import com.gemstone.gemfire.test.dunit.AsyncInvocation;
 import com.gemstone.gemfire.test.dunit.DistributedTestCase;
 import com.gemstone.gemfire.test.dunit.Host;
+import com.gemstone.gemfire.test.dunit.Invoke;
 import com.gemstone.gemfire.test.dunit.VM;
 import com.gemstone.gemfire.test.dunit.SerializableRunnableIF;
+import com.gemstone.gemfire.test.dunit.Threads;
 
 /**
  * This test is similar to {@link ConcurrentIndexUpdateWithoutWLDUnitTest} except
@@ -88,7 +91,7 @@ public class ConcurrentIndexUpdateWithInplaceObjectModFalseDUnitTest extends
 
   @Override
   public void setUp() throws Exception {
-    invokeInEveryVM(new CacheSerializableRunnable("Set INPLACE_OBJECT_MODIFICATION false") {
+    Invoke.invokeInEveryVM(new CacheSerializableRunnable("Set INPLACE_OBJECT_MODIFICATION false") {
       
       @Override
       public void run2() throws CacheException {
@@ -103,9 +106,9 @@ public class ConcurrentIndexUpdateWithInplaceObjectModFalseDUnitTest extends
    * Tear down a PartitionedRegionTestCase by cleaning up the existing cache
    * (mainly because we want to destroy any existing PartitionedRegions)
    */
-  public void tearDown2() throws Exception {
+  public void tearDownBeforeDisconnect() throws Exception {
     try {
-      invokeInEveryVM(new CacheSerializableRunnable("Set INPLACE_OBJECT_MODIFICATION false") {
+      Invoke.invokeInEveryVM(new CacheSerializableRunnable("Set INPLACE_OBJECT_MODIFICATION false") {
         
         @Override
         public void run2() throws CacheException {
@@ -113,10 +116,10 @@ public class ConcurrentIndexUpdateWithInplaceObjectModFalseDUnitTest extends
           IndexManager.INPLACE_OBJECT_MODIFICATION_FOR_TEST = false;
         }
       });
-      invokeInEveryVM(ConcurrentIndexUpdateWithInplaceObjectModFalseDUnitTest.class, "destroyRegions");
-      invokeInEveryVM(CacheTestCase.class, "closeCache");
+      Invoke.invokeInEveryVM(ConcurrentIndexUpdateWithInplaceObjectModFalseDUnitTest.class, "destroyRegions");
+      Invoke.invokeInEveryVM(CacheTestCase.class, "closeCache");
     } finally {
-      super.tearDown2();
+      super.tearDownBeforeDisconnect();
     }
   }
 
@@ -145,12 +148,12 @@ public class ConcurrentIndexUpdateWithInplaceObjectModFalseDUnitTest extends
     asyncInvs[1] = vm0.invokeAsync(helper.getCacheSerializableRunnableForPRRandomOps(regionName, 0, stepSize));
     
     for (AsyncInvocation inv : asyncInvs) {
-      DistributedTestCase.join(inv, 30*000, helper.getCache().getLogger());
+      Threads.join(inv, 30*000);
     }
     
     for (AsyncInvocation inv : asyncInvs) {
       if (inv.exceptionOccurred()) {
-        fail("Random region operation failed on VM_"+inv.getId(), inv.getException());
+        Assert.fail("Random region operation failed on VM_"+inv.getId(), inv.getException());
       }
     }
     
@@ -190,11 +193,11 @@ public class ConcurrentIndexUpdateWithInplaceObjectModFalseDUnitTest extends
     asyncInvs[1] = vm0.invokeAsync(helper.getCacheSerializableRunnableForPRRandomOps(regionName, 0, totalDataSize));
     
     for (AsyncInvocation inv : asyncInvs) {
-      DistributedTestCase.join(inv, 30*000, helper.getCache().getLogger());
+      Threads.join(inv, 30*000);
     }
     for (AsyncInvocation inv : asyncInvs) {
       if (inv.exceptionOccurred()) {
-        fail("Random region operation failed on VM_"+inv.getId(), inv.getException());
+        Assert.fail("Random region operation failed on VM_"+inv.getId(), inv.getException());
       }
     }
     
@@ -248,12 +251,12 @@ public class ConcurrentIndexUpdateWithInplaceObjectModFalseDUnitTest extends
     asyncInvs[11] = vm3.invokeAsync(helper.getCacheSerializableRunnableForPRRandomOps(regionName, (3 * (stepSize)), totalDataSize ));
     
     for (AsyncInvocation inv : asyncInvs) {
-      DistributedTestCase.join(inv, 60*000, helper.getCache().getLogger());
+      Threads.join(inv, 60*000);
     }
     
     for (AsyncInvocation inv : asyncInvs) {
       if (inv.exceptionOccurred()) {
-        fail("Random region operation failed on VM_"+inv.getId(), inv.getException());
+        Assert.fail("Random region operation failed on VM_"+inv.getId(), inv.getException());
       }
     }
     vm0.invoke(getCacheSerializableRunnableForIndexValidation(regionName, indexName));
@@ -311,11 +314,11 @@ public class ConcurrentIndexUpdateWithInplaceObjectModFalseDUnitTest extends
     asyncInvs[11] = vm3.invokeAsync(helper.getCacheSerializableRunnableForPRRandomOps(regionName, (3 * (stepSize)), totalDataSize ));
     
     for (AsyncInvocation inv : asyncInvs) {
-      DistributedTestCase.join(inv, 60*000, helper.getCache().getLogger());
+      Threads.join(inv, 60*000);
     }
     for (AsyncInvocation inv : asyncInvs) {
       if (inv.exceptionOccurred()) {
-        fail("Random region operation failed on VM_"+inv.getId(), inv.getException());
+        Assert.fail("Random region operation failed on VM_"+inv.getId(), inv.getException());
       }
     }
     vm0.invoke(getCacheSerializableRunnableForIndexValidation(regionName, rindexName));

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/e2f18f97/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/ConcurrentIndexUpdateWithoutWLDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/ConcurrentIndexUpdateWithoutWLDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/ConcurrentIndexUpdateWithoutWLDUnitTest.java
index fbead52..8baa4fd 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/ConcurrentIndexUpdateWithoutWLDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/ConcurrentIndexUpdateWithoutWLDUnitTest.java
@@ -42,11 +42,14 @@ import com.gemstone.gemfire.internal.cache.PartitionedRegion;
 import com.gemstone.gemfire.internal.cache.RegionEntry;
 import com.gemstone.gemfire.internal.cache.Token;
 import com.gemstone.gemfire.internal.cache.persistence.query.CloseableIterator;
+import com.gemstone.gemfire.test.dunit.Assert;
 import com.gemstone.gemfire.test.dunit.AsyncInvocation;
 import com.gemstone.gemfire.test.dunit.DistributedTestCase;
 import com.gemstone.gemfire.test.dunit.Host;
+import com.gemstone.gemfire.test.dunit.Invoke;
 import com.gemstone.gemfire.test.dunit.VM;
 import com.gemstone.gemfire.test.dunit.SerializableRunnableIF;
+import com.gemstone.gemfire.test.dunit.Threads;
 
 /**
  * 
@@ -88,12 +91,12 @@ public class ConcurrentIndexUpdateWithoutWLDUnitTest extends
    * Tear down a PartitionedRegionTestCase by cleaning up the existing cache
    * (mainly because we want to destroy any existing PartitionedRegions)
    */
-  public void tearDown2() throws Exception {
+  public void tearDownBeforeDisconnect() throws Exception {
     try {
-      invokeInEveryVM(ConcurrentIndexUpdateWithoutWLDUnitTest.class, "destroyRegions");
-      invokeInEveryVM(CacheTestCase.class, "closeCache");
+      Invoke.invokeInEveryVM(ConcurrentIndexUpdateWithoutWLDUnitTest.class, "destroyRegions");
+      Invoke.invokeInEveryVM(CacheTestCase.class, "closeCache");
     } finally {
-      super.tearDown2();
+      super.tearDownBeforeDisconnect();
     }
   }
 
@@ -121,12 +124,12 @@ public class ConcurrentIndexUpdateWithoutWLDUnitTest extends
     asyncInvs[1] = vm0.invokeAsync(helper.getCacheSerializableRunnableForPRRandomOps(regionName, 0, stepSize));
     
     for (AsyncInvocation inv : asyncInvs) {
-      DistributedTestCase.join(inv, 30*000, helper.getCache().getLogger());
+      Threads.join(inv, 30*000);
     }
     
     for (AsyncInvocation inv : asyncInvs) {
       if (inv.exceptionOccurred()) {
-        fail("Random region operation failed on VM_"+inv.getId(), inv.getException());
+        Assert.fail("Random region operation failed on VM_"+inv.getId(), inv.getException());
       }
     }
     
@@ -162,12 +165,12 @@ public class ConcurrentIndexUpdateWithoutWLDUnitTest extends
     asyncInvs[1] = vm0.invokeAsync(helper.getCacheSerializableRunnableForPRRandomOps(regionName, 0, stepSize));
     
     for (AsyncInvocation inv : asyncInvs) {
-      DistributedTestCase.join(inv, 30*000, helper.getCache().getLogger());
+      Threads.join(inv, 30*000);
     }
     
     for (AsyncInvocation inv : asyncInvs) {
       if (inv.exceptionOccurred()) {
-        fail("Random region operation failed on VM_"+inv.getId(), inv.getException());
+        Assert.fail("Random region operation failed on VM_"+inv.getId(), inv.getException());
       }
     }
     
@@ -206,11 +209,11 @@ public class ConcurrentIndexUpdateWithoutWLDUnitTest extends
     asyncInvs[1] = vm0.invokeAsync(helper.getCacheSerializableRunnableForPRRandomOps(regionName, 0, totalDataSize));
     
     for (AsyncInvocation inv : asyncInvs) {
-      DistributedTestCase.join(inv, 30*000, helper.getCache().getLogger());
+      Threads.join(inv, 30*000);
     }
     for (AsyncInvocation inv : asyncInvs) {
       if (inv.exceptionOccurred()) {
-        fail("Random region operation failed on VM_"+inv.getId(), inv.getException());
+        Assert.fail("Random region operation failed on VM_"+inv.getId(), inv.getException());
       }
     }
     
@@ -264,12 +267,12 @@ public class ConcurrentIndexUpdateWithoutWLDUnitTest extends
     asyncInvs[11] = vm3.invokeAsync(helper.getCacheSerializableRunnableForPRRandomOps(regionName, (3 * (stepSize)), totalDataSize ));
     
     for (AsyncInvocation inv : asyncInvs) {
-      DistributedTestCase.join(inv, 60*000, helper.getCache().getLogger());
+      Threads.join(inv, 60*000);
     }
     
     for (AsyncInvocation inv : asyncInvs) {
       if (inv.exceptionOccurred()) {
-        fail("Random region operation failed on VM_"+inv.getId(), inv.getException());
+        Assert.fail("Random region operation failed on VM_"+inv.getId(), inv.getException());
       }
     }
     vm0.invoke(getCacheSerializableRunnableForIndexValidation(regionName, indexName));
@@ -326,11 +329,11 @@ public class ConcurrentIndexUpdateWithoutWLDUnitTest extends
     asyncInvs[11] = vm3.invokeAsync(helper.getCacheSerializableRunnableForPRRandomOps(regionName, (3 * (stepSize)), totalDataSize ));
     
     for (AsyncInvocation inv : asyncInvs) {
-      DistributedTestCase.join(inv, 60*000, helper.getCache().getLogger());
+      Threads.join(inv, 60*000);
     }
     for (AsyncInvocation inv : asyncInvs) {
       if (inv.exceptionOccurred()) {
-        fail("Random region operation failed on VM_"+inv.getId(), inv.getException());
+        Assert.fail("Random region operation failed on VM_"+inv.getId(), inv.getException());
       }
     }
     vm0.invoke(getCacheSerializableRunnableForIndexValidation(regionName, rindexName));
@@ -398,12 +401,12 @@ public class ConcurrentIndexUpdateWithoutWLDUnitTest extends
     asyncInvs[11] = vm3.invokeAsync(helper.getCacheSerializableRunnableForPRRandomOps(regionName, (3 * (stepSize)), totalDataSize ));
     
     for (AsyncInvocation inv : asyncInvs) {
-      DistributedTestCase.join(inv, 60*000, helper.getCache().getLogger());
+      Threads.join(inv, 60*000);
     }
     
     for (AsyncInvocation inv : asyncInvs) {
       if (inv.exceptionOccurred()) {
-        fail("Random region operation failed on VM_"+inv.getId(), inv.getException());
+        Assert.fail("Random region operation failed on VM_"+inv.getId(), inv.getException());
       }
     }
     vm0.invoke(getCacheSerializableRunnableForIndexValidation(regionName, indexName));

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/e2f18f97/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/CopyOnReadIndexDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/CopyOnReadIndexDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/CopyOnReadIndexDUnitTest.java
index a176ee7..101ce6c 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/CopyOnReadIndexDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/CopyOnReadIndexDUnitTest.java
@@ -42,11 +42,16 @@ import com.gemstone.gemfire.distributed.internal.DistributionConfig;
 import com.gemstone.gemfire.internal.AvailablePortHelper;
 import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
 import com.gemstone.gemfire.internal.cache.PartitionedRegion;
-import com.gemstone.gemfire.test.dunit.DistributedTestCase;
+import com.gemstone.gemfire.test.dunit.Assert;
+import com.gemstone.gemfire.test.dunit.DUnitEnv;
 import com.gemstone.gemfire.test.dunit.Host;
+import com.gemstone.gemfire.test.dunit.Invoke;
+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.VM;
+import com.gemstone.gemfire.test.dunit.Wait;
+import com.gemstone.gemfire.test.dunit.WaitCriterion;
 
 public class CopyOnReadIndexDUnitTest extends CacheTestCase {
 
@@ -62,7 +67,7 @@ public class CopyOnReadIndexDUnitTest extends CacheTestCase {
   public void setUp() throws Exception {
     super.setUp();
     getSystem();
-    invokeInEveryVM(new SerializableRunnable("getSystem") {
+    Invoke.invokeInEveryVM(new SerializableRunnable("getSystem") {
       public void run() {
         getSystem();
       }
@@ -73,7 +78,7 @@ public class CopyOnReadIndexDUnitTest extends CacheTestCase {
     vm2 = host.getVM(2);
   }
   
-  public void tearDown2() throws Exception {
+  public void tearDownBeforeDisconnect() throws Exception {
     disconnectAllFromDS();
   }
   
@@ -159,13 +164,13 @@ public class CopyOnReadIndexDUnitTest extends CacheTestCase {
           //numPortfoliosPerVM instances of Portfolio created for put operation
           //Due to index, we have deserialized all of the entries this vm currently host
           Index index = getCache().getQueryService().getIndex(region, "idIndex");
-          DistributedTestCase.waitForCriterion(verifyPortfolioCount((int)index.getStatistics().getNumberOfValues() + numPortfoliosPerVM), 5000, 200, true);
+          Wait.waitForCriterion(verifyPortfolioCount((int)index.getStatistics().getNumberOfValues() + numPortfoliosPerVM), 5000, 200, true);
         }
         else {
           //operations we have done on this vm consist of:
           //numPortfoliosPerVM instances of Portfolio created for put operation
           //We do not have an index, so we have not deserialized any values
-          DistributedTestCase.waitForCriterion(verifyPortfolioCount(numPortfoliosPerVM), 5000, 200, true);
+          Wait.waitForCriterion(verifyPortfolioCount(numPortfoliosPerVM), 5000, 200, true);
         }
         return null;
       }
@@ -191,13 +196,13 @@ public class CopyOnReadIndexDUnitTest extends CacheTestCase {
             QueryTestUtils utils = new QueryTestUtils();
             index = utils.createIndex("idIndex", "p.ID", "/portfolios p");
           }
-          DistributedTestCase.waitForCriterion(verifyPortfolioCount((int)index.getStatistics().getNumberOfValues() + numPortfoliosPerVM), 5000, 200, true);
+          Wait.waitForCriterion(verifyPortfolioCount((int)index.getStatistics().getNumberOfValues() + numPortfoliosPerVM), 5000, 200, true);
         }
         else {
           //operations we have done on this vm consist of:
           //numPortfoliosPerVM instances of Portfolio created for put operation
           //We do not have an index, so we have not deserialized any values
-          DistributedTestCase.waitForCriterion(verifyPortfolioCount(numPortfoliosPerVM), 5000, 200, true);
+          Wait.waitForCriterion(verifyPortfolioCount(numPortfoliosPerVM), 5000, 200, true);
         }
         return null;
       }
@@ -228,14 +233,14 @@ public class CopyOnReadIndexDUnitTest extends CacheTestCase {
           //Due to index, we have deserialized all of the entries this vm currently host
           //Since we have deserialized and cached these values, we just need to add the number of results we did a copy of due to copy on read
           Index index = getCache().getQueryService().getIndex(region, "idIndex");
-          DistributedTestCase.waitForCriterion(verifyPortfolioCount((int)index.getStatistics().getNumberOfValues() + numPortfoliosPerVM + numExpectedResults), 5000, 200, true);
+          Wait.waitForCriterion(verifyPortfolioCount((int)index.getStatistics().getNumberOfValues() + numPortfoliosPerVM + numExpectedResults), 5000, 200, true);
         }
         else {
           //operations we have done on this vm consist of:
           //50 instances of Portfolio created for put operation
           //Due to the query we deserialized the number of entries this vm currently hosts
           //We had to deserialized the results from the other data nodes when we iterated through the results as well as our own
-          DistributedTestCase.waitForCriterion(verifyPortfolioCount((int)((PartitionedRegion)region).getLocalSize() + numExpectedResults + numPortfoliosPerVM), 5000, 200, true);
+          Wait.waitForCriterion(verifyPortfolioCount((int)((PartitionedRegion)region).getLocalSize() + numExpectedResults + numPortfoliosPerVM), 5000, 200, true);
         }
         return null;
       }
@@ -247,11 +252,11 @@ public class CopyOnReadIndexDUnitTest extends CacheTestCase {
         if (hasIndex) {
           //After vm0 executed the query, we already had the values deserialized in our cache
           //So it's the same total as before
-          DistributedTestCase.waitForCriterion(verifyPortfolioCount((int)((PartitionedRegion)region).getLocalSize() + numPortfoliosPerVM), 5000, 200, true);
+          Wait.waitForCriterion(verifyPortfolioCount((int)((PartitionedRegion)region).getLocalSize() + numPortfoliosPerVM), 5000, 200, true);
         }
         else {
           //After vm0 executed the query, we had to deserialize the values in our vm
-          DistributedTestCase.waitForCriterion(verifyPortfolioCount((int)((PartitionedRegion)region).getLocalSize() + numPortfoliosPerVM), 5000, 200, true);
+          Wait.waitForCriterion(verifyPortfolioCount((int)((PartitionedRegion)region).getLocalSize() + numPortfoliosPerVM), 5000, 200, true);
         }
         return null;
       }
@@ -281,7 +286,7 @@ public class CopyOnReadIndexDUnitTest extends CacheTestCase {
           //Due to index, we have deserialized all of the entries this vm currently host
           //This is the second query, because we have deserialized and cached these values, we just need to add the number of results a second time
           Index index = getCache().getQueryService().getIndex(region, "idIndex");
-          DistributedTestCase.waitForCriterion(verifyPortfolioCount((int)index.getStatistics().getNumberOfValues() + numExpectedResults + numExpectedResults + numPortfoliosPerVM), 5000, 200, true);
+          Wait.waitForCriterion(verifyPortfolioCount((int)index.getStatistics().getNumberOfValues() + numExpectedResults + numExpectedResults + numPortfoliosPerVM), 5000, 200, true);
         }
         else {
         //operations we have done on this vm consist of:
@@ -289,7 +294,7 @@ public class CopyOnReadIndexDUnitTest extends CacheTestCase {
           //Due to index, we have deserialized all of the entries this vm currently host
           //This is the second query, because we have deserialized and cached these values, we just need to add the number of results a second time
           //Because we have no index, we have to again deserialize all the values that this vm is hosting
-          DistributedTestCase.waitForCriterion(verifyPortfolioCount((int)(((PartitionedRegion)region).getLocalSize() + ((PartitionedRegion)region).getLocalSize() + numExpectedResults + numExpectedResults + numPortfoliosPerVM)), 5000, 200, true);
+          Wait.waitForCriterion(verifyPortfolioCount((int)(((PartitionedRegion)region).getLocalSize() + ((PartitionedRegion)region).getLocalSize() + numExpectedResults + numExpectedResults + numPortfoliosPerVM)), 5000, 200, true);
         }
         return null;
       }
@@ -342,7 +347,7 @@ public class CopyOnReadIndexDUnitTest extends CacheTestCase {
         }
         
         //We should have the same number of portfolio objects that we created for the put
-        DistributedTestCase.waitForCriterion(verifyPortfolioCount(numPortfolios), 5000, 200, true);
+        Wait.waitForCriterion(verifyPortfolioCount(numPortfolios), 5000, 200, true);
         return null;
       }
     });
@@ -351,7 +356,7 @@ public class CopyOnReadIndexDUnitTest extends CacheTestCase {
       public Object call() throws Exception {
         //At this point, we should only have serialized values in this vm
         Region region = getCache().getRegion("/portfolios");
-        DistributedTestCase.waitForCriterion(verifyPortfolioCount(0), 0, 200, true);
+        Wait.waitForCriterion(verifyPortfolioCount(0), 0, 200, true);
         return null;
       }
     });
@@ -361,10 +366,10 @@ public class CopyOnReadIndexDUnitTest extends CacheTestCase {
         //There is an index for vm2, so we should have deserialized values at this point,
         Region region = getCache().getRegion("/portfolios");
         if (hasIndex) {
-          DistributedTestCase.waitForCriterion(verifyPortfolioCount(numPortfolios), 0, 200, true);
+          Wait.waitForCriterion(verifyPortfolioCount(numPortfolios), 0, 200, true);
         }
         else {
-          DistributedTestCase.waitForCriterion(verifyPortfolioCount(0), 0, 200, true);
+          Wait.waitForCriterion(verifyPortfolioCount(0), 0, 200, true);
         }
         return null;
       }
@@ -401,12 +406,12 @@ public class CopyOnReadIndexDUnitTest extends CacheTestCase {
         txManager.commit();
         }
         catch (CommitConflictException conflict) {
-          fail("commit conflict exception", conflict);
+          Assert.fail("commit conflict exception", conflict);
         }
         
         //We have created puts from our previous callable
         //Now we have copied the results from the query 
-        DistributedTestCase.waitForCriterion(verifyPortfolioCount(numExpectedResults + numPortfolios), 0, 200, true);
+        Wait.waitForCriterion(verifyPortfolioCount(numExpectedResults + numPortfolios), 0, 200, true);
         return null;
       }
     });
@@ -434,7 +439,7 @@ public class CopyOnReadIndexDUnitTest extends CacheTestCase {
         }
         //first it must deserialize the portfolios in the replicated region
         //then we do a copy on read of these deserialized objects for the final result set
-        DistributedTestCase.waitForCriterion(verifyPortfolioCount(numExpectedResults + numPortfolios), 0, 200, true);
+        Wait.waitForCriterion(verifyPortfolioCount(numExpectedResults + numPortfolios), 0, 200, true);
 
         results = (SelectResults) query.execute();
         assertEquals(numExpectedResults, results.size());
@@ -452,7 +457,7 @@ public class CopyOnReadIndexDUnitTest extends CacheTestCase {
       
         //we never created index on vm1
         //so in this case, we always have to deserialize the value from the region
-        DistributedTestCase.waitForCriterion(verifyPortfolioCount(numPortfolios * 2 + numExpectedResults * 2), 0, 200, true);
+        Wait.waitForCriterion(verifyPortfolioCount(numPortfolios * 2 + numExpectedResults * 2), 0, 200, true);
         return null;
       }
     });
@@ -479,7 +484,7 @@ public class CopyOnReadIndexDUnitTest extends CacheTestCase {
           }
         }
         //with or without index, the values had to have been deserialized at one point
-        DistributedTestCase.waitForCriterion(verifyPortfolioCount(numPortfolios + numExpectedResults), 0, 200, true);        
+        Wait.waitForCriterion(verifyPortfolioCount(numPortfolios + numExpectedResults), 0, 200, true);        
         results = (SelectResults) query.execute();
         assertEquals(numExpectedResults, results.size());
         for (Object o: results) {
@@ -499,12 +504,12 @@ public class CopyOnReadIndexDUnitTest extends CacheTestCase {
           //we have an index, so the values are already deserialized
           //total is now our original deserialization amount : numPortfolios
           //two query results copied.
-          DistributedTestCase.waitForCriterion(verifyPortfolioCount(numPortfolios + numExpectedResults * 2), 0, 200, true);        
+          Wait.waitForCriterion(verifyPortfolioCount(numPortfolios + numExpectedResults * 2), 0, 200, true);        
         }
         else {
           //we never created index on vm1
           //so in this case, we always have to deserialize the value from the region
-          DistributedTestCase.waitForCriterion(verifyPortfolioCount(numPortfolios * 2 + numExpectedResults * 2), 0, 200, true);        
+          Wait.waitForCriterion(verifyPortfolioCount(numPortfolios * 2 + numExpectedResults * 2), 0, 200, true);        
         }
         return null;
       }
@@ -531,7 +536,7 @@ public class CopyOnReadIndexDUnitTest extends CacheTestCase {
         }
         
         //with or without index, the values we put in the region were already deserialized values
-        DistributedTestCase.waitForCriterion(verifyPortfolioCount(numExpectedResults * 2 + numPortfolios), 0, 200, true);        
+        Wait.waitForCriterion(verifyPortfolioCount(numExpectedResults * 2 + numPortfolios), 0, 200, true);        
         return null;
       }
     });
@@ -607,7 +612,7 @@ public class CopyOnReadIndexDUnitTest extends CacheTestCase {
         getSystem(props);
         
         final ClientCacheFactory ccf = new ClientCacheFactory(props);
-        ccf.addPoolServer(getServerHostName(server.getHost()), port);
+        ccf.addPoolServer(NetworkSupport.getServerHostName(server.getHost()), port);
         ccf.setPoolSubscriptionEnabled(true);
         
         ClientCache cache = (ClientCache)getClientCache(ccf);
@@ -624,7 +629,7 @@ public class CopyOnReadIndexDUnitTest extends CacheTestCase {
 
   protected Properties getServerProperties() {
     Properties p = new Properties();
-    p.setProperty(DistributionConfig.LOCATORS_NAME, "localhost["+getDUnitLocatorPort()+"]");
+    p.setProperty(DistributionConfig.LOCATORS_NAME, "localhost["+DUnitEnv.getDUnitLocatorPort()+"]");
     return p;
   }
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/e2f18f97/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/IndexCreationInternalsJUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/IndexCreationInternalsJUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/IndexCreationInternalsJUnitTest.java
index 3f23810..c6d0ac1 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/IndexCreationInternalsJUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/IndexCreationInternalsJUnitTest.java
@@ -45,7 +45,7 @@ import com.gemstone.gemfire.cache.query.internal.CompiledRegion;
 import com.gemstone.gemfire.cache.query.internal.QCompiler;
 import com.gemstone.gemfire.cache.query.internal.types.TypeUtils;
 import com.gemstone.gemfire.internal.cache.LocalRegion;
-import com.gemstone.gemfire.test.dunit.DistributedTestCase;
+import com.gemstone.gemfire.test.dunit.Threads;
 import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
 
 /**
@@ -199,8 +199,8 @@ public class IndexCreationInternalsJUnitTest {
     th1.start();
     th2.start();
     name = imgr.putCanonicalizedIteratorNameIfAbsent("index_iter1.coll1");
-    DistributedTestCase.join(th1, 30 * 1000, null);
-    DistributedTestCase.join(th2, 30 * 1000, null);
+    Threads.join(th1, 30 * 1000);
+    Threads.join(th2, 30 * 1000);
     if( !(name.equals(this.childThreadName1) && name.equals(this.childThreadName2)) ) {
      fail("Canonicalization name generation test failed in concurrent scenario as first name is "+this.childThreadName1 + "and second is "+name + " and third is "+this.childThreadName2);   
     }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/e2f18f97/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/IndexMaintainceJUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/IndexMaintainceJUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/IndexMaintainceJUnitTest.java
index 9b9b1f7..5ddb008 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/IndexMaintainceJUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/IndexMaintainceJUnitTest.java
@@ -51,7 +51,7 @@ import com.gemstone.gemfire.cache.query.data.Portfolio;
 import com.gemstone.gemfire.cache.query.functional.StructSetOrResultsSet;
 import com.gemstone.gemfire.cache.query.internal.QueryObserverAdapter;
 import com.gemstone.gemfire.cache.query.internal.QueryObserverHolder;
-import com.gemstone.gemfire.test.dunit.DistributedTestCase;
+import com.gemstone.gemfire.test.dunit.Threads;
 import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
 
 /**
@@ -322,7 +322,7 @@ public class IndexMaintainceJUnitTest {
             }
           });
           th.start();
-          DistributedTestCase.join(th, 30 * 1000, null);
+          Threads.join(th, 30 * 1000);
           assertTrue(IndexMaintainceJUnitTest.region.size() == 1);
         }
       });

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/e2f18f97/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/IndexTrackingQueryObserverDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/IndexTrackingQueryObserverDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/IndexTrackingQueryObserverDUnitTest.java
index f12df85..f2fb0ac 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/IndexTrackingQueryObserverDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/IndexTrackingQueryObserverDUnitTest.java
@@ -42,10 +42,13 @@ import com.gemstone.gemfire.cache30.CacheTestCase;
 import com.gemstone.gemfire.internal.cache.LocalRegion;
 import com.gemstone.gemfire.internal.cache.PartitionedRegion;
 import com.gemstone.gemfire.internal.cache.PartitionedRegionQueryEvaluator.TestHook;
+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.SerializableRunnable;
 import com.gemstone.gemfire.test.dunit.VM;
+import com.gemstone.gemfire.test.dunit.Wait;
+import com.gemstone.gemfire.test.dunit.WaitCriterion;
 
 /**
  * @author shobhit
@@ -121,11 +124,11 @@ public class IndexTrackingQueryObserverDUnitTest extends CacheTestCase {
     });
 
     if (async1.exceptionOccurred()) {
-      fail("", async1.getException());
+      Assert.fail("", async1.getException());
     }
 
     if (async1.exceptionOccurred()) {
-      fail("", async1.getException());
+      Assert.fail("", async1.getException());
     }
   }
 
@@ -195,7 +198,7 @@ public class IndexTrackingQueryObserverDUnitTest extends CacheTestCase {
             assertTrue(keyIndex1 instanceof PartitionedIndex);
           }
         } catch (Exception e) {
-          fail("While creating Index on PR", e);
+          Assert.fail("While creating Index on PR", e);
         }
         Region region = getCache().getRegion("portfolio");
         //Inject TestHook in QueryObserver before running query.
@@ -224,7 +227,7 @@ public class IndexTrackingQueryObserverDUnitTest extends CacheTestCase {
         try {
           results = (SelectResults) query.execute();
         } catch (Exception e) {
-          fail("While running query on PR", e);
+          Assert.fail("While running query on PR", e);
         }
 
         // The query should return all elements in region.
@@ -249,7 +252,7 @@ public class IndexTrackingQueryObserverDUnitTest extends CacheTestCase {
         final IndexTrackingTestHook th = (IndexTrackingTestHook) ((IndexTrackingQueryObserver) observer)
             .getTestHook();
 
-        waitForCriterion(new WaitCriterion() {
+        Wait.waitForCriterion(new WaitCriterion() {
 
           public boolean done() {
             if(th.getRegionMap() != null) {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/e2f18f97/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/InitializeIndexEntryDestroyQueryDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/InitializeIndexEntryDestroyQueryDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/InitializeIndexEntryDestroyQueryDUnitTest.java
index 6b07d48..8cb1238 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/InitializeIndexEntryDestroyQueryDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/InitializeIndexEntryDestroyQueryDUnitTest.java
@@ -34,10 +34,12 @@ import com.gemstone.gemfire.cache.query.internal.Undefined;
 import com.gemstone.gemfire.cache.query.partitioned.PRQueryDUnitHelper;
 import com.gemstone.gemfire.cache30.CacheSerializableRunnable;
 import com.gemstone.gemfire.cache30.CacheTestCase;
+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.Threads;
 import com.gemstone.gemfire.test.dunit.VM;
+import com.gemstone.gemfire.test.dunit.Wait;
 
 /**
  * Test creates a local region. Creates and removes index in a parallel running thread.
@@ -121,11 +123,11 @@ public class InitializeIndexEntryDestroyQueryDUnitTest extends CacheTestCase {
           }
           assertNotNull(index);
 
-          pause(100);
+          Wait.pause(100);
 
           PRQHelp.getCache().getQueryService().removeIndex(index);
 
-          pause(100);
+          Wait.pause(100);
         }
       }
     });
@@ -147,7 +149,7 @@ public class InitializeIndexEntryDestroyQueryDUnitTest extends CacheTestCase {
           PRQHelp.getCache().getLogger().fine("Going to destroy the value" + p);
           r.destroy(j);
 
-          pause(100);
+          Wait.pause(100);
 
           //Put the value back again.
           PRQHelp.getCache().getLogger().fine("Putting the value back" + p);
@@ -194,14 +196,14 @@ public class InitializeIndexEntryDestroyQueryDUnitTest extends CacheTestCase {
       }
     });
     
-    DistributedTestCase.join(asyInvk0, 1000 * 1000, getLogWriter());
+    Threads.join(asyInvk0, 1000 * 1000);
     if (asyInvk0.exceptionOccurred()) {
-      fail("asyInvk0 failed", asyInvk0.getException());
+      Assert.fail("asyInvk0 failed", asyInvk0.getException());
     }
     
-    DistributedTestCase.join(asyInvk1, 1000 * 1000, getLogWriter());
+    Threads.join(asyInvk1, 1000 * 1000);
     if (asyInvk1.exceptionOccurred()) {
-      fail("asyInvk1 failed", asyInvk1.getException());
+      Assert.fail("asyInvk1 failed", asyInvk1.getException());
     }
   }
 
@@ -283,7 +285,7 @@ public class InitializeIndexEntryDestroyQueryDUnitTest extends CacheTestCase {
           PRQHelp.getCache().getLogger().fine("Going to destroy the value" + p);
           r.destroy(j);
 
-          pause(20);
+          Wait.pause(20);
 
           //Put the value back again.
           PRQHelp.getCache().getLogger().fine("Putting the value back" + p);
@@ -330,14 +332,14 @@ public class InitializeIndexEntryDestroyQueryDUnitTest extends CacheTestCase {
       }
     });
 
-    DistributedTestCase.join(asyInvk0, 1000 * 1000, getLogWriter());
+    Threads.join(asyInvk0, 1000 * 1000);
     if (asyInvk0.exceptionOccurred()) {
-      fail("asyInvk0 failed", asyInvk0.getException());
+      Assert.fail("asyInvk0 failed", asyInvk0.getException());
     }
     
-    DistributedTestCase.join(asyInvk1, 1000 * 1000, getLogWriter());
+    Threads.join(asyInvk1, 1000 * 1000);
     if (asyInvk1.exceptionOccurred()) {
-      fail("asyInvk1 failed", asyInvk1.getException());
+      Assert.fail("asyInvk1 failed", asyInvk1.getException());
     }
   }
 
@@ -419,7 +421,7 @@ public class InitializeIndexEntryDestroyQueryDUnitTest extends CacheTestCase {
             PRQHelp.getCache().getLogger().fine("Querying the region with " + query);
             results = (SelectResults)query.execute();
           } catch (Exception e) {
-            fail("Query: " + query + " execution failed with exception", e);
+            Assert.fail("Query: " + query + " execution failed with exception", e);
           }
 
           for (Object obj : results) {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/e2f18f97/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/MultiIndexCreationDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/MultiIndexCreationDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/MultiIndexCreationDUnitTest.java
index a81078a..c6fc4e0 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/MultiIndexCreationDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/MultiIndexCreationDUnitTest.java
@@ -31,10 +31,12 @@ import com.gemstone.gemfire.cache.query.internal.QueryObserverHolder;
 import com.gemstone.gemfire.cache.query.internal.index.IndexManager.TestHook;
 import com.gemstone.gemfire.cache30.CacheTestCase;
 import com.gemstone.gemfire.test.dunit.AsyncInvocation;
-import com.gemstone.gemfire.test.dunit.DistributedTestCase;
 import com.gemstone.gemfire.test.dunit.Host;
+import com.gemstone.gemfire.test.dunit.Invoke;
 import com.gemstone.gemfire.test.dunit.SerializableCallable;
+import com.gemstone.gemfire.test.dunit.Threads;
 import com.gemstone.gemfire.test.dunit.VM;
+import com.gemstone.gemfire.test.dunit.Wait;
 
 public class MultiIndexCreationDUnitTest extends CacheTestCase {
 
@@ -88,7 +90,7 @@ public class MultiIndexCreationDUnitTest extends CacheTestCase {
         long giveupTime = System.currentTimeMillis() + 60000;
         while (!hooked && System.currentTimeMillis() < giveupTime) {
           getLogWriter().info("Query Waiting for index hook.");
-          pause(100);
+          Wait.pause(100);
         }
         assertTrue(hooked);
         
@@ -124,12 +126,12 @@ public class MultiIndexCreationDUnitTest extends CacheTestCase {
       }
     });
     
-    DistributedTestCase.join(a1, 6000, this.getLogWriter());
+    Threads.join(a1, 6000);
     
     if(a1.exceptionOccurred()) {
       fail(a1.getException().getMessage());
     }
-    DistributedTestCase.join(a2, 6000, this.getLogWriter());
+    Threads.join(a2, 6000);
     if(a2.exceptionOccurred()) {
       fail(a2.getException().getMessage());
     }
@@ -169,11 +171,11 @@ public class MultiIndexCreationDUnitTest extends CacheTestCase {
   }
 
   @Override
-  public void tearDown2() throws Exception {
+  public void tearDownBeforeDisconnect() throws Exception {
     hooked = false;
-    invokeInEveryVM(CacheTestCase.class, "disconnectFromDS");
-    super.tearDown2();
-    invokeInEveryVM(QueryObserverHolder.class, "reset");
+    Invoke.invokeInEveryVM(CacheTestCase.class, "disconnectFromDS");
+    super.tearDownBeforeDisconnect();
+    Invoke.invokeInEveryVM(QueryObserverHolder.class, "reset");
   }
 
   private static class MultiIndexCreationTestHook implements TestHook {
@@ -186,7 +188,7 @@ public class MultiIndexCreationDUnitTest extends CacheTestCase {
         getLogWriter().info("MultiIndexCreationTestHook is hooked in create defined indexes.");
         while (hooked && System.currentTimeMillis() < giveupTime) {
           getLogWriter().info("MultiIndexCreationTestHook waiting.");
-          pause(100);
+          Wait.pause(100);
         }
         assertEquals(hooked, false);
       }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/e2f18f97/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/PutAllWithIndexPerfDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/PutAllWithIndexPerfDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/PutAllWithIndexPerfDUnitTest.java
index 040a671..3162dc7 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/PutAllWithIndexPerfDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/PutAllWithIndexPerfDUnitTest.java
@@ -39,7 +39,10 @@ import com.gemstone.gemfire.cache.server.CacheServer;
 import com.gemstone.gemfire.cache30.CacheSerializableRunnable;
 import com.gemstone.gemfire.cache30.CacheTestCase;
 import com.gemstone.gemfire.internal.AvailablePort;
+import com.gemstone.gemfire.test.dunit.Assert;
+import com.gemstone.gemfire.test.dunit.DUnitEnv;
 import com.gemstone.gemfire.test.dunit.Host;
+import com.gemstone.gemfire.test.dunit.NetworkSupport;
 import com.gemstone.gemfire.test.dunit.VM;
 import com.gemstone.gemfire.test.junit.categories.DistributedTest;
 
@@ -65,9 +68,9 @@ public class PutAllWithIndexPerfDUnitTest extends CacheTestCase {
     disconnectAllFromDS();
   }
 
-  public void tearDown2() throws Exception {
+  public void tearDownBeforeDisconnect() throws Exception {
     try {
-      super.tearDown2();
+      super.tearDownBeforeDisconnect();
     }
     finally {
       disconnectAllFromDS();
@@ -85,7 +88,7 @@ public class PutAllWithIndexPerfDUnitTest extends CacheTestCase {
     vm0.invoke(new CacheSerializableRunnable("Create Bridge Server") {
         public void run2() throws CacheException {
           Properties config = new Properties();
-          config.put("locators", "localhost["+getDUnitLocatorPort()+"]");
+          config.put("locators", "localhost["+DUnitEnv.getDUnitLocatorPort()+"]");
           Cache cache = new CacheFactory(config).create();
           AttributesFactory factory = new AttributesFactory();
           factory.setScope(Scope.LOCAL);
@@ -93,20 +96,20 @@ public class PutAllWithIndexPerfDUnitTest extends CacheTestCase {
           try {
             startBridgeServer(0, false);
           } catch (Exception ex) {
-            fail("While starting CacheServer", ex);
+            Assert.fail("While starting CacheServer", ex);
           }
           //Create Index on empty region
           try {
             cache.getQueryService().createIndex("idIndex", "ID", "/"+name);
           } catch (Exception e) {
-            fail("index creation failed", e);
+            Assert.fail("index creation failed", e);
           }
         }
       });
 
     // Create client region
     final int port = vm0.invokeInt(PutAllWithIndexPerfDUnitTest.class, "getCacheServerPort");
-    final String host0 = getServerHostName(vm0.getHost());
+    final String host0 = NetworkSupport.getServerHostName(vm0.getHost());
     vm1.invoke(new CacheSerializableRunnable("Create region") {
         public void run2() throws CacheException {
           Properties config = new Properties();
@@ -157,7 +160,7 @@ public class PutAllWithIndexPerfDUnitTest extends CacheTestCase {
           cache.getRegion(name).clear();
           cache.getQueryService().createIndex("idIndex", "p.ID", "/"+name+" p");
         } catch (Exception e) {
-          fail("index creation failed", e);
+          Assert.fail("index creation failed", e);
         }
       }
     });



Mime
View raw message