geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kl...@apache.org
Subject [46/50] [abbrv] incubator-geode git commit: Refactor dunit
Date Mon, 01 Feb 2016 20:56:03 GMT
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/0d759cb3/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/dunit/QueryUsingPoolDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/dunit/QueryUsingPoolDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/dunit/QueryUsingPoolDUnitTest.java
index 35f71fe..9165c2e 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/dunit/QueryUsingPoolDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/dunit/QueryUsingPoolDUnitTest.java
@@ -49,7 +49,9 @@ import com.gemstone.gemfire.distributed.DistributedSystem;
 import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
 import com.gemstone.gemfire.internal.AvailablePort;
 import com.gemstone.gemfire.internal.cache.tier.sockets.CacheClientNotifier;
+import com.gemstone.gemfire.test.dunit.Assert;
 import com.gemstone.gemfire.test.dunit.Host;
+import com.gemstone.gemfire.test.dunit.IgnoredException;
 import com.gemstone.gemfire.test.dunit.SerializableRunnable;
 import com.gemstone.gemfire.test.dunit.VM;
 
@@ -94,8 +96,8 @@ public class QueryUsingPoolDUnitTest extends CacheTestCase {
   public void setUp() throws Exception {
     super.setUp();
     disconnectAllFromDS();
-    addExpectedException("Connection reset");
-    addExpectedException("Socket input is shutdown");
+    IgnoredException.addExpectedException("Connection reset");
+    IgnoredException.addExpectedException("Socket input is shutdown");
   }
 
   public void tearDown2() throws Exception {
@@ -178,7 +180,7 @@ public class QueryUsingPoolDUnitTest extends CacheTestCase {
         try {
           startBridgeServer(0, false);
         } catch (Exception ex) {
-          fail("While starting CacheServer", ex);
+          Assert.fail("While starting CacheServer", ex);
         }
       }
     });
@@ -213,7 +215,7 @@ public class QueryUsingPoolDUnitTest extends CacheTestCase {
         try {
           qService = (PoolManager.find(poolName)).getQueryService();
         } catch (Exception e) {
-          fail("Failed to get QueryService.", e);
+          Assert.fail("Failed to get QueryService.", e);
         }          
 
         queryString = "import com.gemstone.gemfire.admin.QueryUsingPoolDUnitTest.TestObject; select distinct * from " + regionName;
@@ -222,7 +224,7 @@ public class QueryUsingPoolDUnitTest extends CacheTestCase {
           Query query = qService.newQuery(queryString);
           results = (SelectResults)query.execute();
         } catch (Exception e) {
-          fail("Failed executing " + queryString, e);
+          Assert.fail("Failed executing " + queryString, e);
         }          
 
         assertEquals(numberOfEntries, results.size());
@@ -233,7 +235,7 @@ public class QueryUsingPoolDUnitTest extends CacheTestCase {
           Query query = qService.newQuery(queryString);
           results = (SelectResults)query.execute();
         } catch (Exception e) {
-          fail("Failed executing " + queryString, e);
+          Assert.fail("Failed executing " + queryString, e);
         }
         assertEquals(numberOfEntries, results.size());
         assertTrue(!results.getCollectionType().allowsDuplicates());
@@ -243,7 +245,7 @@ public class QueryUsingPoolDUnitTest extends CacheTestCase {
           Query query = qService.newQuery(queryString);
           results = (SelectResults)query.execute();
         } catch (Exception e) {
-          fail("Failed executing " + queryString, e);
+          Assert.fail("Failed executing " + queryString, e);
         }
         assertEquals(0, results.size());
         assertTrue(!results.getCollectionType().allowsDuplicates());
@@ -253,7 +255,7 @@ public class QueryUsingPoolDUnitTest extends CacheTestCase {
           Query query = qService.newQuery(queryString);
           results = (SelectResults)query.execute();
         } catch (Exception e) {
-          fail("Failed executing " + queryString, e);
+          Assert.fail("Failed executing " + queryString, e);
         }
         assertEquals(numberOfEntries/2, results.size());
         assertTrue(!results.getCollectionType().allowsDuplicates());
@@ -263,7 +265,7 @@ public class QueryUsingPoolDUnitTest extends CacheTestCase {
           Query query = qService.newQuery(queryString);
           results = (SelectResults)query.execute();
         } catch (Exception e) {
-          fail("Failed executing " + queryString, e);
+          Assert.fail("Failed executing " + queryString, e);
         }
         assertEquals(1, results.size());
         assertTrue(!results.getCollectionType().allowsDuplicates());
@@ -273,7 +275,7 @@ public class QueryUsingPoolDUnitTest extends CacheTestCase {
           Query query = qService.newQuery(queryString);
           results = (SelectResults)query.execute();
         } catch (Exception e) {
-          fail("Failed executing " + queryString, e);
+          Assert.fail("Failed executing " + queryString, e);
         }
         assertEquals(1, results.size());
         assertTrue(!results.getCollectionType().allowsDuplicates());
@@ -315,7 +317,7 @@ public class QueryUsingPoolDUnitTest extends CacheTestCase {
         try {
           startBridgeServer(0, false);
         } catch (Exception ex) {
-          fail("While starting CacheServer", ex);
+          Assert.fail("While starting CacheServer", ex);
         }
       }
     });
@@ -350,7 +352,7 @@ public class QueryUsingPoolDUnitTest extends CacheTestCase {
         try {
           qService = (PoolManager.find(poolName)).getQueryService();
         } catch (Exception e) {
-          fail("Failed to get QueryService.", e);
+          Assert.fail("Failed to get QueryService.", e);
         }          
 
         queryString = "import com.gemstone.gemfire.admin.QueryUsingPoolDUnitTest.TestObject; select distinct ticker, price from " + regionName;
@@ -358,7 +360,7 @@ public class QueryUsingPoolDUnitTest extends CacheTestCase {
           Query query = qService.newQuery(queryString);
           results = (SelectResults)query.execute();
         } catch (Exception e) {
-          fail("Failed executing " + queryString, e);
+          Assert.fail("Failed executing " + queryString, e);
         }
         assertEquals(numberOfEntries, results.size());
         assertTrue(!results.getCollectionType().allowsDuplicates() && results.getCollectionType().getElementType().isStructType());
@@ -368,7 +370,7 @@ public class QueryUsingPoolDUnitTest extends CacheTestCase {
           Query query = qService.newQuery(queryString);
           results = (SelectResults)query.execute();
         } catch (Exception e) {
-          fail("Failed executing " + queryString, e);
+          Assert.fail("Failed executing " + queryString, e);
         }
         assertEquals(numberOfEntries, results.size());
         assertTrue(!results.getCollectionType().allowsDuplicates() && results.getCollectionType().getElementType().isStructType());
@@ -378,7 +380,7 @@ public class QueryUsingPoolDUnitTest extends CacheTestCase {
           Query query = qService.newQuery(queryString);
           results = (SelectResults)query.execute();
         } catch (Exception e) {
-          fail("Failed executing " + queryString, e);
+          Assert.fail("Failed executing " + queryString, e);
         }
         assertEquals(0, results.size());
         assertTrue(!results.getCollectionType().allowsDuplicates() && results.getCollectionType().getElementType().isStructType());
@@ -388,7 +390,7 @@ public class QueryUsingPoolDUnitTest extends CacheTestCase {
           Query query = qService.newQuery(queryString);
           results = (SelectResults)query.execute();
         } catch (Exception e) {
-          fail("Failed executing " + queryString, e);
+          Assert.fail("Failed executing " + queryString, e);
         }
         assertEquals(numberOfEntries/2, results.size());
         assertTrue(!results.getCollectionType().allowsDuplicates() && results.getCollectionType().getElementType().isStructType());
@@ -398,7 +400,7 @@ public class QueryUsingPoolDUnitTest extends CacheTestCase {
           Query query = qService.newQuery(queryString);
           results = (SelectResults)query.execute();
         } catch (Exception e) {
-          fail("Failed executing " + queryString, e);
+          Assert.fail("Failed executing " + queryString, e);
         }
         assertEquals(1, results.size());
         assertTrue(!results.getCollectionType().allowsDuplicates() && results.getCollectionType().getElementType().isStructType());
@@ -408,7 +410,7 @@ public class QueryUsingPoolDUnitTest extends CacheTestCase {
           Query query = qService.newQuery(queryString);
           results = (SelectResults)query.execute();
         } catch (Exception e) {
-          fail("Failed executing " + queryString, e);
+          Assert.fail("Failed executing " + queryString, e);
         }
         assertEquals(1, results.size());
         assertTrue(!results.getCollectionType().allowsDuplicates() && results.getCollectionType().getElementType().isStructType());
@@ -447,7 +449,7 @@ public class QueryUsingPoolDUnitTest extends CacheTestCase {
         try {
           startBridgeServer(0, false);
         } catch (Exception ex) {
-          fail("While starting CacheServer", ex);
+          Assert.fail("While starting CacheServer", ex);
         }
       }
     });
@@ -600,7 +602,7 @@ public class QueryUsingPoolDUnitTest extends CacheTestCase {
         try {
           results = region.query(queryString);
         } catch (Exception e) {
-          fail("Failed executing " + queryString, e);
+          Assert.fail("Failed executing " + queryString, e);
         }
         getLogWriter().fine("size: " + results.size());
         //assertEquals(numberOfEntries, results.size());
@@ -643,7 +645,7 @@ public class QueryUsingPoolDUnitTest extends CacheTestCase {
         try {
           startBridgeServer(0, false);
         } catch (Exception ex) {
-          fail("While starting CacheServer", ex);
+          Assert.fail("While starting CacheServer", ex);
         }
       }
     });
@@ -681,7 +683,7 @@ public class QueryUsingPoolDUnitTest extends CacheTestCase {
         try {
           qService = (PoolManager.find(poolName)).getQueryService();
         } catch (Exception e) {
-          fail("Failed to get QueryService.", e);
+          Assert.fail("Failed to get QueryService.", e);
         }          
 
         // value query
@@ -690,7 +692,7 @@ public class QueryUsingPoolDUnitTest extends CacheTestCase {
           Query query = qService.newQuery(queryString);
           results = (SelectResults)query.execute();
         } catch (Exception e) {
-          fail("Failed executing " + queryString, e);
+          Assert.fail("Failed executing " + queryString, e);
         }
         assertEquals(1, results.size());
         assertTrue(!results.getCollectionType().allowsDuplicates());
@@ -702,7 +704,7 @@ public class QueryUsingPoolDUnitTest extends CacheTestCase {
           Query query = qService.newQuery(queryString);
           results = (SelectResults)query.execute();
         } catch (Exception e) {
-          fail("Failed executing " + queryString, e);
+          Assert.fail("Failed executing " + queryString, e);
         }
         assertEquals(1, results.size());
         assertTrue(!results.getCollectionType().allowsDuplicates());
@@ -714,7 +716,7 @@ public class QueryUsingPoolDUnitTest extends CacheTestCase {
           Query query = qService.newQuery(queryString);
           results = (SelectResults)query.execute();
         } catch (Exception e) {
-          fail("Failed executing " + queryString, e);
+          Assert.fail("Failed executing " + queryString, e);
         }
         assertEquals(numberOfEntries, results.size());
         // All order-by query results are stored in a ResultsCollectionWrapper
@@ -738,7 +740,7 @@ public class QueryUsingPoolDUnitTest extends CacheTestCase {
           Query query = qService.newQuery(queryString);
           results = (SelectResults)query.execute();
         } catch (Exception e) {
-          fail("Failed executing " + queryString, e);
+          Assert.fail("Failed executing " + queryString, e);
         }
         assertEquals(numberOfEntries, results.size());
         // All order-by query results are stored in a ResultsCollectionWrapper
@@ -762,7 +764,7 @@ public class QueryUsingPoolDUnitTest extends CacheTestCase {
           Query query = qService.newQuery(queryString);
           results = (SelectResults)query.execute();
         } catch (Exception e) {
-          fail("Failed executing " + queryString, e);
+          Assert.fail("Failed executing " + queryString, e);
         }
         assertEquals(1, results.size());
         Object result = results.iterator().next();
@@ -776,7 +778,7 @@ public class QueryUsingPoolDUnitTest extends CacheTestCase {
           Query query = qService.newQuery(queryString);
           results = (SelectResults)query.execute();
         } catch (Exception e) {
-          fail("Failed executing " + queryString, e);
+          Assert.fail("Failed executing " + queryString, e);
         }
         assertEquals(1, results.size());
         assertEquals("key-1", results.asList().get(0));
@@ -861,7 +863,7 @@ public class QueryUsingPoolDUnitTest extends CacheTestCase {
         try {
           qService = (PoolManager.find(poolName)).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++){
@@ -870,7 +872,7 @@ public class QueryUsingPoolDUnitTest extends CacheTestCase {
             Query query = qService.newQuery(queryString[i]);
             results = (SelectResults)query.execute(params[i]);
           } catch (Exception e) {
-            fail("Failed executing " + queryString[i], e);
+            Assert.fail("Failed executing " + queryString[i], e);
           }
           try {
             assertEquals(expectedResults[i], results.size());
@@ -894,7 +896,7 @@ public class QueryUsingPoolDUnitTest extends CacheTestCase {
         try {
           qService = (PoolManager.find(poolName)).getQueryService();
         } catch (Exception e) {
-          fail("Failed to get QueryService.", e);
+          Assert.fail("Failed to get QueryService.", e);
         }          
         for (int x=0; x < useMaintainedCompiledQueries; x++){
           for (int i=0; i < queryString.length; i++){
@@ -903,7 +905,7 @@ public class QueryUsingPoolDUnitTest extends CacheTestCase {
               Query query = qService.newQuery(queryString[i]);
               results = (SelectResults)query.execute(params[i]);
             } catch (Exception e) {
-              fail("Failed executing " + queryString[i], e);
+              Assert.fail("Failed executing " + queryString[i], e);
             }
             try {
               assertEquals(expectedResults[i], results.size());
@@ -1020,7 +1022,7 @@ public class QueryUsingPoolDUnitTest extends CacheTestCase {
         try {
           qService = (PoolManager.find(poolName)).getQueryService();
         } catch (Exception e) {
-          fail("Failed to get QueryService.", e);
+          Assert.fail("Failed to get QueryService.", e);
         }          
         for (int j=0; j < queryString.length; j++){
           for (int i=0; i < queryString.length; i++){
@@ -1029,7 +1031,7 @@ public class QueryUsingPoolDUnitTest extends CacheTestCase {
               Query query = qService.newQuery(queryString[i]);
               results = (SelectResults)query.execute(params[i]);
             } catch (Exception e) {
-              fail("Failed executing " + queryString[i], e);
+              Assert.fail("Failed executing " + queryString[i], e);
             }
             try {
               assertEquals(expectedResults[i], results.size());
@@ -1527,7 +1529,7 @@ public class QueryUsingPoolDUnitTest extends CacheTestCase {
         try {
           qService = (PoolManager.find(poolName)).getQueryService();
         } catch (Exception e) {
-          fail("Failed to get QueryService.", e);
+          Assert.fail("Failed to get QueryService.", e);
         }      
         // Use minimal query, so that there will be multiple 
         // clients using the same compiled query at server.
@@ -1541,7 +1543,7 @@ public class QueryUsingPoolDUnitTest extends CacheTestCase {
               rs[0][1] = (SelectResults)query2.execute();
               // Compare results.
             } catch (Exception e) {
-              fail("Failed executing " + queryString[i], e);
+              Assert.fail("Failed executing " + queryString[i], e);
             }
             getLogWriter().info("### Comparing results for Query :" + ((i+1) * (j+1)) + " : " + queryString[i]);
             compareQueryResultsWithoutAndWithIndexes(rs, 1);
@@ -1589,7 +1591,7 @@ public class QueryUsingPoolDUnitTest extends CacheTestCase {
         try {
           qService = (PoolManager.find(poolName)).getQueryService();
         } catch (Exception e) {
-          fail("Failed to get QueryService.", e);
+          Assert.fail("Failed to get QueryService.", e);
         }          
         for (int j=0; j < queryString.length; j++){
           for (int i=0; i < queryString.length; i++){
@@ -1602,7 +1604,7 @@ public class QueryUsingPoolDUnitTest extends CacheTestCase {
               // Compare results.
               compareQueryResultsWithoutAndWithIndexes(rs, 1);
             } catch (Exception e) {
-              fail("Failed executing " + queryString[i], e);
+              Assert.fail("Failed executing " + queryString[i], e);
             }
           }
         }
@@ -1674,7 +1676,7 @@ public class QueryUsingPoolDUnitTest extends CacheTestCase {
         try {
           startBridgeServer(0, false);
         } catch (Exception ex) {
-          fail("While starting CacheServer", ex);
+          Assert.fail("While starting CacheServer", ex);
         }
       }
     });
@@ -1713,7 +1715,7 @@ public class QueryUsingPoolDUnitTest extends CacheTestCase {
         try {
           qService = (PoolManager.find(poolName)).getQueryService();
         } catch (Exception e) {
-          fail("Failed to get QueryService.", e);
+          Assert.fail("Failed to get QueryService.", e);
         }          
 
         queryString =
@@ -1722,7 +1724,7 @@ public class QueryUsingPoolDUnitTest extends CacheTestCase {
           Query query = qService.newQuery(queryString);
           results = (SelectResults)query.execute();
         } catch (Exception e) {
-          fail("Failed executing " + queryString, e);
+          Assert.fail("Failed executing " + queryString, e);
         }
         assertEquals(numberOfEntries, results.size());
         assertTrue(!results.getCollectionType().allowsDuplicates() && results.getCollectionType().getElementType().isStructType());
@@ -1733,7 +1735,7 @@ public class QueryUsingPoolDUnitTest extends CacheTestCase {
           Query query = qService.newQuery(queryString);
           results = (SelectResults)query.execute();
         } catch (Exception e) {
-          fail("Failed executing " + queryString, e);
+          Assert.fail("Failed executing " + queryString, e);
         }
         assertEquals(1, results.size());
         assertTrue(!results.getCollectionType().allowsDuplicates() && results.getCollectionType().getElementType().isStructType());
@@ -1776,7 +1778,7 @@ public class QueryUsingPoolDUnitTest extends CacheTestCase {
         try {
           startBridgeServer(0, false);
         } catch (Exception ex) {
-          fail("While starting CacheServer", ex);
+          Assert.fail("While starting CacheServer", ex);
         }
       }
     });
@@ -1813,7 +1815,7 @@ public class QueryUsingPoolDUnitTest extends CacheTestCase {
         try {
           qService = (PoolManager.find(poolName1)).getQueryService();
         } catch (Exception e) {
-          fail("Failed to get QueryService.", e);
+          Assert.fail("Failed to get QueryService.", e);
         }          
 
         queryString = "SELECT DISTINCT itr.value FROM " + regionName + ".entries itr where itr.key = 'key-1'";
@@ -1821,7 +1823,7 @@ public class QueryUsingPoolDUnitTest extends CacheTestCase {
           Query query = qService.newQuery(queryString);
           results = (SelectResults)query.execute();
         } catch (Exception e) {
-          fail("Failed executing " + queryString, e);
+          Assert.fail("Failed executing " + queryString, e);
         }
         assertEquals(1, results.size());
         assertTrue(!results.getCollectionType().allowsDuplicates() && !results.getCollectionType().getElementType().isStructType());
@@ -1832,7 +1834,7 @@ public class QueryUsingPoolDUnitTest extends CacheTestCase {
           Query query = qService.newQuery(queryString);
           results = (SelectResults)query.execute();
         } catch (Exception e) {
-          fail("Failed executing " + queryString, e);
+          Assert.fail("Failed executing " + queryString, e);
         }
         assertEquals(1, results.size());
         assertTrue(!results.getCollectionType().allowsDuplicates() && !results.getCollectionType().getElementType().isStructType());
@@ -1850,7 +1852,7 @@ public class QueryUsingPoolDUnitTest extends CacheTestCase {
         try {
           qService = (PoolManager.find(poolName2)).getQueryService();
         } catch (Exception e) {
-          fail("Failed to get QueryService.", e);
+          Assert.fail("Failed to get QueryService.", e);
         }          
 
         queryString = "SELECT DISTINCT itr.value FROM " + regionName + ".entries itr where itr.key = 'key-1'";
@@ -1858,7 +1860,7 @@ public class QueryUsingPoolDUnitTest extends CacheTestCase {
           Query query = qService.newQuery(queryString);
           results = (SelectResults)query.execute();
         } catch (Exception e) {
-          fail("Failed executing " + queryString, e);
+          Assert.fail("Failed executing " + queryString, e);
         }
         assertEquals(1, results.size());
         assertTrue(!results.getCollectionType().allowsDuplicates() && !results.getCollectionType().getElementType().isStructType());
@@ -1869,7 +1871,7 @@ public class QueryUsingPoolDUnitTest extends CacheTestCase {
           Query query = qService.newQuery(queryString);
           results = (SelectResults)query.execute();
         } catch (Exception e) {
-          fail("Failed executing " + queryString, e);
+          Assert.fail("Failed executing " + queryString, e);
         }
         assertEquals(1, results.size());
         assertTrue(!results.getCollectionType().allowsDuplicates() && !results.getCollectionType().getElementType().isStructType());
@@ -1912,7 +1914,7 @@ public class QueryUsingPoolDUnitTest extends CacheTestCase {
         try {
           startBridgeServer(0, false);
         } catch (Exception ex) {
-          fail("While starting CacheServer", ex);
+          Assert.fail("While starting CacheServer", ex);
         }
       }
     });
@@ -1959,7 +1961,7 @@ public class QueryUsingPoolDUnitTest extends CacheTestCase {
         try {
           qService = (PoolManager.find(poolName)).getQueryService();
         } catch (Exception e) {
-          fail("Failed to get QueryService.", e);
+          Assert.fail("Failed to get QueryService.", e);
         }
 
         try {
@@ -2010,7 +2012,7 @@ public class QueryUsingPoolDUnitTest extends CacheTestCase {
         try {
           startBridgeServer(0, false);
         } catch (Exception ex) {
-          fail("While starting CacheServer", ex);
+          Assert.fail("While starting CacheServer", ex);
         }
       }
     });
@@ -2027,7 +2029,7 @@ public class QueryUsingPoolDUnitTest extends CacheTestCase {
           QueryService qService = region.getCache().getQueryService();
           qService.createIndex("idIndex",IndexType.FUNCTIONAL, "id", region.getFullPath());
         } catch (Exception e) {
-          fail("Failed to create index.", e);
+          Assert.fail("Failed to create index.", e);
         }          
 
       }
@@ -2058,7 +2060,7 @@ public class QueryUsingPoolDUnitTest extends CacheTestCase {
         try {
           qService = (PoolManager.find(poolName)).getQueryService();
         } catch (Exception e) {
-          fail("Failed to get QueryService.", e);
+          Assert.fail("Failed to get QueryService.", e);
         }          
 
         // order by value query
@@ -2073,7 +2075,7 @@ public class QueryUsingPoolDUnitTest extends CacheTestCase {
             Query query = qService.newQuery(queryString);
             results = (SelectResults)query.execute();
           } catch (Exception e) {
-            fail("Failed executing " + queryString, e);
+            Assert.fail("Failed executing " + queryString, e);
           }
           assertEquals(numberOfEntries, results.size());
           // All order-by query results are stored in a ResultsCollectionWrapper
@@ -2114,7 +2116,7 @@ public class QueryUsingPoolDUnitTest extends CacheTestCase {
             Query query = qService.newQuery(queryString);
             results = (SelectResults)query.execute();
           } catch (Exception e) {
-            fail("Failed executing " + queryString, e);
+            Assert.fail("Failed executing " + queryString, e);
           }
           assertEquals(numberOfEntries, results.size());
           // All order-by query results are stored in a ResultsCollectionWrapper
@@ -2166,7 +2168,7 @@ public class QueryUsingPoolDUnitTest extends CacheTestCase {
         try {
           startBridgeServer(0, false);
         } catch (Exception ex) {
-          fail("While starting CacheServer", ex);
+          Assert.fail("While starting CacheServer", ex);
         }
       }
     });
@@ -2210,7 +2212,7 @@ public class QueryUsingPoolDUnitTest extends CacheTestCase {
         try {
           qService = (PoolManager.find(poolName)).getQueryService();
         } catch (Exception e) {
-          fail("Failed to get QueryService.", e);
+          Assert.fail("Failed to get QueryService.", e);
         }
 
         // Testing Remote Query with params.
@@ -2220,7 +2222,7 @@ public class QueryUsingPoolDUnitTest extends CacheTestCase {
         } catch(UnsupportedOperationException e) {
           // Expected behavior.
         } catch (Exception e){
-          fail("Failed with UnExpected Exception.", e);
+          Assert.fail("Failed with UnExpected Exception.", e);
         }
 
         // Test with Index.
@@ -2229,7 +2231,7 @@ public class QueryUsingPoolDUnitTest extends CacheTestCase {
         } catch(UnsupportedOperationException e) {
           // Expected behavior.
         } catch (Exception e){
-          fail("Failed with UnExpected Exception.", e);
+          Assert.fail("Failed with UnExpected Exception.", e);
         }
 
         try {
@@ -2238,7 +2240,7 @@ public class QueryUsingPoolDUnitTest extends CacheTestCase {
         } catch(UnsupportedOperationException e) {
           // Expected behavior.
         } catch (Exception e){
-          fail("Failed with UnExpected Exception.", e);
+          Assert.fail("Failed with UnExpected Exception.", e);
         }
 
         try {
@@ -2384,7 +2386,7 @@ public class QueryUsingPoolDUnitTest extends CacheTestCase {
     try {
       startBridgeServer(0, false);
     } catch (Exception ex) {
-      fail("While starting CacheServer", ex);
+      Assert.fail("While starting CacheServer", ex);
     }
   }
 
@@ -2397,7 +2399,7 @@ public class QueryUsingPoolDUnitTest extends CacheTestCase {
     try {
       qService = (PoolManager.find(poolName)).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++){
@@ -2406,7 +2408,7 @@ public class QueryUsingPoolDUnitTest extends CacheTestCase {
         Query query = qService.newQuery(queryString[i]);
         results = (SelectResults)query.execute(params[i]);
       } catch (Exception e) {
-        fail("Failed executing " + queryString[i], e);
+        Assert.fail("Failed executing " + queryString[i], e);
       }
     }        
   }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/0d759cb3/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/dunit/RemoteQueryDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/dunit/RemoteQueryDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/dunit/RemoteQueryDUnitTest.java
index dfbe69e..de8ca54 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/dunit/RemoteQueryDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/dunit/RemoteQueryDUnitTest.java
@@ -42,6 +42,7 @@ import com.gemstone.gemfire.cache30.CacheTestCase;
 import com.gemstone.gemfire.cache30.ClientServerTestCase;
 import com.gemstone.gemfire.distributed.DistributedSystem;
 import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
+import com.gemstone.gemfire.test.dunit.Assert;
 import com.gemstone.gemfire.test.dunit.Host;
 import com.gemstone.gemfire.test.dunit.SerializableRunnable;
 import com.gemstone.gemfire.test.dunit.VM;
@@ -107,7 +108,7 @@ public class RemoteQueryDUnitTest extends CacheTestCase {
           try {
             startBridgeServer(0, false);
           } catch (Exception ex) {
-            fail("While starting CacheServer", ex);
+            Assert.fail("While starting CacheServer", ex);
           }
         }
       });
@@ -149,7 +150,7 @@ public class RemoteQueryDUnitTest extends CacheTestCase {
           try {
             results = region.query(queryString);
           } catch (Exception e) {
-            fail("Failed executing " + queryString, e);
+            Assert.fail("Failed executing " + queryString, e);
           }
           assertEquals(numberOfEntries, results.size());
           assertTrue(results.getClass() == ResultsBag.class);
@@ -159,7 +160,7 @@ public class RemoteQueryDUnitTest extends CacheTestCase {
           try {
             results = region.query(queryString);
           } catch (Exception e) {
-            fail("Failed executing " + queryString, e);
+            Assert.fail("Failed executing " + queryString, e);
           }
           assertEquals(0, results.size());
           assertTrue(results.getClass() == ResultsBag.class);
@@ -169,7 +170,7 @@ public class RemoteQueryDUnitTest extends CacheTestCase {
           try {
             results = region.query(queryString);
           } catch (Exception e) {
-            fail("Failed executing " + queryString, e);
+            Assert.fail("Failed executing " + queryString, e);
           }
           assertEquals(numberOfEntries/2, results.size());
           assertTrue(results.getClass() == ResultsBag.class);
@@ -179,7 +180,7 @@ public class RemoteQueryDUnitTest extends CacheTestCase {
           try {
             results = region.query(queryString);
           } catch (Exception e) {
-            fail("Failed executing " + queryString, e);
+            Assert.fail("Failed executing " + queryString, e);
           }
           assertEquals(1, results.size());
           assertTrue(results.getClass() == ResultsBag.class);
@@ -189,7 +190,7 @@ public class RemoteQueryDUnitTest extends CacheTestCase {
           try {
             results = region.query(queryString);
           } catch (Exception e) {
-            fail("Failed executing " + queryString, e);
+            Assert.fail("Failed executing " + queryString, e);
           }
           assertEquals(1, results.size());
           assertTrue(results.getClass() == ResultsBag.class);
@@ -250,7 +251,7 @@ public class RemoteQueryDUnitTest extends CacheTestCase {
           try {
             startBridgeServer(0, false);
           } catch (Exception ex) {
-            fail("While starting CacheServer", ex);
+            Assert.fail("While starting CacheServer", ex);
           }
         }
       });
@@ -293,7 +294,7 @@ public class RemoteQueryDUnitTest extends CacheTestCase {
           try {
             results = region.query(queryString);
           } catch (Exception e) {
-            fail("Failed executing " + queryString, e);
+            Assert.fail("Failed executing " + queryString, e);
           }
           assertEquals(numberOfEntries, results.size());
           assertTrue(!results.getCollectionType().allowsDuplicates());
@@ -302,7 +303,7 @@ public class RemoteQueryDUnitTest extends CacheTestCase {
           try {
             results = region.query(queryString);
           } catch (Exception e) {
-            fail("Failed executing " + queryString, e);
+            Assert.fail("Failed executing " + queryString, e);
           }
           assertEquals(numberOfEntries, results.size());
           assertTrue(!results.getCollectionType().allowsDuplicates());
@@ -311,7 +312,7 @@ public class RemoteQueryDUnitTest extends CacheTestCase {
           try {
             results = region.query(queryString);
           } catch (Exception e) {
-            fail("Failed executing " + queryString, e);
+            Assert.fail("Failed executing " + queryString, e);
           }
           assertEquals(0, results.size());
           assertTrue(!results.getCollectionType().allowsDuplicates());
@@ -320,7 +321,7 @@ public class RemoteQueryDUnitTest extends CacheTestCase {
           try {
             results = region.query(queryString);
           } catch (Exception e) {
-            fail("Failed executing " + queryString, e);
+            Assert.fail("Failed executing " + queryString, e);
           }
           assertEquals(numberOfEntries/2, results.size());
           assertTrue(!results.getCollectionType().allowsDuplicates());
@@ -329,7 +330,7 @@ public class RemoteQueryDUnitTest extends CacheTestCase {
           try {
             results = region.query(queryString);
           } catch (Exception e) {
-            fail("Failed executing " + queryString, e);
+            Assert.fail("Failed executing " + queryString, e);
           }
           assertEquals(1, results.size());
           assertTrue(!results.getCollectionType().allowsDuplicates());
@@ -338,7 +339,7 @@ public class RemoteQueryDUnitTest extends CacheTestCase {
           try {
             results = region.query(queryString);
           } catch (Exception e) {
-            fail("Failed executing " + queryString, e);
+            Assert.fail("Failed executing " + queryString, e);
           }
           assertEquals(1, results.size());
           assertTrue(!results.getCollectionType().allowsDuplicates());
@@ -378,7 +379,7 @@ public class RemoteQueryDUnitTest extends CacheTestCase {
           try {
             startBridgeServer(0, false);
           } catch (Exception ex) {
-            fail("While starting CacheServer", ex);
+            Assert.fail("While starting CacheServer", ex);
           }
         }
       });
@@ -420,7 +421,7 @@ public class RemoteQueryDUnitTest extends CacheTestCase {
           try {
             results = region.query(queryString);
           } catch (Exception e) {
-            fail("Failed executing " + queryString, e);
+            Assert.fail("Failed executing " + queryString, e);
           }
           assertEquals(numberOfEntries, results.size());
           assertTrue(!results.getCollectionType().allowsDuplicates() && results.getCollectionType().getElementType().isStructType());
@@ -429,7 +430,7 @@ public class RemoteQueryDUnitTest extends CacheTestCase {
           try {
             results = region.query(queryString);
           } catch (Exception e) {
-            fail("Failed executing " + queryString, e);
+            Assert.fail("Failed executing " + queryString, e);
           }
           assertEquals(numberOfEntries, results.size());
           assertTrue(!results.getCollectionType().allowsDuplicates() && results.getCollectionType().getElementType().isStructType());
@@ -438,7 +439,7 @@ public class RemoteQueryDUnitTest extends CacheTestCase {
           try {
             results = region.query(queryString);
           } catch (Exception e) {
-            fail("Failed executing " + queryString, e);
+            Assert.fail("Failed executing " + queryString, e);
           }
           assertEquals(0, results.size());
           assertTrue(!results.getCollectionType().allowsDuplicates() && results.getCollectionType().getElementType().isStructType());
@@ -447,7 +448,7 @@ public class RemoteQueryDUnitTest extends CacheTestCase {
           try {
             results = region.query(queryString);
           } catch (Exception e) {
-            fail("Failed executing " + queryString, e);
+            Assert.fail("Failed executing " + queryString, e);
           }
           assertEquals(numberOfEntries/2, results.size());
           assertTrue(!results.getCollectionType().allowsDuplicates() && results.getCollectionType().getElementType().isStructType());
@@ -456,7 +457,7 @@ public class RemoteQueryDUnitTest extends CacheTestCase {
           try {
             results = region.query(queryString);
           } catch (Exception e) {
-            fail("Failed executing " + queryString, e);
+            Assert.fail("Failed executing " + queryString, e);
           }
           assertEquals(1, results.size());
           assertTrue(!results.getCollectionType().allowsDuplicates() && results.getCollectionType().getElementType().isStructType());
@@ -465,7 +466,7 @@ public class RemoteQueryDUnitTest extends CacheTestCase {
           try {
             results = region.query(queryString);
           } catch (Exception e) {
-            fail("Failed executing " + queryString, e);
+            Assert.fail("Failed executing " + queryString, e);
           }
           assertEquals(1, results.size());
           assertTrue(!results.getCollectionType().allowsDuplicates() && results.getCollectionType().getElementType().isStructType());
@@ -504,7 +505,7 @@ public class RemoteQueryDUnitTest extends CacheTestCase {
           try {
             startBridgeServer(0, false);
           } catch (Exception ex) {
-            fail("While starting CacheServer", ex);
+            Assert.fail("While starting CacheServer", ex);
           }
         }
       });
@@ -657,7 +658,7 @@ public class RemoteQueryDUnitTest extends CacheTestCase {
           try {
             results = region.query(queryString);
           } catch (Exception e) {
-            fail("Failed executing " + queryString, e);
+            Assert.fail("Failed executing " + queryString, e);
           }
           getLogWriter().fine("size: " + results.size());
           //assertEquals(numberOfEntries, results.size());
@@ -698,7 +699,7 @@ public class RemoteQueryDUnitTest extends CacheTestCase {
           try {
             startBridgeServer(0, false);
           } catch (Exception ex) {
-            fail("While starting CacheServer", ex);
+            Assert.fail("While starting CacheServer", ex);
           }
         }
       });
@@ -743,7 +744,7 @@ public class RemoteQueryDUnitTest extends CacheTestCase {
           try {
             results = region.query(queryString);
           } catch (Exception e) {
-            fail("Failed executing " + queryString, e);
+            Assert.fail("Failed executing " + queryString, e);
           }
           assertEquals(1, results.size());
           assertTrue(!results.getCollectionType().allowsDuplicates());
@@ -754,7 +755,7 @@ public class RemoteQueryDUnitTest extends CacheTestCase {
           try {
             results = region.query(queryString);
           } catch (Exception e) {
-            fail("Failed executing " + queryString, e);
+            Assert.fail("Failed executing " + queryString, e);
           }
           assertEquals(1, results.size());
           assertTrue(!results.getCollectionType().allowsDuplicates());
@@ -765,7 +766,7 @@ public class RemoteQueryDUnitTest extends CacheTestCase {
           try {
             results = region.query(queryString);
           } catch (Exception e) {
-            fail("Failed executing " + queryString, e);
+            Assert.fail("Failed executing " + queryString, e);
         }
           assertEquals(numberOfEntries, results.size());
           // All order-by query results are stored in a ResultsCollectionWrapper
@@ -788,7 +789,7 @@ public class RemoteQueryDUnitTest extends CacheTestCase {
           try {
             results = region.query(queryString);
           } catch (Exception e) {
-            fail("Failed executing " + queryString, e);
+            Assert.fail("Failed executing " + queryString, e);
           }
           assertEquals(numberOfEntries, results.size());
           // All order-by query results are stored in a ResultsCollectionWrapper
@@ -811,7 +812,7 @@ public class RemoteQueryDUnitTest extends CacheTestCase {
           try {
             results = region.query(queryString);
           } catch (Exception e) {
-            fail("Failed executing " + queryString, e);
+            Assert.fail("Failed executing " + queryString, e);
           }
           assertEquals(1, results.size());
           Object result = results.iterator().next();
@@ -824,7 +825,7 @@ public class RemoteQueryDUnitTest extends CacheTestCase {
           try {
             results = region.query(queryString);
           } catch (Exception e) {
-            fail("Failed executing " + queryString, e);
+            Assert.fail("Failed executing " + queryString, e);
           }
           assertEquals(1, results.size());
           assertEquals("key-1", results.asList().get(0));
@@ -864,7 +865,7 @@ public class RemoteQueryDUnitTest extends CacheTestCase {
           try {
             startBridgeServer(0, false);
           } catch (Exception ex) {
-            fail("While starting CacheServer", ex);
+            Assert.fail("While starting CacheServer", ex);
           }
         }
       });
@@ -913,7 +914,7 @@ public class RemoteQueryDUnitTest extends CacheTestCase {
           try {
             results = region1.query(queryString);
           } catch (Exception e) {
-            fail("Failed executing " + queryString, e);
+            Assert.fail("Failed executing " + queryString, e);
           }
           assertEquals(numberOfEntries, results.size());
           assertTrue(!results.getCollectionType().allowsDuplicates() && results.getCollectionType().getElementType().isStructType());
@@ -923,7 +924,7 @@ public class RemoteQueryDUnitTest extends CacheTestCase {
           try {
             results = region1.query(queryString);
           } catch (Exception e) {
-            fail("Failed executing " + queryString, e);
+            Assert.fail("Failed executing " + queryString, e);
           }
           assertEquals(1, results.size());
           assertTrue(!results.getCollectionType().allowsDuplicates() && results.getCollectionType().getElementType().isStructType());
@@ -963,7 +964,7 @@ public class RemoteQueryDUnitTest extends CacheTestCase {
           try {
             startBridgeServer(0, false);
           } catch (Exception ex) {
-            fail("While starting CacheServer", ex);
+            Assert.fail("While starting CacheServer", ex);
           }
         }
       });
@@ -1022,7 +1023,7 @@ public class RemoteQueryDUnitTest extends CacheTestCase {
           try {
             results = region.query(queryString);
           } catch (Exception e) {
-            fail("Failed executing " + queryString, e);
+            Assert.fail("Failed executing " + queryString, e);
           }
           assertEquals(1, results.size());
           assertTrue(!results.getCollectionType().allowsDuplicates() && !results.getCollectionType().getElementType().isStructType());
@@ -1032,7 +1033,7 @@ public class RemoteQueryDUnitTest extends CacheTestCase {
           try {
             results = region.query(queryString);
           } catch (Exception e) {
-            fail("Failed executing " + queryString, e);
+            Assert.fail("Failed executing " + queryString, e);
           }
           assertEquals(1, results.size());
           assertTrue(!results.getCollectionType().allowsDuplicates() && !results.getCollectionType().getElementType().isStructType());
@@ -1051,7 +1052,7 @@ public class RemoteQueryDUnitTest extends CacheTestCase {
           try {
             results = region.query(queryString);
           } catch (Exception e) {
-            fail("Failed executing " + queryString, e);
+            Assert.fail("Failed executing " + queryString, e);
           }
           assertEquals(1, results.size());
           assertTrue(!results.getCollectionType().allowsDuplicates() && !results.getCollectionType().getElementType().isStructType());
@@ -1061,7 +1062,7 @@ public class RemoteQueryDUnitTest extends CacheTestCase {
           try {
             results = region.query(queryString);
           } catch (Exception e) {
-            fail("Failed executing " + queryString, e);
+            Assert.fail("Failed executing " + queryString, e);
           }
           assertEquals(1, results.size());
           assertTrue(!results.getCollectionType().allowsDuplicates() && !results.getCollectionType().getElementType().isStructType());
@@ -1122,7 +1123,7 @@ public class RemoteQueryDUnitTest extends CacheTestCase {
            try {
              startBridgeServer(0, false);
            } catch (Exception ex) {
-             fail("While starting CacheServer", ex);
+             Assert.fail("While starting CacheServer", ex);
            }
          }
        });
@@ -1167,7 +1168,7 @@ public class RemoteQueryDUnitTest extends CacheTestCase {
              try {
                results = region.query(queryStrings[i]);
              } catch (Exception e) {
-               fail("Failed executing " + queryStrings[i], e);
+               Assert.fail("Failed executing " + queryStrings[i], e);
              }
              assertEquals(9, results.size());
              String msg = "results expected to be instance of ResultsBag,"
@@ -1233,7 +1234,7 @@ public class RemoteQueryDUnitTest extends CacheTestCase {
             try {
               startBridgeServer(0, false);
             } catch (Exception ex) {
-              fail("While starting CacheServer", ex);
+              Assert.fail("While starting CacheServer", ex);
             }
           }
         });
@@ -1279,7 +1280,7 @@ public class RemoteQueryDUnitTest extends CacheTestCase {
               } catch (QueryInvocationTargetException qte) {
                 //Ok test passed
               } catch(Exception e) {
-                fail("Failed executing query " + queryStrings+ " due  to unexpected Excecption", e);
+                Assert.fail("Failed executing query " + queryStrings+ " due  to unexpected Excecption", e);
             }
           }
         });
@@ -1318,7 +1319,7 @@ public class RemoteQueryDUnitTest extends CacheTestCase {
               } catch (QueryInvocationTargetException qte) {
                 //Ok test passed
               } catch(Exception e) {
-                fail("Failed executing query " + queryString+ " due  to unexpected Excecption", e);
+                Assert.fail("Failed executing query " + queryString+ " due  to unexpected Excecption", e);
             }
           }
         });

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/0d759cb3/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/dunit/ResourceManagerWithQueryMonitorDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/dunit/ResourceManagerWithQueryMonitorDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/dunit/ResourceManagerWithQueryMonitorDUnitTest.java
index 372111c..f104e9b 100755
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/dunit/ResourceManagerWithQueryMonitorDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/dunit/ResourceManagerWithQueryMonitorDUnitTest.java
@@ -68,6 +68,7 @@ import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
 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.SerializableCallable;
 import com.gemstone.gemfire.test.dunit.VM;
 
@@ -85,8 +86,8 @@ public class ResourceManagerWithQueryMonitorDUnitTest extends ClientServerTestCa
   public void setUp() throws Exception {
     super.setUp();
     invokeInEveryVM(this.setHeapMemoryMonitorTestMode);
-    addExpectedException("above heap critical threshold");
-    addExpectedException("below heap critical threshold");
+    IgnoredException.addExpectedException("above heap critical threshold");
+    IgnoredException.addExpectedException("below heap critical threshold");
   }
   
   @Override

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/0d759cb3/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..e21e641 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,6 +40,7 @@ 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.SerializableCallable;
 import com.gemstone.gemfire.test.dunit.VM;
@@ -149,7 +150,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 +162,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 +216,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) {
@@ -323,7 +324,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 +339,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 +396,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 +404,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) {
@@ -519,7 +520,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 +533,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 +584,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) {
@@ -694,7 +695,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 +708,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 +759,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) {
@@ -850,7 +851,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 +869,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 +884,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 +927,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 +945,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 +960,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) {
@@ -1050,7 +1051,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 +1064,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 +1119,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 +1175,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) {
@@ -1271,7 +1272,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 +1285,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 +1342,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 +1398,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) {
@@ -1490,7 +1491,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 +1504,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/0d759cb3/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..bda442f 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
@@ -47,6 +47,7 @@ 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.VM;
 
 /**
@@ -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.addExpectedException("Unexpected IOException:");
+    IgnoredException.addExpectedException("java.net.SocketException");
 
     name = "PartionedPortfoliosPR";
     // Create Overflow Persistent Partition Region

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/0d759cb3/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..8015982 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,6 +41,7 @@ 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;
@@ -150,7 +151,7 @@ public class ConcurrentIndexUpdateWithInplaceObjectModFalseDUnitTest extends
     
     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());
       }
     }
     
@@ -194,7 +195,7 @@ public class ConcurrentIndexUpdateWithInplaceObjectModFalseDUnitTest extends
     }
     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());
       }
     }
     
@@ -253,7 +254,7 @@ public class ConcurrentIndexUpdateWithInplaceObjectModFalseDUnitTest extends
     
     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));
@@ -315,7 +316,7 @@ public class ConcurrentIndexUpdateWithInplaceObjectModFalseDUnitTest extends
     }
     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/0d759cb3/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..06d5b66 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,6 +42,7 @@ 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;
@@ -126,7 +127,7 @@ public class ConcurrentIndexUpdateWithoutWLDUnitTest extends
     
     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());
       }
     }
     
@@ -167,7 +168,7 @@ public class ConcurrentIndexUpdateWithoutWLDUnitTest extends
     
     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());
       }
     }
     
@@ -210,7 +211,7 @@ public class ConcurrentIndexUpdateWithoutWLDUnitTest extends
     }
     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());
       }
     }
     
@@ -269,7 +270,7 @@ public class ConcurrentIndexUpdateWithoutWLDUnitTest extends
     
     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));
@@ -330,7 +331,7 @@ public class ConcurrentIndexUpdateWithoutWLDUnitTest extends
     }
     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));
@@ -403,7 +404,7 @@ public class ConcurrentIndexUpdateWithoutWLDUnitTest extends
     
     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/0d759cb3/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..ee431c3 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,6 +42,7 @@ 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.Assert;
 import com.gemstone.gemfire.test.dunit.DistributedTestCase;
 import com.gemstone.gemfire.test.dunit.Host;
 import com.gemstone.gemfire.test.dunit.SerializableCallable;
@@ -401,7 +402,7 @@ 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

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/0d759cb3/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..fbd6218 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,6 +42,7 @@ 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;
@@ -121,11 +122,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 +196,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 +225,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.

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/0d759cb3/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..8d8d59d 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,6 +34,7 @@ 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;
@@ -196,12 +197,12 @@ public class InitializeIndexEntryDestroyQueryDUnitTest extends CacheTestCase {
     
     DistributedTestCase.join(asyInvk0, 1000 * 1000, getLogWriter());
     if (asyInvk0.exceptionOccurred()) {
-      fail("asyInvk0 failed", asyInvk0.getException());
+      Assert.fail("asyInvk0 failed", asyInvk0.getException());
     }
     
     DistributedTestCase.join(asyInvk1, 1000 * 1000, getLogWriter());
     if (asyInvk1.exceptionOccurred()) {
-      fail("asyInvk1 failed", asyInvk1.getException());
+      Assert.fail("asyInvk1 failed", asyInvk1.getException());
     }
   }
 
@@ -332,12 +333,12 @@ public class InitializeIndexEntryDestroyQueryDUnitTest extends CacheTestCase {
 
     DistributedTestCase.join(asyInvk0, 1000 * 1000, getLogWriter());
     if (asyInvk0.exceptionOccurred()) {
-      fail("asyInvk0 failed", asyInvk0.getException());
+      Assert.fail("asyInvk0 failed", asyInvk0.getException());
     }
     
     DistributedTestCase.join(asyInvk1, 1000 * 1000, getLogWriter());
     if (asyInvk1.exceptionOccurred()) {
-      fail("asyInvk1 failed", asyInvk1.getException());
+      Assert.fail("asyInvk1 failed", asyInvk1.getException());
     }
   }
 
@@ -419,7 +420,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/0d759cb3/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..5ca8d74 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,6 +39,7 @@ 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.Host;
 import com.gemstone.gemfire.test.dunit.VM;
 import com.gemstone.gemfire.test.junit.categories.DistributedTest;
@@ -93,13 +94,13 @@ 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);
           }
         }
       });
@@ -157,7 +158,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);
         }
       }
     });

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/0d759cb3/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/partitioned/PRBasicIndexCreationDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/partitioned/PRBasicIndexCreationDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/partitioned/PRBasicIndexCreationDUnitTest.java
index a72dec2..f71ada7 100755
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/partitioned/PRBasicIndexCreationDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/partitioned/PRBasicIndexCreationDUnitTest.java
@@ -25,6 +25,7 @@ import com.gemstone.gemfire.cache.query.data.Portfolio;
 import com.gemstone.gemfire.cache.query.data.PortfolioData;
 import com.gemstone.gemfire.cache30.CacheSerializableRunnable;
 import com.gemstone.gemfire.internal.cache.PartitionedRegionDUnitTestCase;
+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;
@@ -260,11 +261,11 @@ public class PRBasicIndexCreationDUnitTest extends
         .getCacheSerializableRunnableForPRCreateThrougXML(name, fileName));
     DistributedTestCase.join(asyInvk1, 30 * 1000, getLogWriter());
     if (asyInvk1.exceptionOccurred()) {
-      fail("asyInvk1 failed", asyInvk1.getException());
+      Assert.fail("asyInvk1 failed", asyInvk1.getException());
     }
     DistributedTestCase.join(asyInvk0, 30 * 1000, getLogWriter());
     if (asyInvk0.exceptionOccurred()) {
-      fail("asyInvk0 failed", asyInvk0.getException());
+      Assert.fail("asyInvk0 failed", asyInvk0.getException());
     }
     // printing all the indexes are created.
     vm0.invoke(PRQHelp.getCacheSerializableRunnableForIndexCreationCheck(name));

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/0d759cb3/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/partitioned/PRColocatedEquiJoinDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/partitioned/PRColocatedEquiJoinDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/partitioned/PRColocatedEquiJoinDUnitTest.java
index c812e72..57934d5 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/partitioned/PRColocatedEquiJoinDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/partitioned/PRColocatedEquiJoinDUnitTest.java
@@ -54,6 +54,7 @@ import com.gemstone.gemfire.internal.cache.PartitionedRegion;
 import com.gemstone.gemfire.internal.cache.PartitionedRegionDUnitTestCase;
 import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
 import com.gemstone.gemfire.test.dunit.Host;
+import com.gemstone.gemfire.test.dunit.IgnoredException;
 import com.gemstone.gemfire.test.dunit.VM;
 
 /**
@@ -174,7 +175,7 @@ public class PRColocatedEquiJoinDUnitTest extends PartitionedRegionDUnitTestCase
 
   public void testNonColocatedPRLocalQuerying() throws Exception
   {
-    addExpectedException("UnsupportedOperationException");
+    IgnoredException.addExpectedException("UnsupportedOperationException");
     Host host = Host.getHost(0);
     VM vm0 = host.getVM(0);
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/0d759cb3/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/partitioned/PRQueryCacheCloseDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/partitioned/PRQueryCacheCloseDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/partitioned/PRQueryCacheCloseDUnitTest.java
index dd12b21..3ac67ac 100755
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/partitioned/PRQueryCacheCloseDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/partitioned/PRQueryCacheCloseDUnitTest.java
@@ -34,6 +34,7 @@ import java.util.Random;
 import com.gemstone.gemfire.cache.query.data.PortfolioData;
 import com.gemstone.gemfire.internal.cache.ForceReattemptException;
 import com.gemstone.gemfire.internal.cache.PartitionedRegionDUnitTestCase;
+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;
@@ -193,7 +194,7 @@ public class PRQueryCacheCloseDUnitTest extends PartitionedRegionDUnitTestCase
       } while (t != null);
       
       if (!isForceReattempt) {
-        fail("Unexpected exception during query", async0.getException());
+        Assert.fail("Unexpected exception during query", async0.getException());
       }
     }
 
@@ -325,7 +326,7 @@ public class PRQueryCacheCloseDUnitTest extends PartitionedRegionDUnitTestCase
       } while (t != null);
       
       if (!isForceReattempt) {
-        fail("Unexpected exception during query", async0.getException());
+        Assert.fail("Unexpected exception during query", async0.getException());
       }
     }
 



Mime
View raw message