geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dschnei...@apache.org
Subject [49/61] [abbrv] [partial] incubator-geode git commit: GEODE-773: Extract static methods from DistributedTestCase
Date Thu, 11 Feb 2016 00:39:23 GMT
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/820cfd63/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/dunit/PdxStringQueryDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/dunit/PdxStringQueryDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/dunit/PdxStringQueryDUnitTest.java
index 52a3763..42459c9 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/dunit/PdxStringQueryDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/dunit/PdxStringQueryDUnitTest.java
@@ -61,8 +61,13 @@ import com.gemstone.gemfire.internal.AvailablePortHelper;
 import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
 import com.gemstone.gemfire.internal.cache.persistence.query.CloseableIterator;
 import com.gemstone.gemfire.pdx.internal.PdxString;
+import com.gemstone.gemfire.test.dunit.Assert;
 import com.gemstone.gemfire.test.dunit.DistributedTestCase;
 import com.gemstone.gemfire.test.dunit.Host;
+import com.gemstone.gemfire.test.dunit.IgnoredException;
+import com.gemstone.gemfire.test.dunit.Invoke;
+import com.gemstone.gemfire.test.dunit.LogWriterUtils;
+import com.gemstone.gemfire.test.dunit.NetworkUtils;
 import com.gemstone.gemfire.test.dunit.SerializableCallable;
 import com.gemstone.gemfire.test.dunit.SerializableRunnable;
 import com.gemstone.gemfire.test.dunit.VM;
@@ -129,7 +134,7 @@ public class PdxStringQueryDUnitTest extends CacheTestCase{
         try {
           localQueryService = getCache().getQueryService();
         } catch (Exception e) {
-          fail("Failed to get QueryService.", e);
+          Assert.fail("Failed to get QueryService.", e);
         } 
         Index index = null;
         // create an index on statusIndexed is created
@@ -165,7 +170,7 @@ public class PdxStringQueryDUnitTest extends CacheTestCase{
     final int port1 = server1.invokeInt(PdxStringQueryDUnitTest.class, "getCacheServerPort");
     final int port2 = server2.invokeInt(PdxStringQueryDUnitTest.class, "getCacheServerPort");
 
-    final String host0 = getServerHostName(server0.getHost());
+    final String host0 = NetworkUtils.getServerHostName(server0.getHost());
 
     // Create client pool.
     final String poolName = "testClientServerQueryPool"; 
@@ -178,7 +183,7 @@ public class PdxStringQueryDUnitTest extends CacheTestCase{
         factory.setScope(Scope.LOCAL);
         ClientServerTestCase.configureConnectionPool(factory, host0, port1,-1, true, -1, -1, null);
         Region region = createRegion(regionName, rootRegionName,  factory.create());
-        getLogWriter().info("Put PortfolioPdx");
+        LogWriterUtils.getLogWriter().info("Put PortfolioPdx");
         for (int i=0; i<numberOfEntries; i++) {
           region.put("key-"+i, new PortfolioPdx(i));
          }
@@ -200,43 +205,43 @@ public class PdxStringQueryDUnitTest extends CacheTestCase{
           remoteQueryService = (PoolManager.find(poolName)).getQueryService();
           localQueryService = getCache().getQueryService();
         } catch (Exception e) {
-          fail("Failed to get QueryService.", e);
+          Assert.fail("Failed to get QueryService.", e);
         }
         
         for (int i=0; i < queryString.length; i++){
           try {
-            getLogWriter().info("### Executing Query on remote server:" + queryString[i]);
+            LogWriterUtils.getLogWriter().info("### Executing Query on remote server:" + queryString[i]);
             Query query = remoteQueryService.newQuery(queryString[i]);
             rs[0][0] = (SelectResults)query.execute();
             resWithoutIndexRemote[i] = rs[0][0];
-            getLogWriter().info("RR remote indexType: no index  size of resultset: "+ rs[0][0].size() + " for query: " + queryString[i]);;
+            LogWriterUtils.getLogWriter().info("RR remote indexType: no index  size of resultset: "+ rs[0][0].size() + " for query: " + queryString[i]);;
             checkForPdxString(rs[0][0].asList(), queryString[i]);
             
-            getLogWriter().info("### Executing Query locally on client:" + queryString[i]);
+            LogWriterUtils.getLogWriter().info("### Executing Query locally on client:" + queryString[i]);
             query = localQueryService.newQuery(queryString[i]);
             rs[0][1] = (SelectResults)query.execute();
             resWithoutIndexLocal[i] = rs[0][1];
-            getLogWriter().info("RR  client local indexType:no index size of resultset: "+ rs[0][1].size() + " for query: " + queryString[i]);;
+            LogWriterUtils.getLogWriter().info("RR  client local indexType:no index size of resultset: "+ rs[0][1].size() + " for query: " + queryString[i]);;
             checkForPdxString(rs[0][1].asList(), queryString[i]);
           } catch (Exception e) {
-            fail("Failed executing " + queryString[i], e);
+            Assert.fail("Failed executing " + queryString[i], e);
           }
           try{
             // to compare remote query results with and without index
-            getLogWriter().info("### Executing Query on remote server for region2:" + queryString2[i]);
+            LogWriterUtils.getLogWriter().info("### Executing Query on remote server for region2:" + queryString2[i]);
             Query query = remoteQueryService.newQuery(queryString2[i]);
             resWithIndexRemote[i] = (SelectResults)query.execute();
-            getLogWriter().info("RR  remote region2 size of resultset: "+ resWithIndexRemote[i].size() + " for query: " + queryString2[i]);;
+            LogWriterUtils.getLogWriter().info("RR  remote region2 size of resultset: "+ resWithIndexRemote[i].size() + " for query: " + queryString2[i]);;
             checkForPdxString(resWithIndexRemote[i].asList(), queryString2[i]);
 
            // to compare local query results with and without index
-            getLogWriter().info("### Executing Query on local for region2:" + queryString2[i]);
+            LogWriterUtils.getLogWriter().info("### Executing Query on local for region2:" + queryString2[i]);
             query = localQueryService.newQuery(queryString2[i]);
             resWithIndexLocal[i] = (SelectResults)query.execute();
-            getLogWriter().info("RR  local region2 size of resultset: "+ resWithIndexLocal[i].size() + " for query: " + queryString2[i]);;
+            LogWriterUtils.getLogWriter().info("RR  local region2 size of resultset: "+ resWithIndexLocal[i].size() + " for query: " + queryString2[i]);;
             checkForPdxString(resWithIndexLocal[i].asList(), queryString2[i]);
           } catch (Exception e) {
-            fail("Failed executing " + queryString2[i], e);
+            Assert.fail("Failed executing " + queryString2[i], e);
           }
 
             if(i < orderByQueryIndex){
@@ -290,7 +295,7 @@ public class PdxStringQueryDUnitTest extends CacheTestCase{
       public void run2() throws CacheException {
         Region region = getRootRegion().getSubregion(regionName);
 
-        getLogWriter().info("Put Objects locally on server");
+        LogWriterUtils.getLogWriter().info("Put Objects locally on server");
         for (int i=numberOfEntries; i<numberOfEntries*2; i++) {
           region.put("key-"+i, new Portfolio(i));
          }
@@ -299,22 +304,22 @@ public class PdxStringQueryDUnitTest extends CacheTestCase{
         // Query server1 locally to check if PdxString is not being returned
         for (int i = 0; i < queryString.length; i++) {
           try {
-            getLogWriter().info("### Executing Query locally on server:" + queryString[i]);
+            LogWriterUtils.getLogWriter().info("### Executing Query locally on server:" + queryString[i]);
             SelectResults rs = (SelectResults) localQueryService.newQuery(queryString[i]).execute();
-            getLogWriter().info("RR server local indexType: no  size of resultset: " + rs.size() + " for query: " + queryString[i]);
+            LogWriterUtils.getLogWriter().info("RR server local indexType: no  size of resultset: " + rs.size() + " for query: " + queryString[i]);
             // The results should not be PdxString
             checkForPdxString(rs.asList(), queryString[i]);
 
           } catch (Exception e) {
-            fail("Failed executing " + queryString[i], e);
+            Assert.fail("Failed executing " + queryString[i], e);
           }
           try{
             SelectResults rs = (SelectResults) localQueryService.newQuery(queryString2[i]).execute();
-            getLogWriter().info("RR server local indexType: no size of resultset: " + rs.size() + " for query: " + queryString2[i]);
+            LogWriterUtils.getLogWriter().info("RR server local indexType: no size of resultset: " + rs.size() + " for query: " + queryString2[i]);
             // The results should not be PdxString
             checkForPdxString(rs.asList(), queryString2[i]);
           }catch (Exception e) {
-            fail("Failed executing " + queryString2[i], e);
+            Assert.fail("Failed executing " + queryString2[i], e);
           }
         }
        }
@@ -330,13 +335,13 @@ public class PdxStringQueryDUnitTest extends CacheTestCase{
         // Query server1 locally to check if PdxString is not being returned
         for (int i = 0; i < queryString.length; i++) {
           try {
-            getLogWriter().info("### Executing Query locally on server:" + queryString[i]);
+            LogWriterUtils.getLogWriter().info("### Executing Query locally on server:" + queryString[i]);
             SelectResults rs = (SelectResults) localQueryService.newQuery(queryString[i]).execute();
-            getLogWriter().info("isPR: false server local readSerializedTrue: indexType: false size of resultset: " + rs.size() + " for query: " + queryString[i]);
+            LogWriterUtils.getLogWriter().info("isPR: false server local readSerializedTrue: indexType: false size of resultset: " + rs.size() + " for query: " + queryString[i]);
             // The results should not be PdxString
             checkForPdxString(rs.asList(), queryString[i]);
           } catch (Exception e) {
-            fail("Failed executing " + queryString[i], e);
+            Assert.fail("Failed executing " + queryString[i], e);
           }
         }
       }
@@ -352,13 +357,13 @@ public class PdxStringQueryDUnitTest extends CacheTestCase{
         // Query server1 remotely to check if PdxString is not being returned
         for (int i = 0; i < queryString.length; i++) {
           try {
-            getLogWriter().info("### Executing Query locally on server:" + queryString[i]);
+            LogWriterUtils.getLogWriter().info("### Executing Query locally on server:" + queryString[i]);
             SelectResults rs = (SelectResults) remoteQueryService.newQuery(queryString[i]).execute();
-            getLogWriter().info("RR server remote readSerializedTrue: indexType: false size of resultset: " + rs.size() + " for query: " + queryString[i]);
+            LogWriterUtils.getLogWriter().info("RR server remote readSerializedTrue: indexType: false size of resultset: " + rs.size() + " for query: " + queryString[i]);
             // The results should not be PdxString
             checkForPdxString(rs.asList(), queryString[i]);
           } catch (Exception e) {
-            fail("Failed executing " + queryString[i], e);
+            Assert.fail("Failed executing " + queryString[i], e);
           }
         }
       }
@@ -387,7 +392,7 @@ public class PdxStringQueryDUnitTest extends CacheTestCase{
         try {
           localQueryService = getCache().getQueryService();
         } catch (Exception e) {
-          fail("Failed to get QueryService.", e);
+          Assert.fail("Failed to get QueryService.", e);
         } 
         // Verify the type of index created  
         Index index = null;
@@ -423,7 +428,7 @@ public class PdxStringQueryDUnitTest extends CacheTestCase{
     final int port1 = server1.invokeInt(PdxStringQueryDUnitTest.class, "getCacheServerPort");
     final int port2 = server2.invokeInt(PdxStringQueryDUnitTest.class, "getCacheServerPort");
 
-    final String host0 = getServerHostName(server0.getHost());
+    final String host0 = NetworkUtils.getServerHostName(server0.getHost());
 
     // Create client pool.
     final String poolName = "testClientServerQueryPool"; 
@@ -436,7 +441,7 @@ public class PdxStringQueryDUnitTest extends CacheTestCase{
         factory.setScope(Scope.LOCAL);
         ClientServerTestCase.configureConnectionPool(factory, host0, port1,-1, true, -1, -1, null);
         Region region = createRegion(regionName, rootRegionName,  factory.create());
-        getLogWriter().info("Put PortfolioPdx");
+        LogWriterUtils.getLogWriter().info("Put PortfolioPdx");
         for (int i=0; i<numberOfEntries; i++) {
           region.put("key-"+i, new PortfolioPdx(i));
          }
@@ -472,21 +477,21 @@ public class PdxStringQueryDUnitTest extends CacheTestCase{
           remoteQueryService = (PoolManager.find(poolName)).getQueryService();
           localQueryService = getCache().getQueryService();
         } catch (Exception e) {
-          fail("Failed to get QueryService.", e);
+          Assert.fail("Failed to get QueryService.", e);
         }
         
         for (int i=0; i < queryString.length; i++){
           try {
-            getLogWriter().info("### Executing Query on remote server:" + queryString[i]);
+            LogWriterUtils.getLogWriter().info("### Executing Query on remote server:" + queryString[i]);
             Query query = remoteQueryService.newQuery(queryString[i]);
             rs[0][0] = (SelectResults)query.execute();
-            getLogWriter().info("RR remote indexType: CompactRange size of resultset: "+ rs[0][0].size() + " for query: " + queryString[i]);;
+            LogWriterUtils.getLogWriter().info("RR remote indexType: CompactRange size of resultset: "+ rs[0][0].size() + " for query: " + queryString[i]);;
             checkForPdxString(rs[0][0].asList(), queryString[i]);
              
-            getLogWriter().info("### Executing Query locally on client:" + queryString[i]);
+            LogWriterUtils.getLogWriter().info("### Executing Query locally on client:" + queryString[i]);
             query = localQueryService.newQuery(queryString[i]);
             rs[0][1] = (SelectResults)query.execute();
-            getLogWriter().info("RR  client local indexType: CompactRange size of resultset: "+ rs[0][1].size() + " for query: " + queryString[i]);;
+            LogWriterUtils.getLogWriter().info("RR  client local indexType: CompactRange size of resultset: "+ rs[0][1].size() + " for query: " + queryString[i]);;
             checkForPdxString(rs[0][1].asList(), queryString[i]);
              
             if(i < orderByQueryIndex){
@@ -500,7 +505,7 @@ public class PdxStringQueryDUnitTest extends CacheTestCase{
               compareResultsOrder(rs, false);
             }
           } catch (Exception e) {
-            fail("Failed executing " + queryString[i], e);
+            Assert.fail("Failed executing " + queryString[i], e);
           }
         }
         
@@ -514,7 +519,7 @@ public class PdxStringQueryDUnitTest extends CacheTestCase{
       public void run2() throws CacheException {
         Region region = getRootRegion().getSubregion(regionName);
 
-        getLogWriter().info("Put Objects locally on server");
+        LogWriterUtils.getLogWriter().info("Put Objects locally on server");
         for (int i=numberOfEntries; i<numberOfEntries*2; i++) {
           region.put("key-"+i, new Portfolio(i));
          }
@@ -523,13 +528,13 @@ public class PdxStringQueryDUnitTest extends CacheTestCase{
         // Query server1 locally to check if PdxString is not being returned
         for (int i = 0; i < queryString.length; i++) {
           try {
-            getLogWriter().info("### Executing Query locally on server:" + queryString[i]);
+            LogWriterUtils.getLogWriter().info("### Executing Query locally on server:" + queryString[i]);
             SelectResults rs = (SelectResults) localQueryService.newQuery(queryString[i]).execute();
-            getLogWriter().info("RR server local indexType:Range  size of resultset: " + rs.size() + " for query: " + queryString[i]);
+            LogWriterUtils.getLogWriter().info("RR server local indexType:Range  size of resultset: " + rs.size() + " for query: " + queryString[i]);
             // The results should not be PdxString
             checkForPdxString(rs.asList(), queryString[i]);
           } catch (Exception e) {
-            fail("Failed executing " + queryString[i], e);
+            Assert.fail("Failed executing " + queryString[i], e);
           }
         }
        }
@@ -544,13 +549,13 @@ public class PdxStringQueryDUnitTest extends CacheTestCase{
         // Query server1 locally to check if PdxString is not being returned
         for (int i = 0; i < queryString.length; i++) {
           try {
-            getLogWriter().info("### Executing Query locally on server:" + queryString[i]);
+            LogWriterUtils.getLogWriter().info("### Executing Query locally on server:" + queryString[i]);
             SelectResults rs = (SelectResults) localQueryService.newQuery(queryString[i]).execute();
-            getLogWriter().info("RR server local readSerializedTrue: indexType: CompactRange size of resultset: " + rs.size() + " for query: " + queryString[i]);
+            LogWriterUtils.getLogWriter().info("RR server local readSerializedTrue: indexType: CompactRange size of resultset: " + rs.size() + " for query: " + queryString[i]);
             // The results should not be PdxString
             checkForPdxString(rs.asList(), queryString[i]);
           } catch (Exception e) {
-            fail("Failed executing " + queryString[i], e);
+            Assert.fail("Failed executing " + queryString[i], e);
           }
         }
       }
@@ -566,13 +571,13 @@ public class PdxStringQueryDUnitTest extends CacheTestCase{
         // Query server1 remotely to check if PdxString is not being returned
         for (int i = 0; i < queryString.length; i++) {
           try {
-            getLogWriter().info("### Executing Query locally on server:" + queryString[i]);
+            LogWriterUtils.getLogWriter().info("### Executing Query locally on server:" + queryString[i]);
             SelectResults rs = (SelectResults) remoteQueryService.newQuery(queryString[i]).execute();
-            getLogWriter().info("RR server remote readSerializedTrue: indexType:CompactRange size of resultset: " + rs.size() + " for query: " + queryString[i]);
+            LogWriterUtils.getLogWriter().info("RR server remote readSerializedTrue: indexType:CompactRange size of resultset: " + rs.size() + " for query: " + queryString[i]);
             // The results should not be PdxString
             checkForPdxString(rs.asList(), queryString[i]);
           } catch (Exception e) {
-            fail("Failed executing " + queryString[i], e);
+            Assert.fail("Failed executing " + queryString[i], e);
           }
         }
       }
@@ -600,7 +605,7 @@ public class PdxStringQueryDUnitTest extends CacheTestCase{
         try {
           localQueryService = getCache().getQueryService();
         } catch (Exception e) {
-          fail("Failed to get QueryService.", e);
+          Assert.fail("Failed to get QueryService.", e);
         } 
         // Verify the type of index created  
         Index index = null;
@@ -635,7 +640,7 @@ public class PdxStringQueryDUnitTest extends CacheTestCase{
     final int port0 = server0.invokeInt(PdxStringQueryDUnitTest.class, "getCacheServerPort");
     final int port1 = server1.invokeInt(PdxStringQueryDUnitTest.class, "getCacheServerPort");
     final int port2 = server2.invokeInt(PdxStringQueryDUnitTest.class, "getCacheServerPort");
-    final String host0 = getServerHostName(server0.getHost());
+    final String host0 = NetworkUtils.getServerHostName(server0.getHost());
 
     // Create client pool.
     final String poolName = "testClientServerQueryPool"; 
@@ -648,7 +653,7 @@ public class PdxStringQueryDUnitTest extends CacheTestCase{
         factory.setScope(Scope.LOCAL);
         ClientServerTestCase.configureConnectionPool(factory, host0, port1,-1, true, -1, -1, null);
         Region region = createRegion(regionName, rootRegionName,  factory.create());
-        getLogWriter().info("Put PortfolioPdx");
+        LogWriterUtils.getLogWriter().info("Put PortfolioPdx");
         for (int i=0; i<numberOfEntries; i++) {
           region.put("key-"+i, new PortfolioPdx(i));
          }
@@ -680,21 +685,21 @@ public class PdxStringQueryDUnitTest extends CacheTestCase{
           remoteQueryService = (PoolManager.find(poolName)).getQueryService();
           localQueryService = getCache().getQueryService();
         } catch (Exception e) {
-          fail("Failed to get QueryService.", e);
+          Assert.fail("Failed to get QueryService.", e);
         }
         
         for (int i=0; i < queryString.length; i++){
           try {
-            getLogWriter().info("### Executing Query on remote server:" + queryString[i]);
+            LogWriterUtils.getLogWriter().info("### Executing Query on remote server:" + queryString[i]);
             Query query = remoteQueryService.newQuery(queryString[i]);
             rs[0][0] = (SelectResults)query.execute();
-            getLogWriter().info("RR remote indexType: Range size of resultset: "+ rs[0][0].size() + " for query: " + queryString[i]);;
+            LogWriterUtils.getLogWriter().info("RR remote indexType: Range size of resultset: "+ rs[0][0].size() + " for query: " + queryString[i]);;
             checkForPdxString(rs[0][0].asList(), queryString[i]);
            
-            getLogWriter().info("### Executing Query locally on client:" + queryString[i]);
+            LogWriterUtils.getLogWriter().info("### Executing Query locally on client:" + queryString[i]);
             query = localQueryService.newQuery(queryString[i]);
             rs[0][1] = (SelectResults)query.execute();
-            getLogWriter().info("RR  client local indexType: Range size of resultset: "+ rs[0][1].size() + " for query: " + queryString[i]);;
+            LogWriterUtils.getLogWriter().info("RR  client local indexType: Range size of resultset: "+ rs[0][1].size() + " for query: " + queryString[i]);;
             checkForPdxString(rs[0][1].asList(), queryString[i]);
             
             if(i < orderByQueryIndex){
@@ -708,7 +713,7 @@ public class PdxStringQueryDUnitTest extends CacheTestCase{
               compareResultsOrder(rs, false);
             }
           } catch (Exception e) {
-            fail("Failed executing " + queryString[i], e);
+            Assert.fail("Failed executing " + queryString[i], e);
           }
         }
         }
@@ -721,7 +726,7 @@ public class PdxStringQueryDUnitTest extends CacheTestCase{
       public void run2() throws CacheException {
         Region region = getRootRegion().getSubregion(regionName);
 
-        getLogWriter().info("Put Objects locally on server");
+        LogWriterUtils.getLogWriter().info("Put Objects locally on server");
         for (int i=numberOfEntries; i<numberOfEntries*2; i++) {
           region.put("key-"+i, new Portfolio(i));
          }
@@ -730,13 +735,13 @@ public class PdxStringQueryDUnitTest extends CacheTestCase{
         // Query server1 locally to check if PdxString is not being returned
         for (int i = 0; i < queryString.length; i++) {
           try {
-            getLogWriter().info("### Executing Query locally on server:" + queryString[i]);
+            LogWriterUtils.getLogWriter().info("### Executing Query locally on server:" + queryString[i]);
             SelectResults rs = (SelectResults) localQueryService.newQuery(queryString[i]).execute();
-            getLogWriter().info("RR server local indexType:Range  size of resultset: " + rs.size() + " for query: " + queryString[i]);
+            LogWriterUtils.getLogWriter().info("RR server local indexType:Range  size of resultset: " + rs.size() + " for query: " + queryString[i]);
             // The results should not be PdxString
             checkForPdxString(rs.asList(), queryString[i]);
           } catch (Exception e) {
-            fail("Failed executing " + queryString[i], e);
+            Assert.fail("Failed executing " + queryString[i], e);
           }
         }
        }
@@ -750,13 +755,13 @@ public class PdxStringQueryDUnitTest extends CacheTestCase{
        // Query server1 locally to check if PdxString is not being returned
         for (int i = 0; i < queryString.length; i++) {
           try {
-            getLogWriter().info("### Executing Query locally on server:" + queryString[i]);
+            LogWriterUtils.getLogWriter().info("### Executing Query locally on server:" + queryString[i]);
             SelectResults rs = (SelectResults) localQueryService.newQuery(queryString[i]).execute();
-            getLogWriter().info("RR  server local readSerializedTrue: indexType: Range size of resultset: " + rs.size() + " for query: " + queryString[i]);
+            LogWriterUtils.getLogWriter().info("RR  server local readSerializedTrue: indexType: Range size of resultset: " + rs.size() + " for query: " + queryString[i]);
             // The results should not be PdxString
             checkForPdxString(rs.asList(), queryString[i]);
           } catch (Exception e) {
-            fail("Failed executing " + queryString[i], e);
+            Assert.fail("Failed executing " + queryString[i], e);
           }
         }
       }
@@ -770,13 +775,13 @@ public class PdxStringQueryDUnitTest extends CacheTestCase{
         // Query server1 remotely to check if PdxString is not being returned
         for (int i = 0; i < queryString.length; i++) {
           try {
-            getLogWriter().info("### Executing Query locally on server:" + queryString[i]);
+            LogWriterUtils.getLogWriter().info("### Executing Query locally on server:" + queryString[i]);
             SelectResults rs = (SelectResults) remoteQueryService.newQuery(queryString[i]).execute();
-            getLogWriter().info("RR server remote readSerializedTrue: indexType: Range size of resultset: " + rs.size() + " for query: " + queryString[i]);
+            LogWriterUtils.getLogWriter().info("RR server remote readSerializedTrue: indexType: Range size of resultset: " + rs.size() + " for query: " + queryString[i]);
             // The results should not be PdxString
             checkForPdxString(rs.asList(), queryString[i]);
           } catch (Exception e) {
-            fail("Failed executing " + queryString[i], e);
+            Assert.fail("Failed executing " + queryString[i], e);
           }
         }
       }
@@ -805,7 +810,7 @@ public class PdxStringQueryDUnitTest extends CacheTestCase{
         try {
           localQueryService = getCache().getQueryService();
         } catch (Exception e) {
-          fail("Failed to get QueryService.", e);
+          Assert.fail("Failed to get QueryService.", e);
         } 
        
         Index index = null;
@@ -849,7 +854,7 @@ public class PdxStringQueryDUnitTest extends CacheTestCase{
     final int port1 = server1.invokeInt(PdxStringQueryDUnitTest.class, "getCacheServerPort");
     final int port2 = server2.invokeInt(PdxStringQueryDUnitTest.class, "getCacheServerPort");
 
-    final String host0 = getServerHostName(server0.getHost());
+    final String host0 = NetworkUtils.getServerHostName(server0.getHost());
 
     // Create client pool.
     final String poolName = "testClientServerQueryPool"; 
@@ -862,7 +867,7 @@ public class PdxStringQueryDUnitTest extends CacheTestCase{
         factory.setScope(Scope.LOCAL);
         ClientServerTestCase.configureConnectionPool(factory, host0, port1,-1, true, -1, -1, null);
         Region region = createRegion(regionName, rootRegionName,  factory.create());
-        getLogWriter().info("Put PortfolioPdx");
+        LogWriterUtils.getLogWriter().info("Put PortfolioPdx");
         for (int i=0; i<numberOfEntries; i++) {
           region.put("key-"+i, new PortfolioPdx(i));
          }
@@ -884,50 +889,50 @@ public class PdxStringQueryDUnitTest extends CacheTestCase{
           remoteQueryService = (PoolManager.find(poolName)).getQueryService();
           localQueryService = getCache().getQueryService();
         } catch (Exception e) {
-          fail("Failed to get QueryService.", e);
+          Assert.fail("Failed to get QueryService.", e);
         }
         
         for (int i=0; i < queryString.length; i++){
           try {
-            getLogWriter().info("### Executing Query on remote server:" + queryString[i]);
+            LogWriterUtils.getLogWriter().info("### Executing Query on remote server:" + queryString[i]);
             Query query = remoteQueryService.newQuery(queryString[i]);
             rs[0][0] = (SelectResults)query.execute();
             resWithoutIndexRemote[i] = rs[0][0];
-            getLogWriter().info("RR remote no index size of resultset: "+ rs[0][0].size() + " for query: " + queryString[i]);;
+            LogWriterUtils.getLogWriter().info("RR remote no index size of resultset: "+ rs[0][0].size() + " for query: " + queryString[i]);;
             checkForPdxString(rs[0][0].asList(), queryString[i]);
 
-            getLogWriter().info("### Executing Query locally on client:" + queryString[i]);
+            LogWriterUtils.getLogWriter().info("### Executing Query locally on client:" + queryString[i]);
             query = localQueryService.newQuery(queryString[i]);
             rs[0][1] = (SelectResults)query.execute();
             resWithoutIndexLocal[i] = rs[0][1];
-            getLogWriter().info("isPR: " + isPr+ "  client local indexType:no index size of resultset: "+ rs[0][1].size() + " for query: " + queryString[i]);;
+            LogWriterUtils.getLogWriter().info("isPR: " + isPr+ "  client local indexType:no index size of resultset: "+ rs[0][1].size() + " for query: " + queryString[i]);;
             checkForPdxString(rs[0][1].asList(), queryString[i]);
           } catch (Exception e) {
-            fail("Failed executing " + queryString[i], e);
+            Assert.fail("Failed executing " + queryString[i], e);
           }
           try{  
             // to compare remote query results with and without index
-            getLogWriter().info("### Executing Query on remote server for region2:" + queryString2[i]);
+            LogWriterUtils.getLogWriter().info("### Executing Query on remote server for region2:" + queryString2[i]);
             Query query = remoteQueryService.newQuery(queryString2[i]);
             resWithIndexRemote[i] = (SelectResults)query.execute();
-            getLogWriter().info("isPR: " + isPr+ "  remote region2 size of resultset: "+ resWithIndexRemote[i].size() + " for query: " + queryString2[i]);;
+            LogWriterUtils.getLogWriter().info("isPR: " + isPr+ "  remote region2 size of resultset: "+ resWithIndexRemote[i].size() + " for query: " + queryString2[i]);;
             checkForPdxString(resWithIndexRemote[i].asList(), queryString2[i]);
 
            // to compare local query results with and without index
-            getLogWriter().info("### Executing Query on local for region2:" + queryString2[i]);
+            LogWriterUtils.getLogWriter().info("### Executing Query on local for region2:" + queryString2[i]);
             query = localQueryService.newQuery(queryString2[i]);
             resWithIndexLocal[i] = (SelectResults)query.execute();
-            getLogWriter().info("isPR: " + isPr+ "  local region2 size of resultset: "+ resWithIndexLocal[i].size() + " for query: " + queryString2[i]);;
+            LogWriterUtils.getLogWriter().info("isPR: " + isPr+ "  local region2 size of resultset: "+ resWithIndexLocal[i].size() + " for query: " + queryString2[i]);;
             checkForPdxString(resWithIndexLocal[i].asList(), queryString2[i]);
           } catch (Exception e) {
-            fail("Failed executing " + queryString2[i], e);
+            Assert.fail("Failed executing " + queryString2[i], e);
           }
 
             if(i < orderByQueryIndex){
               // Compare local and remote query results.
               if (!compareResultsOfWithAndWithoutIndex(rs)){
-                getLogWriter().info("result0="+rs[0][0].asList());
-                getLogWriter().info("result1="+rs[0][1].asList());
+                LogWriterUtils.getLogWriter().info("result0="+rs[0][0].asList());
+                LogWriterUtils.getLogWriter().info("result1="+rs[0][1].asList());
                fail("Local and Remote Query Results are not matching for query :" + queryString[i]);  
               }
             }
@@ -975,7 +980,7 @@ public class PdxStringQueryDUnitTest extends CacheTestCase{
       public void run2() throws CacheException {
         Region region = getRootRegion().getSubregion(regionName);
 
-        getLogWriter().info("Put Objects locally on server");
+        LogWriterUtils.getLogWriter().info("Put Objects locally on server");
         for (int i=numberOfEntries; i<numberOfEntries*2; i++) {
           region.put("key-"+i, new Portfolio(i));
          }
@@ -984,21 +989,21 @@ public class PdxStringQueryDUnitTest extends CacheTestCase{
         // Query server1 locally to check if PdxString is not being returned
         for (int i = 0; i < queryString.length; i++) {
           try {
-            getLogWriter().info("### Executing Query locally on server:" + queryString[i]);
+            LogWriterUtils.getLogWriter().info("### Executing Query locally on server:" + queryString[i]);
             SelectResults rs = (SelectResults) localQueryService.newQuery(queryString[i]).execute();
-            getLogWriter().info("PR server local indexType:no  size of resultset: " + rs.size() + " for query: " + queryString[i]);
+            LogWriterUtils.getLogWriter().info("PR server local indexType:no  size of resultset: " + rs.size() + " for query: " + queryString[i]);
             // The results should not be PdxString
             checkForPdxString(rs.asList(), queryString[i]);
           } catch (Exception e) {
-            fail("Failed executing " + queryString[i], e);
+            Assert.fail("Failed executing " + queryString[i], e);
           }
           try{
             SelectResults rs = (SelectResults) localQueryService.newQuery(queryString2[i]).execute();
-            getLogWriter().info("PR server local indexType: no size of resultset: " + rs.size() + " for query: " + queryString2[i]);
+            LogWriterUtils.getLogWriter().info("PR server local indexType: no size of resultset: " + rs.size() + " for query: " + queryString2[i]);
             // The results should not be PdxString
             checkForPdxString(rs.asList(), queryString2[i]);
           }catch (Exception e) {
-            fail("Failed executing " + queryString2[i], e);
+            Assert.fail("Failed executing " + queryString2[i], e);
           }
 
         }
@@ -1014,13 +1019,13 @@ public class PdxStringQueryDUnitTest extends CacheTestCase{
        // Query server1 locally to check if PdxString is not being returned
         for (int i = 0; i < queryString.length; i++) {
           try {
-            getLogWriter().info("### Executing Query locally on server:" + queryString[i]);
+            LogWriterUtils.getLogWriter().info("### Executing Query locally on server:" + queryString[i]);
             SelectResults rs = (SelectResults) localQueryService.newQuery(queryString[i]).execute();
-            getLogWriter().info("isPR: " + isPr+ " server local readSerializedTrue: indexType: no index size of resultset: " + rs.size() + " for query: " + queryString[i]);
+            LogWriterUtils.getLogWriter().info("isPR: " + isPr+ " server local readSerializedTrue: indexType: no index size of resultset: " + rs.size() + " for query: " + queryString[i]);
             // The results should not be PdxString
             checkForPdxString(rs.asList(), queryString[i]);
           } catch (Exception e) {
-            fail("Failed executing " + queryString[i], e);
+            Assert.fail("Failed executing " + queryString[i], e);
           }
         }
       }
@@ -1035,13 +1040,13 @@ public class PdxStringQueryDUnitTest extends CacheTestCase{
         // Query server1 remotely to check if PdxString is not being returned
         for (int i = 0; i < queryString.length; i++) {
           try {
-            getLogWriter().info("### Executing Query locally on server:" + queryString[i]);
+            LogWriterUtils.getLogWriter().info("### Executing Query locally on server:" + queryString[i]);
             SelectResults rs = (SelectResults) remoteQueryService.newQuery(queryString[i]).execute();
-            getLogWriter().info("RR server remote readSerializedTrue: indexType:no index size of resultset: " + rs.size() + " for query: " + queryString[i]);
+            LogWriterUtils.getLogWriter().info("RR server remote readSerializedTrue: indexType:no index size of resultset: " + rs.size() + " for query: " + queryString[i]);
             // The results should not be PdxString
             checkForPdxString(rs.asList(), queryString[i]);
           } catch (Exception e) {
-            fail("Failed executing " + queryString[i], e);
+            Assert.fail("Failed executing " + queryString[i], e);
           }
         }
       }
@@ -1070,7 +1075,7 @@ public class PdxStringQueryDUnitTest extends CacheTestCase{
         try {
           localQueryService = getCache().getQueryService();
         } catch (Exception e) {
-          fail("Failed to get QueryService.", e);
+          Assert.fail("Failed to get QueryService.", e);
         } 
         // Verify the type of index created  
         Index index = null;
@@ -1113,7 +1118,7 @@ public class PdxStringQueryDUnitTest extends CacheTestCase{
     final int port1 = server1.invokeInt(PdxStringQueryDUnitTest.class, "getCacheServerPort");
     final int port2 = server2.invokeInt(PdxStringQueryDUnitTest.class, "getCacheServerPort");
 
-    final String host0 = getServerHostName(server0.getHost());
+    final String host0 = NetworkUtils.getServerHostName(server0.getHost());
 
     // Create client pool.
     final String poolName = "testClientServerQueryPool"; 
@@ -1126,7 +1131,7 @@ public class PdxStringQueryDUnitTest extends CacheTestCase{
         factory.setScope(Scope.LOCAL);
         ClientServerTestCase.configureConnectionPool(factory, host0, port1,-1, true, -1, -1, null);
         Region region = createRegion(regionName, rootRegionName,  factory.create());
-        getLogWriter().info("Put PortfolioPdx");
+        LogWriterUtils.getLogWriter().info("Put PortfolioPdx");
         for (int i=0; i<numberOfEntries; i++) {
           region.put("key-"+i, new PortfolioPdx(i));
          }
@@ -1169,21 +1174,21 @@ public class PdxStringQueryDUnitTest extends CacheTestCase{
           remoteQueryService = (PoolManager.find(poolName)).getQueryService();
           localQueryService = getCache().getQueryService();
         } catch (Exception e) {
-          fail("Failed to get QueryService.", e);
+          Assert.fail("Failed to get QueryService.", e);
         }
         
         for (int i=0; i < queryString.length; i++){
           try {
-            getLogWriter().info("### Executing Query on remote server:" + queryString[i]);
+            LogWriterUtils.getLogWriter().info("### Executing Query on remote server:" + queryString[i]);
             Query query = remoteQueryService.newQuery(queryString[i]);
             rs[0][0] = (SelectResults)query.execute();
-            getLogWriter().info("RR remote indexType:CompactRange size of resultset: "+ rs[0][0].size() + " for query: " + queryString[i]);;
+            LogWriterUtils.getLogWriter().info("RR remote indexType:CompactRange size of resultset: "+ rs[0][0].size() + " for query: " + queryString[i]);;
             checkForPdxString(rs[0][0].asList(), queryString[i]);
            
-            getLogWriter().info("### Executing Query locally on client:" + queryString[i]);
+            LogWriterUtils.getLogWriter().info("### Executing Query locally on client:" + queryString[i]);
             query = localQueryService.newQuery(queryString[i]);
             rs[0][1] = (SelectResults)query.execute();
-            getLogWriter().info("isPR: " + isPr+ "  client local indexType:CompactRange size of resultset: "+ rs[0][1].size() + " for query: " + queryString[i]);;
+            LogWriterUtils.getLogWriter().info("isPR: " + isPr+ "  client local indexType:CompactRange size of resultset: "+ rs[0][1].size() + " for query: " + queryString[i]);;
             checkForPdxString(rs[0][1].asList(), queryString[i]);
  
             if(i < orderByQueryIndex){
@@ -1197,7 +1202,7 @@ public class PdxStringQueryDUnitTest extends CacheTestCase{
               compareResultsOrder(rs, isPr);
             }
           } catch (Exception e) {
-            fail("Failed executing " + queryString[i], e);
+            Assert.fail("Failed executing " + queryString[i], e);
           }
         }
       }       
@@ -1209,7 +1214,7 @@ public class PdxStringQueryDUnitTest extends CacheTestCase{
       public void run2() throws CacheException {
         Region region = getRootRegion().getSubregion(regionName);
 
-        getLogWriter().info("Put Objects locally on server");
+        LogWriterUtils.getLogWriter().info("Put Objects locally on server");
         for (int i=numberOfEntries; i<numberOfEntries*2; i++) {
           region.put("key-"+i, new Portfolio(i));
          }
@@ -1218,13 +1223,13 @@ public class PdxStringQueryDUnitTest extends CacheTestCase{
         // Query server1 locally to check if PdxString is not being returned
         for (int i = 0; i < queryString.length; i++) {
           try {
-            getLogWriter().info("### Executing Query locally on server:" + queryString[i]);
+            LogWriterUtils.getLogWriter().info("### Executing Query locally on server:" + queryString[i]);
             SelectResults rs = (SelectResults) localQueryService.newQuery(queryString[i]).execute();
-            getLogWriter().info("RR server local indexType:Range  size of resultset: " + rs.size() + " for query: " + queryString[i]);
+            LogWriterUtils.getLogWriter().info("RR server local indexType:Range  size of resultset: " + rs.size() + " for query: " + queryString[i]);
             // The results should not be PdxString
             checkForPdxString(rs.asList(), queryString[i]);
           } catch (Exception e) {
-            fail("Failed executing " + queryString[i], e);
+            Assert.fail("Failed executing " + queryString[i], e);
           }
         }
        }
@@ -1240,13 +1245,13 @@ public class PdxStringQueryDUnitTest extends CacheTestCase{
         // Query server1 locally to check if PdxString is not being returned
         for (int i = 0; i < queryString.length; i++) {
           try {
-            getLogWriter().info("### Executing Query locally on server:" + queryString[i]);
+            LogWriterUtils.getLogWriter().info("### Executing Query locally on server:" + queryString[i]);
             SelectResults rs = (SelectResults) localQueryService.newQuery(queryString[i]).execute();
-            getLogWriter().info("isPR: " + isPr+ " server local readSerializedTrue: indexType:CompactRange size of resultset: " + rs.size() + " for query: " + queryString[i]);
+            LogWriterUtils.getLogWriter().info("isPR: " + isPr+ " server local readSerializedTrue: indexType:CompactRange size of resultset: " + rs.size() + " for query: " + queryString[i]);
             // The results should not be PdxString
             checkForPdxString(rs.asList(), queryString[i]);
           } catch (Exception e) {
-            fail("Failed executing " + queryString[i], e);
+            Assert.fail("Failed executing " + queryString[i], e);
           }
         }
       }
@@ -1262,13 +1267,13 @@ public class PdxStringQueryDUnitTest extends CacheTestCase{
         // Query server1 remotely to check if PdxString is not being returned
         for (int i = 0; i < queryString.length; i++) {
           try {
-            getLogWriter().info("### Executing Query locally on server:" + queryString[i]);
+            LogWriterUtils.getLogWriter().info("### Executing Query locally on server:" + queryString[i]);
             SelectResults rs = (SelectResults) remoteQueryService.newQuery(queryString[i]).execute();
-            getLogWriter().info("RR server remote readSerializedTrue: indexType: indexType:CompactRange size of resultset: " + rs.size() + " for query: " + queryString[i]);
+            LogWriterUtils.getLogWriter().info("RR server remote readSerializedTrue: indexType: indexType:CompactRange size of resultset: " + rs.size() + " for query: " + queryString[i]);
             // The results should not be PdxString
             checkForPdxString(rs.asList(), queryString[i]);
           } catch (Exception e) {
-            fail("Failed executing " + queryString[i], e);
+            Assert.fail("Failed executing " + queryString[i], e);
           }
         }
       }
@@ -1297,7 +1302,7 @@ public class PdxStringQueryDUnitTest extends CacheTestCase{
         try {
           localQueryService = getCache().getQueryService();
         } catch (Exception e) {
-          fail("Failed to get QueryService.", e);
+          Assert.fail("Failed to get QueryService.", e);
         } 
         // Verify the type of index created  
         Index index = null;
@@ -1340,7 +1345,7 @@ public class PdxStringQueryDUnitTest extends CacheTestCase{
     final int port1 = server1.invokeInt(PdxStringQueryDUnitTest.class, "getCacheServerPort");
     final int port2 = server2.invokeInt(PdxStringQueryDUnitTest.class, "getCacheServerPort");
 
-    final String host0 = getServerHostName(server0.getHost());
+    final String host0 = NetworkUtils.getServerHostName(server0.getHost());
 
     // Create client pool.
     final String poolName = "testClientServerQueryPool"; 
@@ -1353,7 +1358,7 @@ public class PdxStringQueryDUnitTest extends CacheTestCase{
         factory.setScope(Scope.LOCAL);
         ClientServerTestCase.configureConnectionPool(factory, host0, port1,-1, true, -1, -1, null);
         Region region = createRegion(regionName, rootRegionName,  factory.create());
-        getLogWriter().info("Put PortfolioPdx");
+        LogWriterUtils.getLogWriter().info("Put PortfolioPdx");
         for (int i=0; i<numberOfEntries; i++) {
           region.put("key-"+i, new PortfolioPdx(i));
          }
@@ -1393,28 +1398,28 @@ public class PdxStringQueryDUnitTest extends CacheTestCase{
           remoteQueryService = (PoolManager.find(poolName)).getQueryService();
           localQueryService = getCache().getQueryService();
         } catch (Exception e) {
-          fail("Failed to get QueryService.", e);
+          Assert.fail("Failed to get QueryService.", e);
         }
         
         for (int i=0; i < queryString.length; i++){
           try {
-            getLogWriter().info("### Executing Query on remote server:" + queryString[i]);
+            LogWriterUtils.getLogWriter().info("### Executing Query on remote server:" + queryString[i]);
             Query query = remoteQueryService.newQuery(queryString[i]);
             rs[0][0] = (SelectResults)query.execute();
-            getLogWriter().info("RR remote indexType: Range size of resultset: "+ rs[0][0].size() + " for query: " + queryString[i]);;
+            LogWriterUtils.getLogWriter().info("RR remote indexType: Range size of resultset: "+ rs[0][0].size() + " for query: " + queryString[i]);;
             checkForPdxString(rs[0][0].asList(), queryString[i]);
                       
-            getLogWriter().info("### Executing Query locally on client:" + queryString[i]);
+            LogWriterUtils.getLogWriter().info("### Executing Query locally on client:" + queryString[i]);
             query = localQueryService.newQuery(queryString[i]);
             rs[0][1] = (SelectResults)query.execute();
-            getLogWriter().info("isPR: " + isPr+ "  client local indexType: Range size of resultset: "+ rs[0][1].size() + " for query: " + queryString[i]);;
+            LogWriterUtils.getLogWriter().info("isPR: " + isPr+ "  client local indexType: Range size of resultset: "+ rs[0][1].size() + " for query: " + queryString[i]);;
             checkForPdxString(rs[0][1].asList(), queryString[i]);
                    
             if(i < orderByQueryIndex){
               // Compare local and remote query results.
               if (!compareResultsOfWithAndWithoutIndex(rs)){
-                getLogWriter().info("result0="+rs[0][0].asList());
-                getLogWriter().info("result1="+rs[0][1].asList());
+                LogWriterUtils.getLogWriter().info("result0="+rs[0][0].asList());
+                LogWriterUtils.getLogWriter().info("result1="+rs[0][1].asList());
                fail("Local and Remote Query Results are not matching for query :" + queryString[i]);  
               }
             }
@@ -1423,7 +1428,7 @@ public class PdxStringQueryDUnitTest extends CacheTestCase{
               compareResultsOrder(rs, isPr);
             }
           } catch (Exception e) {
-            fail("Failed executing " + queryString[i], e);
+            Assert.fail("Failed executing " + queryString[i], e);
           }
         }
        }
@@ -1436,7 +1441,7 @@ public class PdxStringQueryDUnitTest extends CacheTestCase{
       public void run2() throws CacheException {
         Region region = getRootRegion().getSubregion(regionName);
 
-        getLogWriter().info("Put Objects locally on server");
+        LogWriterUtils.getLogWriter().info("Put Objects locally on server");
         for (int i=numberOfEntries; i<numberOfEntries*2; i++) {
           region.put("key-"+i, new Portfolio(i));
          }
@@ -1445,13 +1450,13 @@ public class PdxStringQueryDUnitTest extends CacheTestCase{
         // Query server1 locally to check if PdxString is not being returned
         for (int i = 0; i < queryString.length; i++) {
           try {
-            getLogWriter().info("### Executing Query locally on server:" + queryString[i]);
+            LogWriterUtils.getLogWriter().info("### Executing Query locally on server:" + queryString[i]);
             SelectResults rs = (SelectResults) localQueryService.newQuery(queryString[i]).execute();
-            getLogWriter().info("RR server local indexType:Range  size of resultset: " + rs.size() + " for query: " + queryString[i]);
+            LogWriterUtils.getLogWriter().info("RR server local indexType:Range  size of resultset: " + rs.size() + " for query: " + queryString[i]);
             // The results should not be PdxString
             checkForPdxString(rs.asList(), queryString[i]);
           } catch (Exception e) {
-            fail("Failed executing " + queryString[i], e);
+            Assert.fail("Failed executing " + queryString[i], e);
           }
         }
        }
@@ -1467,13 +1472,13 @@ public class PdxStringQueryDUnitTest extends CacheTestCase{
         // Query server1 locally to check if PdxString is not being returned
         for (int i = 0; i < queryString.length; i++) {
           try {
-            getLogWriter().info("### Executing Query locally on server:" + queryString[i]);
+            LogWriterUtils.getLogWriter().info("### Executing Query locally on server:" + queryString[i]);
             SelectResults rs = (SelectResults) localQueryService.newQuery(queryString[i]).execute();
-            getLogWriter().info("isPR: " + isPr+ " server local readSerializedTrue: indexType: Range size of resultset: " + rs.size() + " for query: " + queryString[i]);
+            LogWriterUtils.getLogWriter().info("isPR: " + isPr+ " server local readSerializedTrue: indexType: Range size of resultset: " + rs.size() + " for query: " + queryString[i]);
             // The results should not be PdxString
             checkForPdxString(rs.asList(), queryString[i]);
           } catch (Exception e) {
-            fail("Failed executing " + queryString[i], e);
+            Assert.fail("Failed executing " + queryString[i], e);
           }
         }
       }
@@ -1489,13 +1494,13 @@ public class PdxStringQueryDUnitTest extends CacheTestCase{
         // Query server1 remotely to check if PdxString is not being returned
         for (int i = 0; i < queryString.length; i++) {
           try {
-            getLogWriter().info("### Executing Query locally on server:" + queryString[i]);
+            LogWriterUtils.getLogWriter().info("### Executing Query locally on server:" + queryString[i]);
             SelectResults rs = (SelectResults) remoteQueryService.newQuery(queryString[i]).execute();
-            getLogWriter().info("RR server remote readSerializedTrue: indexType: Range size of resultset: " + rs.size() + " for query: " + queryString[i]);
+            LogWriterUtils.getLogWriter().info("RR server remote readSerializedTrue: indexType: Range size of resultset: " + rs.size() + " for query: " + queryString[i]);
             // The results should not be PdxString
             checkForPdxString(rs.asList(), queryString[i]);
           } catch (Exception e) {
-            fail("Failed executing " + queryString[i], e);
+            Assert.fail("Failed executing " + queryString[i], e);
           }
         }
       }
@@ -1524,7 +1529,7 @@ public class PdxStringQueryDUnitTest extends CacheTestCase{
         try {
           localQueryService = getCache().getQueryService();
         } catch (Exception e) {
-          fail("Failed to get QueryService.", e);
+          Assert.fail("Failed to get QueryService.", e);
         } 
         // Verify the type of index created  
         Index index = null;
@@ -1567,7 +1572,7 @@ public class PdxStringQueryDUnitTest extends CacheTestCase{
     final int port1 = server1.invokeInt(PdxStringQueryDUnitTest.class, "getCacheServerPort");
     final int port2 = server2.invokeInt(PdxStringQueryDUnitTest.class, "getCacheServerPort");
 
-    final String host0 = getServerHostName(server0.getHost());
+    final String host0 = NetworkUtils.getServerHostName(server0.getHost());
 
     // Create client pool.
     final String poolName = "testClientServerQueryPool"; 
@@ -1581,7 +1586,7 @@ public class PdxStringQueryDUnitTest extends CacheTestCase{
         ClientServerTestCase.configureConnectionPool(factory, host0, port1,-1, true, -1, -1, null);
         Region region = createRegion(regionName, rootRegionName,  factory.create());
       
-        getLogWriter().info("Put PortfolioPdx");
+        LogWriterUtils.getLogWriter().info("Put PortfolioPdx");
         // Put some PortfolioPdx objects with null Status and secIds 
         for (int i=0; i<numberOfEntries*2; i++) {
           PortfolioPdx portfolioPdx = new PortfolioPdx(i);
@@ -1633,7 +1638,7 @@ public class PdxStringQueryDUnitTest extends CacheTestCase{
           remoteQueryService = (PoolManager.find(poolName)).getQueryService();
           localQueryService = getCache().getQueryService();
         } catch (Exception e) {
-          fail("Failed to get QueryService.", e);
+          Assert.fail("Failed to get QueryService.", e);
         }
         
         // Querying the fields with null values
@@ -1644,7 +1649,7 @@ public class PdxStringQueryDUnitTest extends CacheTestCase{
           try {
             Query query = remoteQueryService.newQuery(qs[i]);
             SelectResults res = (SelectResults)query.execute();
-            getLogWriter().info("PR NULL Pdxstring test size of resultset: "+ res.size() + " for query: " + qs[i]);;
+            LogWriterUtils.getLogWriter().info("PR NULL Pdxstring test size of resultset: "+ res.size() + " for query: " + qs[i]);;
             if(i == 0){
               for(Object o : res){
                 if(o != null){
@@ -1655,7 +1660,7 @@ public class PdxStringQueryDUnitTest extends CacheTestCase{
               checkForPdxString(res.asList(), qs[i]);
             }
           } catch (Exception e) {
-            fail("Failed executing " + qs[i], e);
+            Assert.fail("Failed executing " + qs[i], e);
           }
         }
       }
@@ -1834,8 +1839,8 @@ public class PdxStringQueryDUnitTest extends CacheTestCase{
       @Override
       public Object call() throws Exception {
         ClientCacheFactory cf = new ClientCacheFactory();
-        cf.addPoolServer(getServerHostName(vm0.getHost()), port1);
-        cf.addPoolServer(getServerHostName(vm1.getHost()), port2);
+        cf.addPoolServer(NetworkUtils.getServerHostName(vm0.getHost()), port1);
+        cf.addPoolServer(NetworkUtils.getServerHostName(vm1.getHost()), port2);
         ClientCache cache = getClientCache(cf);
         Region region = cache.createClientRegionFactory(ClientRegionShortcut.PROXY)
            .create(regionName);
@@ -1873,7 +1878,7 @@ public class PdxStringQueryDUnitTest extends CacheTestCase{
       }
     });
     
-    invokeInEveryVM(DistributedTestCase.class, "disconnectFromDS");
+    Invoke.invokeInEveryVM(DistributedTestCase.class, "disconnectFromDS");
   }
    
   protected void configAndStartBridgeServer(boolean isPr, boolean isAccessor, boolean asyncIndex) {
@@ -1897,7 +1902,7 @@ public class PdxStringQueryDUnitTest extends CacheTestCase{
     try {
       startBridgeServer(0, false);
     } catch (Exception ex) {
-      fail("While starting CacheServer", ex);
+      Assert.fail("While starting CacheServer", ex);
     }
   }
   /**
@@ -1930,12 +1935,12 @@ public class PdxStringQueryDUnitTest extends CacheTestCase{
     SerializableRunnable closeCache =
       new CacheSerializableRunnable("Close Client") {
       public void run2() throws CacheException {
-        getLogWriter().info("### Close Client. ###");
+        LogWriterUtils.getLogWriter().info("### Close Client. ###");
         try {
           closeCache();
           disconnectFromDS();
         } catch (Exception ex) {
-          getLogWriter().info("### Failed to get close client. ###");
+          LogWriterUtils.getLogWriter().info("### Failed to get close client. ###");
         }
       }
     };
@@ -1962,13 +1967,13 @@ public class PdxStringQueryDUnitTest extends CacheTestCase{
       public void run2() throws CacheException {
         // Create Cache.
         getLonerSystem();
-        addExpectedException("Connection refused");
+        IgnoredException.addIgnoredException("Connection refused");
         getCache();        
         PoolFactory cpf = PoolManager.createFactory();
         cpf.setSubscriptionEnabled(subscriptionEnabled);
         cpf.setSubscriptionRedundancy(redundancy);
         for (int i=0; i < servers.length; i++){
-          getLogWriter().info("### Adding to Pool. ### Server : " + servers[i] + " Port : " + ports[i]);
+          LogWriterUtils.getLogWriter().info("### Adding to Pool. ### Server : " + servers[i] + " Port : " + ports[i]);
           cpf.addServer(servers[i], ports[i]);
         }
         cpf.create(poolName);

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/820cfd63/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/dunit/QueryDataInconsistencyDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/dunit/QueryDataInconsistencyDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/dunit/QueryDataInconsistencyDUnitTest.java
index 5833883..aeb4343 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/dunit/QueryDataInconsistencyDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/dunit/QueryDataInconsistencyDUnitTest.java
@@ -40,11 +40,15 @@ import com.gemstone.gemfire.cache.query.partitioned.PRQueryDUnitHelper;
 import com.gemstone.gemfire.cache30.CacheSerializableRunnable;
 import com.gemstone.gemfire.cache30.CacheTestCase;
 import com.gemstone.gemfire.internal.cache.execute.PRClientServerTestBase;
+import com.gemstone.gemfire.test.dunit.Assert;
 import com.gemstone.gemfire.test.dunit.AsyncInvocation;
-import com.gemstone.gemfire.test.dunit.DistributedTestCase;
 import com.gemstone.gemfire.test.dunit.Host;
+import com.gemstone.gemfire.test.dunit.Invoke;
+import com.gemstone.gemfire.test.dunit.LogWriterUtils;
 import com.gemstone.gemfire.test.dunit.SerializableRunnable;
+import com.gemstone.gemfire.test.dunit.ThreadUtils;
 import com.gemstone.gemfire.test.dunit.VM;
+import com.gemstone.gemfire.test.dunit.Wait;
 
 /**
  * This tests the data inconsistency during update on an index and querying the
@@ -91,10 +95,13 @@ public class QueryDataInconsistencyDUnitTest extends CacheTestCase {
   }
 
   @Override
-  public void tearDown2() throws Exception {
-    invokeInEveryVM(CacheTestCase.class, "disconnectFromDS");
-    super.tearDown2();
-    invokeInEveryVM(QueryObserverHolder.class, "reset");
+  protected final void preTearDownCacheTestCase() throws Exception {
+    Invoke.invokeInEveryVM(CacheTestCase.class, "disconnectFromDS");
+  }
+  
+  @Override
+  protected final void postTearDownCacheTestCase() throws Exception {
+    Invoke.invokeInEveryVM(QueryObserverHolder.class, "reset");
   }
 
   @Override
@@ -149,7 +156,7 @@ public class QueryDataInconsistencyDUnitTest extends CacheTestCase {
       @Override
       public void run2() throws CacheException {
         QueryService qs = CacheFactory.getAnyInstance().getQueryService();
-        while (!hooked){pause(100);}
+        while (!hooked){Wait.pause(100);}
         Object rs = null;
         try {
           rs = qs.newQuery("<trace> select * from /"+repRegionName+" where ID = 1").execute();          
@@ -175,7 +182,7 @@ public class QueryDataInconsistencyDUnitTest extends CacheTestCase {
       @Override
       public void run2() throws CacheException {
         QueryService qs = CacheFactory.getAnyInstance().getQueryService();
-        while (!hooked){pause(100);}
+        while (!hooked){Wait.pause(100);}
         Object rs = null;
         try {
           rs = qs.newQuery("<trace> select * from /"+repRegionName+" where ID = 1").execute();          
@@ -197,7 +204,7 @@ public class QueryDataInconsistencyDUnitTest extends CacheTestCase {
         hooked = false;//Let client put go further.
       }
     });
-    DistributedTestCase.join(putThread, 200, this.getLogWriter());
+    ThreadUtils.join(putThread, 200);
   }
 
   public void testRangeIndex() {
@@ -252,7 +259,7 @@ public class QueryDataInconsistencyDUnitTest extends CacheTestCase {
       public void run2() throws CacheException {
         QueryService qs = CacheFactory.getAnyInstance().getQueryService();
         Position pos1 = null;
-        while (!hooked){pause(100);}
+        while (!hooked){Wait.pause(100);}
         try {
           Object rs = qs.newQuery("<trace> select pos from /"+repRegionName+" p, p.positions.values pos where pos.secId = 'APPL' AND p.ID = 1").execute();
           CacheFactory.getAnyInstance().getLogger().fine("Shobhit: "+rs);
@@ -264,13 +271,13 @@ public class QueryDataInconsistencyDUnitTest extends CacheTestCase {
           }          
         } catch (Exception e) {
           e.printStackTrace();
-          fail("Query execution failed on server.", e);
+          Assert.fail("Query execution failed on server.", e);
           IndexManager.testHook = null;
         } finally {
           hooked = false;//Let client put go further.
         }
         while (!hooked) {
-          pause(100);
+          Wait.pause(100);
         }
         try {
           Object rs = qs.newQuery("<trace> select pos from /"+repRegionName+" p, p.positions.values pos where pos.secId = 'APPL' AND p.ID = 1").execute();
@@ -292,7 +299,7 @@ public class QueryDataInconsistencyDUnitTest extends CacheTestCase {
         }
       }
     });
-    DistributedTestCase.join(putThread, 200, this.getLogWriter());
+    ThreadUtils.join(putThread, 200);
   }
   
   public void testRangeIndexWithIndexAndQueryFromCluaseMisMatch() {
@@ -344,7 +351,7 @@ public class QueryDataInconsistencyDUnitTest extends CacheTestCase {
       public void run2() throws CacheException {
         QueryService qs = CacheFactory.getAnyInstance().getQueryService();
         Position pos1 = null;
-        while (!hooked){pause(100);}
+        while (!hooked){Wait.pause(100);}
         try {
           Object rs = qs.newQuery("<trace> select pos from /"+repRegionName+" p, p.positions.values pos where pos.secId = 'APPL' AND p.ID = 1").execute();
           CacheFactory.getAnyInstance().getLogger().fine("Shobhit: "+rs);
@@ -356,13 +363,13 @@ public class QueryDataInconsistencyDUnitTest extends CacheTestCase {
           }          
         } catch (Exception e) {
           e.printStackTrace();
-          fail("Query execution failed on server.", e);
+          Assert.fail("Query execution failed on server.", e);
           IndexManager.testHook = null;
         } finally {
           hooked = false;//Let client put go further.
         }
         while (!hooked) {
-          pause(100);
+          Wait.pause(100);
         }
         try {
           Object rs = qs.newQuery("select pos from /"+repRegionName+" p, p.positions.values pos where pos.secId = 'APPL' AND p.ID = 1").execute();
@@ -383,7 +390,7 @@ public class QueryDataInconsistencyDUnitTest extends CacheTestCase {
         }
       }
     });
-    DistributedTestCase.join(putThread, 200, this.getLogWriter());
+    ThreadUtils.join(putThread, 200);
   }
 
   public void testRangeIndexWithIndexAndQueryFromCluaseMisMatch2() {
@@ -435,7 +442,7 @@ public class QueryDataInconsistencyDUnitTest extends CacheTestCase {
       public void run2() throws CacheException {
         QueryService qs = CacheFactory.getAnyInstance().getQueryService();
         Position pos1 = null;
-        while (!hooked){pause(100);}
+        while (!hooked){Wait.pause(100);}
         try {
           Object rs = qs.newQuery("<trace> select pos from /"+repRegionName+" p, p.collectionHolderMap.values coll, p.positions.values pos where pos.secId = 'APPL' AND p.ID = 1").execute();
           CacheFactory.getAnyInstance().getLogger().fine("Shobhit: "+rs);
@@ -447,13 +454,13 @@ public class QueryDataInconsistencyDUnitTest extends CacheTestCase {
           }          
         } catch (Exception e) {
           e.printStackTrace();
-          fail("Query execution failed on server.", e);
+          Assert.fail("Query execution failed on server.", e);
           IndexManager.testHook = null;
         } finally {
           hooked = false;//Let client put go further.
         }
         while (!hooked) {
-          pause(100);
+          Wait.pause(100);
         }
         try {
           Object rs = qs.newQuery("select pos from /"+repRegionName+" p, p.collectionHolderMap.values coll, p.positions.values pos where pos.secId = 'APPL' AND p.ID = 1").execute();
@@ -474,7 +481,7 @@ public class QueryDataInconsistencyDUnitTest extends CacheTestCase {
         }
       }
     });
-    DistributedTestCase.join(putThread, 200, this.getLogWriter());
+    ThreadUtils.join(putThread, 200);
   }
   
   public static void createProxyRegions() {
@@ -537,7 +544,7 @@ public class QueryDataInconsistencyDUnitTest extends CacheTestCase {
         Region region = cache.getRegion(repRegionName);
         for (int j = from; j < to; j++)
           region.put(new Integer(j), portfolio[j]);
-          getLogWriter()
+          LogWriterUtils.getLogWriter()
             .info(
                 "PRQueryDUnitHelper#getCacheSerializableRunnableForPRPuts: Inserted Portfolio data on Region "
                     + regionName);
@@ -551,17 +558,17 @@ public class QueryDataInconsistencyDUnitTest extends CacheTestCase {
       switch (spot) {
       case 9: //Before Index update and after region entry lock.
         hooked  = true;
-        getLogWriter().info("QueryDataInconsistency.IndexManagerTestHook is hooked in Update Index Entry.");
+        LogWriterUtils.getLogWriter().info("QueryDataInconsistency.IndexManagerTestHook is hooked in Update Index Entry.");
         while(hooked) {
-          pause(100);
+          Wait.pause(100);
         }
         assertEquals(hooked, false);
         break;
       case 10: //Before Region update and after Index Remove call.
         hooked  = true;
-        getLogWriter().info("QueryDataInconsistency.IndexManagerTestHook is hooked in Remove Index Entry.");
+        LogWriterUtils.getLogWriter().info("QueryDataInconsistency.IndexManagerTestHook is hooked in Remove Index Entry.");
         while(hooked) {
-          pause(100);
+          Wait.pause(100);
         }
         assertEquals(hooked, false);
         break;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/820cfd63/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/dunit/QueryIndexUsingXMLDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/dunit/QueryIndexUsingXMLDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/dunit/QueryIndexUsingXMLDUnitTest.java
index 1ebe01d..5e9df71 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/dunit/QueryIndexUsingXMLDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/dunit/QueryIndexUsingXMLDUnitTest.java
@@ -61,12 +61,17 @@ import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
 import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
 import com.gemstone.gemfire.internal.cache.LocalRegion;
 import com.gemstone.gemfire.internal.cache.PartitionedRegion;
+import com.gemstone.gemfire.test.dunit.Assert;
 import com.gemstone.gemfire.test.dunit.AsyncInvocation;
-import com.gemstone.gemfire.test.dunit.DistributedTestCase;
+import com.gemstone.gemfire.test.dunit.DistributedTestUtils;
 import com.gemstone.gemfire.test.dunit.Host;
+import com.gemstone.gemfire.test.dunit.IgnoredException;
+import com.gemstone.gemfire.test.dunit.Invoke;
 import com.gemstone.gemfire.test.dunit.SerializableRunnable;
+import com.gemstone.gemfire.test.dunit.ThreadUtils;
 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;
 import com.gemstone.gemfire.util.test.TestUtil;
 
 public class QueryIndexUsingXMLDUnitTest extends CacheTestCase {
@@ -130,17 +135,17 @@ public class QueryIndexUsingXMLDUnitTest extends CacheTestCase {
   public void setUp() throws Exception {
     super.setUp();
     //Workaround for #52008
-    addExpectedException("Failed to create index");
+    IgnoredException.addIgnoredException("Failed to create index");
   }
 
-  public void tearDown2() throws Exception {
-    super.tearDown2();
+  @Override
+  protected final void postTearDownCacheTestCase() throws Exception {
     // Get the disk store name.
     GemFireCacheImpl cache = (GemFireCacheImpl)getCache();
     String diskStoreName = cache.getDefaultDiskStoreName();
     
     //reset TestHook
-    invokeInEveryVM(resetTestHook());
+    Invoke.invokeInEveryVM(resetTestHook());
     // close the cache.
     closeCache();
     disconnectFromDS();
@@ -161,20 +166,20 @@ public class QueryIndexUsingXMLDUnitTest extends CacheTestCase {
     VM vm1 = host.getVM(1);
     final String fileName = "IndexCreation.xml";
     
-    getLogWriter().info(
+    com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info(
         "Creating index using an xml file name : " + fileName);
     
     AsyncInvocation asyInvk0 = vm0.invokeAsync(createIndexThrougXML("vm0testCreateIndexThroughXML", name, fileName));
     
     AsyncInvocation asyInvk1 = vm1.invokeAsync(createIndexThrougXML("vm1testCreateIndexThroughXML", name, fileName));
     
-    DistributedTestCase.join(asyInvk1, 30 * 1000, getLogWriter());
+    ThreadUtils.join(asyInvk1, 30 * 1000);
     if (asyInvk1.exceptionOccurred()) {
-      fail("asyInvk1 failed", asyInvk1.getException());
+      Assert.fail("asyInvk1 failed", asyInvk1.getException());
     }
-    DistributedTestCase.join(asyInvk0, 30 * 1000, getLogWriter());
+    ThreadUtils.join(asyInvk0, 30 * 1000);
     if (asyInvk0.exceptionOccurred()) {
-      fail("asyInvk0 failed", asyInvk0.getException());
+      Assert.fail("asyInvk0 failed", asyInvk0.getException());
     }
 
     // Check index for PR
@@ -228,7 +233,7 @@ public class QueryIndexUsingXMLDUnitTest extends CacheTestCase {
     VM vm1 = host.getVM(1);
     final String fileName = "IndexCreation.xml";
     
-    getLogWriter().info(
+    com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info(
         "Creating index using an xml file name : " + fileName);
     
     vm0.invoke(createIndexThrougXML("vm0testCreateIndexWhileDoingGII", name, fileName));
@@ -283,7 +288,7 @@ public class QueryIndexUsingXMLDUnitTest extends CacheTestCase {
     VM vm1 = host.getVM(1);
     final String fileName = "IndexCreation.xml";
     
-    getLogWriter().info(
+    com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info(
         "Creating index using an xml file name : " + fileName);
     
     vm0.invoke(createIndexThrougXML("vm0testRRegionCreateIndexWhileDoingGII", repRegName, fileName));
@@ -331,7 +336,7 @@ public class QueryIndexUsingXMLDUnitTest extends CacheTestCase {
     VM vm1 = host.getVM(1);
     final String fileName = "IndexCreation.xml";
     
-    getLogWriter().info(
+    com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info(
         "Creating index using an xml file name : " + fileName);
     
     vm0.invoke(createIndexThrougXML("vm0testPersistentPRRegion", persistentRegName, fileName));
@@ -396,7 +401,7 @@ public class QueryIndexUsingXMLDUnitTest extends CacheTestCase {
     VM vm1 = host.getVM(1);
     final String fileName = "IndexCreation.xml";
     
-    getLogWriter().info("### in testCreateIndexWhileDoingGIIWithEmptyPRRegion.");
+    com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("### in testCreateIndexWhileDoingGIIWithEmptyPRRegion.");
     
 
     vm0.invoke(createIndexThrougXML("vm0testGIIWithEmptyPRRegion", name, fileName));
@@ -433,14 +438,14 @@ public class QueryIndexUsingXMLDUnitTest extends CacheTestCase {
     VM vm1 = host.getVM(1);
     final String fileName = "IndexCreation.xml";
     
-    getLogWriter().info(
+    com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info(
         "Creating index using an xml file name : " + fileName);
     
     AsyncInvocation asyInvk0 = vm0.invokeAsync(createIndexThrougXML("vm0testAsyncIndexWhileDoingGII", name, fileName));
     
-    DistributedTestCase.join(asyInvk0, 30 * 1000, getLogWriter());
+    ThreadUtils.join(asyInvk0, 30 * 1000);
     if (asyInvk0.exceptionOccurred()) {
-      fail("asyInvk0 failed", asyInvk0.getException());
+      Assert.fail("asyInvk0 failed", asyInvk0.getException());
     }
     
     // LoadRegion
@@ -451,16 +456,16 @@ public class QueryIndexUsingXMLDUnitTest extends CacheTestCase {
     
     vm0.invoke(prIndexCreationCheck(name, statusIndex, 50));
 
-    DistributedTestCase.join(asyInvk1, 30 * 1000, getLogWriter());
+    ThreadUtils.join(asyInvk1, 30 * 1000);
     if (asyInvk1.exceptionOccurred()) {
-      fail("asyInvk1 failed", asyInvk1.getException());
+      Assert.fail("asyInvk1 failed", asyInvk1.getException());
     }
     
     vm1.invoke(prIndexCreationCheck(name, statusIndex, 50));
 
-    DistributedTestCase.join(asyInvk0, 30 * 1000, getLogWriter());
+    ThreadUtils.join(asyInvk0, 30 * 1000);
     if (asyInvk0.exceptionOccurred()) {
-      fail("asyInvk0 failed", asyInvk0.getException());
+      Assert.fail("asyInvk0 failed", asyInvk0.getException());
     }
     
     vm1.invoke(resetTestHook());
@@ -479,7 +484,7 @@ public class QueryIndexUsingXMLDUnitTest extends CacheTestCase {
     VM vm1 = host.getVM(1);
     final String fileName = "IndexCreation.xml";
     
-    getLogWriter().info(
+    com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info(
         "Creating index using an xml file name : " + fileName);
     
     vm0.invoke(createIndexThrougXML("vm0testIndexCompareQResults", name, fileName));
@@ -542,13 +547,13 @@ public class QueryIndexUsingXMLDUnitTest extends CacheTestCase {
     VM vm1 = host.getVM(1);
     final String fileName = "IndexCreation.xml";
     
-    getLogWriter().info(
+    com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info(
         "Creating index using an xml file name : " + fileName);
     
     AsyncInvocation asyInvk0 = vm0.invokeAsync(createIndexThrougXML("vm0testCreateAsyncIndexGIIAndQuery", name, fileName));
-    DistributedTestCase.join(asyInvk0, 30 * 1000, getLogWriter());
+    ThreadUtils.join(asyInvk0, 30 * 1000);
     if (asyInvk0.exceptionOccurred()) {
-      fail("asyInvk0 failed", asyInvk0.getException());
+      Assert.fail("asyInvk0 failed", asyInvk0.getException());
     }
     
     // LoadRegion
@@ -558,13 +563,13 @@ public class QueryIndexUsingXMLDUnitTest extends CacheTestCase {
     AsyncInvocation asyInvk1 = vm1.invokeAsync(createIndexThrougXML("vm1testCreateAsyncIndexGIIAndQuery", name, fileName));
  
     
-    DistributedTestCase.join(asyInvk1, 30 * 1000, getLogWriter());  
+    ThreadUtils.join(asyInvk1, 30 * 1000);  
     if (asyInvk1.exceptionOccurred()) {
-      fail("asyInvk1 failed", asyInvk1.getException());
+      Assert.fail("asyInvk1 failed", asyInvk1.getException());
     }
-    DistributedTestCase.join(asyInvk0, 30 * 1000, getLogWriter());
+    ThreadUtils.join(asyInvk0, 30 * 1000);
     if (asyInvk0.exceptionOccurred()) {
-      fail("asyInvk0 failed", asyInvk0.getException());
+      Assert.fail("asyInvk0 failed", asyInvk0.getException());
     }
  
     vm0.invoke(prIndexCreationCheck(name, statusIndex, 50));
@@ -592,7 +597,7 @@ public class QueryIndexUsingXMLDUnitTest extends CacheTestCase {
     VM vm1 = host.getVM(1);
     final String fileName = "IndexCreation.xml";
     
-    getLogWriter().info(
+    com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info(
         "Creating index using an xml file name : " + fileName);
     
     vm0.invoke(createIndexThrougXML("vm0testAsyncIndexAndCompareQResults", name, fileName));
@@ -611,9 +616,9 @@ public class QueryIndexUsingXMLDUnitTest extends CacheTestCase {
     vm1.invoke(setTestHook());    
     vm1.invoke(createIndexThrougXML("vm1testAsyncIndexAndCompareQResults", name, fileName));
     
-    DistributedTestCase.join(asyInvk0, 30 * 1000, getLogWriter());
+    ThreadUtils.join(asyInvk0, 30 * 1000);
     if (asyInvk0.exceptionOccurred()) {
-      fail("asyInvk0 failed", asyInvk0.getException());
+      Assert.fail("asyInvk0 failed", asyInvk0.getException());
     }
      
     vm1.invoke(prIndexCreationCheck(persistentRegName, "secIndex", 50));
@@ -635,7 +640,7 @@ public class QueryIndexUsingXMLDUnitTest extends CacheTestCase {
     VM vm1 = host.getVM(1);
     final String fileName = "IndexCreation.xml";
     
-    getLogWriter().info(
+    com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info(
         "Creating index using an xml file name : " + fileName);
     //create index using xml
     vm0.invoke(createIndexThrougXML("vm0testIndexCreationForReplicatedPersistentOverFlowRegionOnRestart", persistentOverFlowRegName, fileName));
@@ -781,7 +786,7 @@ public class QueryIndexUsingXMLDUnitTest extends CacheTestCase {
         return "Number of Indexed Bucket is less than the expected number. "+ bucketCount + ", " + index.getNumberOfIndexedBuckets();
       }
     };
-    DistributedTestCase.waitForCriterion(ev, MAX_TIME, 200, true);
+    Wait.waitForCriterion(ev, MAX_TIME, 200, true);
     return true;
   }
   
@@ -882,7 +887,7 @@ public class QueryIndexUsingXMLDUnitTest extends CacheTestCase {
             }
 
             // compare.
-            getLogWriter().info("Execute query : \n queryStr with index: " + s[0]  + " \n queryStr without index: " + s[1]);
+            com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("Execute query : \n queryStr with index: " + s[0]  + " \n queryStr without index: " + s[1]);
             ssORrs.CompareQueryResultsWithoutAndWithIndexes(sr, 1, s);
           }
         }
@@ -942,7 +947,7 @@ public class QueryIndexUsingXMLDUnitTest extends CacheTestCase {
     new Exception("TEST DEBUG###" + diskStoreId).printStackTrace();
     if (system == null || !system.isConnected()) {
       // Figure out our distributed system properties
-      Properties p = getAllDistributedSystemProperties(getDistributedSystemProperties());
+      Properties p = DistributedTestUtils.getAllDistributedSystemProperties(getDistributedSystemProperties());
       system = (InternalDistributedSystem)DistributedSystem.connect(p);
     } 
     return system;
@@ -956,13 +961,13 @@ public class QueryIndexUsingXMLDUnitTest extends CacheTestCase {
         System.setProperty("gemfire.DISABLE_DISCONNECT_DS_ON_CACHE_CLOSE", "true");
         cache = CacheFactory.create(system); 
       } catch (CacheExistsException e) {
-        fail("the cache already exists", e);
+        Assert.fail("the cache already exists", e);
 
       } catch (RuntimeException ex) {
         throw ex;
 
       } catch (Exception ex) {
-        fail("Checked exception while initializing cache??", ex);
+        Assert.fail("Checked exception while initializing cache??", ex);
       } finally {
         System.clearProperty("gemfire.DISABLE_DISCONNECT_DS_ON_CACHE_CLOSE");
       }      

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/820cfd63/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/dunit/QueryParamsAuthorizationDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/dunit/QueryParamsAuthorizationDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/dunit/QueryParamsAuthorizationDUnitTest.java
index 8030f09..5984576 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/dunit/QueryParamsAuthorizationDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/dunit/QueryParamsAuthorizationDUnitTest.java
@@ -32,6 +32,7 @@ import com.gemstone.gemfire.cache.server.CacheServer;
 import com.gemstone.gemfire.cache30.CacheTestCase;
 import com.gemstone.gemfire.internal.AvailablePortHelper;
 import com.gemstone.gemfire.test.dunit.Host;
+import com.gemstone.gemfire.test.dunit.NetworkUtils;
 import com.gemstone.gemfire.test.dunit.SerializableCallable;
 import com.gemstone.gemfire.test.dunit.VM;
 
@@ -83,7 +84,7 @@ public class QueryParamsAuthorizationDUnitTest extends CacheTestCase {
       @Override
       public Object call() throws Exception {
         ClientCacheFactory ccf = new ClientCacheFactory()
-            .addPoolServer(getServerHostName(server1.getHost()), port)
+            .addPoolServer(NetworkUtils.getServerHostName(server1.getHost()), port)
             .set("security-client-auth-init",
                 "templates.security.UserPasswordAuthInit.create")
             .set("security-username", "root").set("security-password", "root");


Mime
View raw message