geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kl...@apache.org
Subject [11/27] incubator-geode git commit: GEODE 773 rough draft
Date Tue, 26 Jan 2016 00:49:21 GMT
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/e2f18f97/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/partitioned/PartitionResolverDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/partitioned/PartitionResolverDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/partitioned/PartitionResolverDUnitTest.java
index e35b014..8d451f0 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/partitioned/PartitionResolverDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/partitioned/PartitionResolverDUnitTest.java
@@ -78,8 +78,8 @@ public class PartitionResolverDUnitTest extends CacheTestCase {
     datastore2 = host.getVM(2);
   }
   @Override
-  public void tearDown2() throws Exception {
-    super.tearDown2();
+  public void tearDownBeforeDisconnect() throws Exception {
+    super.tearDownBeforeDisconnect();
     CountingResolver.resetResolverCount();
   }
   void createRegion(boolean isAccessor, int redundantCopies) {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/e2f18f97/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/partitioned/PartitionedRegionLoaderWriterDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/partitioned/PartitionedRegionLoaderWriterDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/partitioned/PartitionedRegionLoaderWriterDUnitTest.java
index 2678621..6355c58 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/partitioned/PartitionedRegionLoaderWriterDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/partitioned/PartitionedRegionLoaderWriterDUnitTest.java
@@ -32,6 +32,7 @@ import com.gemstone.gemfire.cache.RegionAttributes;
 import com.gemstone.gemfire.cache.util.CacheWriterAdapter;
 import com.gemstone.gemfire.cache30.CacheTestCase;
 import com.gemstone.gemfire.distributed.DistributedSystem;
+import com.gemstone.gemfire.test.dunit.Assert;
 import com.gemstone.gemfire.test.dunit.Host;
 import com.gemstone.gemfire.test.dunit.VM;
 
@@ -159,7 +160,7 @@ public class PartitionedRegionLoaderWriterDUnitTest extends CacheTestCase {
       cache.createRegion(PartitionedRegionName, attrs);
     }
     catch (Exception e) {
-      fail("Not Expected : " , e);
+      Assert.fail("Not Expected : " , e);
     }
   }
 
@@ -200,7 +201,7 @@ public class PartitionedRegionLoaderWriterDUnitTest extends CacheTestCase {
       assertNotNull(cache);
     }
     catch (Exception e) {
-      fail("Failed while creating the cache", e);
+      Assert.fail("Failed while creating the cache", e);
     }
   }
 
@@ -226,7 +227,7 @@ public class PartitionedRegionLoaderWriterDUnitTest extends CacheTestCase {
   }
 
   @Override
-  public void tearDown2() throws Exception {
-    super.tearDown2();
+  public void tearDownBeforeDisconnect() throws Exception {
+    super.tearDownBeforeDisconnect();
   }
 }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/e2f18f97/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/partitioned/PartitionedRegionMetaDataCleanupDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/partitioned/PartitionedRegionMetaDataCleanupDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/partitioned/PartitionedRegionMetaDataCleanupDUnitTest.java
index 825774d..99b4ba2 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/partitioned/PartitionedRegionMetaDataCleanupDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/partitioned/PartitionedRegionMetaDataCleanupDUnitTest.java
@@ -21,10 +21,13 @@ import com.gemstone.gemfire.cache.RegionFactory;
 import com.gemstone.gemfire.cache.RegionShortcut;
 import com.gemstone.gemfire.cache30.CacheTestCase;
 import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
+import com.gemstone.gemfire.test.dunit.Assert;
+import com.gemstone.gemfire.test.dunit.IgnoredException;
 import com.gemstone.gemfire.test.dunit.Host;
 import com.gemstone.gemfire.test.dunit.RMIException;
 import com.gemstone.gemfire.test.dunit.SerializableRunnable;
 import com.gemstone.gemfire.test.dunit.VM;
+import com.gemstone.gemfire.test.dunit.Wait;
 
 /**
  * @author dsmith
@@ -43,7 +46,7 @@ public class PartitionedRegionMetaDataCleanupDUnitTest extends CacheTestCase {
     createPR(vm0, "region1", 5);
     createPR(vm1, "region2", 10);
     //This should fail
-    ExpectedException ex = addExpectedException( "IllegalStateException", vm1);
+    IgnoredException ex = IgnoredException.addIgnoredException( "IllegalStateException", vm1);
     try {
       createPR(vm1, "region1", 10);
       fail("Should have received an exception");
@@ -63,7 +66,7 @@ public class PartitionedRegionMetaDataCleanupDUnitTest extends CacheTestCase {
     createPR(vm0, "region1", 5);
     createPR(vm1, "region2", 10);
     //This should fail
-    ExpectedException ex = addExpectedException( "IllegalStateException", vm1);
+    IgnoredException ex = IgnoredException.addIgnoredException( "IllegalStateException", vm1);
     try {
       createPR(vm1, "region1", 10);
       fail("Should have received an exception");
@@ -83,7 +86,7 @@ public class PartitionedRegionMetaDataCleanupDUnitTest extends CacheTestCase {
     createPR(vm0, "region1", 5);
     createPR(vm1, "region2", 10);
     //This should fail
-    ExpectedException ex = addExpectedException("IllegalStateException", vm1);
+    IgnoredException ex = IgnoredException.addIgnoredException("IllegalStateException", vm1);
     try {
       createPR(vm1, "region1", 10);
       fail("Should have received an exception");
@@ -93,7 +96,7 @@ public class PartitionedRegionMetaDataCleanupDUnitTest extends CacheTestCase {
       ex.remove();
     }
     
-    ex = addExpectedException("DistributedSystemDisconnectedException", vm0);
+    ex = IgnoredException.addIgnoredException("DistributedSystemDisconnectedException", vm0);
     try {
       fakeCrash(vm0);
     } finally {
@@ -161,7 +164,7 @@ public class PartitionedRegionMetaDataCleanupDUnitTest extends CacheTestCase {
           .setEntryTimeToLive(new ExpirationAttributes(expirationTime));
 
         //We may log an exception if the create fails. Ignore thse.
-          ExpectedException ex = addExpectedException("IllegalStateException");
+          IgnoredException ex = IgnoredException.addIgnoredException("IllegalStateException");
           try {
             int i= 0;
             //Loop until a successful create
@@ -174,11 +177,11 @@ public class PartitionedRegionMetaDataCleanupDUnitTest extends CacheTestCase {
               } catch(IllegalStateException expected) {
                 //give up if we can't create the region in 20 tries
                 if(i == 20) {
-                  fail("Metadata was never cleaned up in 20 tries", expected);
+                  Assert.fail("Metadata was never cleaned up in 20 tries", expected);
                 }
                 
                 //wait a bit before the next attempt.
-                pause(500);
+                Wait.pause(500);
               }
             }
           } finally {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/e2f18f97/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/partitioned/PersistPRKRFDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/partitioned/PersistPRKRFDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/partitioned/PersistPRKRFDUnitTest.java
index c0a0149..d3bd01e 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/partitioned/PersistPRKRFDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/partitioned/PersistPRKRFDUnitTest.java
@@ -28,9 +28,11 @@ import com.gemstone.gemfire.cache30.CacheSerializableRunnable;
 import com.gemstone.gemfire.internal.cache.DiskStoreImpl;
 import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
 import com.gemstone.gemfire.test.dunit.AsyncInvocation;
-import com.gemstone.gemfire.test.dunit.DistributedTestCase;
+import com.gemstone.gemfire.test.dunit.IgnoredException;
 import com.gemstone.gemfire.test.dunit.Host;
+import com.gemstone.gemfire.test.dunit.Threads;
 import com.gemstone.gemfire.test.dunit.VM;
+import com.gemstone.gemfire.test.dunit.Wait;
 
 /**
  * Tests the basic use cases for PR persistence.
@@ -73,7 +75,7 @@ public class PersistPRKRFDUnitTest extends PersistentPartitionedRegionTestBase {
     AsyncInvocation async1 = vm0.invokeAsync(new CacheSerializableRunnable(title+"async create") {
       public void run2() throws CacheException {
         Region region = getRootRegion(PR_REGION_NAME);
-        ExpectedException expect = addExpectedException("CacheClosedException");
+        IgnoredException expect = IgnoredException.addIgnoredException("CacheClosedException");
         try {
           region.put(10, "b");
           fail("Expect CacheClosedException here");
@@ -92,14 +94,14 @@ public class PersistPRKRFDUnitTest extends PersistentPartitionedRegionTestBase {
     vm0.invoke(new CacheSerializableRunnable(title+"close disk store") {
       public void run2() throws CacheException {
         GemFireCacheImpl gfc = (GemFireCacheImpl)getCache();
-        pause(500);
+        Wait.pause(500);
         gfc.closeDiskStores();
         synchronized(lockObject) {
           lockObject.notify();
         }
       }
     });
-    DistributedTestCase.join(async1, MAX_WAIT, getLogWriter());
+    Threads.join(async1, MAX_WAIT);
     closeCache(vm0);
     
     // update
@@ -116,7 +118,7 @@ public class PersistPRKRFDUnitTest extends PersistentPartitionedRegionTestBase {
     async1 = vm0.invokeAsync(new CacheSerializableRunnable(title+"async update") {
       public void run2() throws CacheException {
         Region region = getRootRegion(PR_REGION_NAME);
-        ExpectedException expect = addExpectedException("CacheClosedException");
+        IgnoredException expect = IgnoredException.addIgnoredException("CacheClosedException");
         try {
           region.put(1, "b");
           fail("Expect CacheClosedException here");
@@ -135,14 +137,14 @@ public class PersistPRKRFDUnitTest extends PersistentPartitionedRegionTestBase {
     vm0.invoke(new CacheSerializableRunnable(title+"close disk store") {
       public void run2() throws CacheException {
         GemFireCacheImpl gfc = (GemFireCacheImpl)getCache();
-        pause(500);
+        Wait.pause(500);
         gfc.closeDiskStores();
         synchronized(lockObject) {
           lockObject.notify();
         }
       }
     });
-    DistributedTestCase.join(async1, MAX_WAIT, getLogWriter());
+    Threads.join(async1, MAX_WAIT);
     closeCache(vm0);
 
     // destroy
@@ -159,7 +161,7 @@ public class PersistPRKRFDUnitTest extends PersistentPartitionedRegionTestBase {
     async1 = vm0.invokeAsync(new CacheSerializableRunnable(title+"async destroy") {
       public void run2() throws CacheException {
         Region region = getRootRegion(PR_REGION_NAME);
-        ExpectedException expect = addExpectedException("CacheClosedException");
+        IgnoredException expect = IgnoredException.addIgnoredException("CacheClosedException");
         try {
           region.destroy(2, "b");
           fail("Expect CacheClosedException here");
@@ -178,14 +180,14 @@ public class PersistPRKRFDUnitTest extends PersistentPartitionedRegionTestBase {
     vm0.invoke(new CacheSerializableRunnable(title+"close disk store") {
       public void run2() throws CacheException {
         GemFireCacheImpl gfc = (GemFireCacheImpl)getCache();
-        pause(500);
+        Wait.pause(500);
         gfc.closeDiskStores();
         synchronized(lockObject) {
           lockObject.notify();
         }
       }
     });
-    DistributedTestCase.join(async1, MAX_WAIT, getLogWriter());
+    Threads.join(async1, MAX_WAIT);
     
     checkData(vm0, 0, 10, "a");
     checkData(vm0, 10, 11, null);

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/e2f18f97/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/partitioned/PersistentColocatedPartitionedRegionDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/partitioned/PersistentColocatedPartitionedRegionDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/partitioned/PersistentColocatedPartitionedRegionDUnitTest.java
index dc89894..23ffc83 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/partitioned/PersistentColocatedPartitionedRegionDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/partitioned/PersistentColocatedPartitionedRegionDUnitTest.java
@@ -43,11 +43,15 @@ import com.gemstone.gemfire.internal.cache.InitialImageOperation.RequestImageMes
 import com.gemstone.gemfire.internal.cache.PartitionedRegion;
 import com.gemstone.gemfire.internal.cache.control.InternalResourceManager;
 import com.gemstone.gemfire.internal.cache.control.InternalResourceManager.ResourceObserver;
+import com.gemstone.gemfire.test.dunit.Assert;
 import com.gemstone.gemfire.test.dunit.AsyncInvocation;
+import com.gemstone.gemfire.test.dunit.IgnoredException;
 import com.gemstone.gemfire.test.dunit.Host;
 import com.gemstone.gemfire.test.dunit.SerializableCallable;
 import com.gemstone.gemfire.test.dunit.SerializableRunnable;
 import com.gemstone.gemfire.test.dunit.VM;
+import com.gemstone.gemfire.test.dunit.Wait;
+import com.gemstone.gemfire.test.dunit.WaitCriterion;
 
 /**
  * @author dsmith
@@ -67,9 +71,9 @@ public class PersistentColocatedPartitionedRegionDUnitTest extends
   }
   
   @Override
-  public void tearDown2() throws Exception {
+  public void tearDownBeforeDisconnect() throws Exception {
     FileUtil.delete(getBackupDir());
-    super.tearDown2();
+    super.tearDownBeforeDisconnect();
   }
   
   public void testColocatedPRAttributes() {
@@ -107,7 +111,7 @@ public class PersistentColocatedPartitionedRegionDUnitTest extends
         af.setPartitionAttributes(paf.create());
         
         //Try to colocate a persistent PR with the non persistent PR. This should fail.
-        ExpectedException exp = addExpectedException("IllegalStateException");
+        IgnoredException exp = IgnoredException.addIgnoredException("IllegalStateException");
         try {
           cache.createRegion("colocated", af.create());
           fail("should not have been able to create a persistent region colocated with a non persistent region");
@@ -290,7 +294,7 @@ public class PersistentColocatedPartitionedRegionDUnitTest extends
     vm1.invoke(createChildPR);
     vm2.invoke(createChildPR);
     
-    pause(4000);
+    Wait.pause(4000);
     
     assertEquals(vm0Buckets, getBucketList(vm0, PR_REGION_NAME));
     assertEquals(vm0Buckets, getBucketList(vm0, "region2"));
@@ -351,7 +355,7 @@ public class PersistentColocatedPartitionedRegionDUnitTest extends
         try {
           recoveryDone.await(MAX_WAIT, TimeUnit.MILLISECONDS);
         } catch (InterruptedException e) {
-          fail("interrupted", e);
+          Assert.fail("interrupted", e);
         } 
       }
     };
@@ -498,7 +502,7 @@ public class PersistentColocatedPartitionedRegionDUnitTest extends
             fail("timed out");
           }
         } catch (InterruptedException e) {
-          fail("interrupted", e);
+          Assert.fail("interrupted", e);
         }
       }
     };
@@ -556,7 +560,7 @@ public class PersistentColocatedPartitionedRegionDUnitTest extends
             fail("timed out");
           }
         } catch (InterruptedException e) {
-          fail("interrupted", e);
+          Assert.fail("interrupted", e);
         }
       }
     };
@@ -602,7 +606,7 @@ public class PersistentColocatedPartitionedRegionDUnitTest extends
     
     createData(vm0, 0, NUM_BUCKETS, "b");
     createData(vm0, 0, NUM_BUCKETS, "b", "region2");
-    ExpectedException expected = addExpectedException("PartitionOfflineException");
+    IgnoredException expected = IgnoredException.addIgnoredException("PartitionOfflineException");
     try {
     
     //Close the remaining members.
@@ -630,7 +634,7 @@ public class PersistentColocatedPartitionedRegionDUnitTest extends
     //by starting it last.
     AsyncInvocation async0 = vm0.invokeAsync(createPRs);
     AsyncInvocation async1 = vm1.invokeAsync(createPRs);
-    pause(2000);
+    Wait.pause(2000);
     AsyncInvocation async2 = vm2.invokeAsync(createPRs);
     async0.getResult(MAX_WAIT);
     async1.getResult(MAX_WAIT);
@@ -714,7 +718,7 @@ public class PersistentColocatedPartitionedRegionDUnitTest extends
             fail("timed out");
           }
         } catch (InterruptedException e) {
-          fail("interrupted", e);
+          Assert.fail("interrupted", e);
         }
       }
     };
@@ -779,7 +783,7 @@ public class PersistentColocatedPartitionedRegionDUnitTest extends
             fail("timed out");
           }
         } catch (InterruptedException e) {
-          fail("interrupted", e);
+          Assert.fail("interrupted", e);
         }
       }
     };
@@ -804,8 +808,8 @@ public class PersistentColocatedPartitionedRegionDUnitTest extends
    * @throws Throwable 
    */
   public void replaceOfflineMemberAndRestartCreateColocatedPRLate(SerializableRunnable createParentPR, SerializableRunnable createChildPR) throws Throwable {
-    addExpectedException("PartitionOfflineException");
-    addExpectedException("RegionDestroyedException");
+    IgnoredException.addIgnoredException("PartitionOfflineException");
+    IgnoredException.addIgnoredException("RegionDestroyedException");
     Host host = Host.getHost(0);
     VM vm0 = host.getVM(0);
     VM vm1 = host.getVM(1);
@@ -860,14 +864,14 @@ public class PersistentColocatedPartitionedRegionDUnitTest extends
     //by starting it last.
     AsyncInvocation async2 = vm2.invokeAsync(createParentPR);
     AsyncInvocation async1 = vm1.invokeAsync(createParentPR);
-    pause(2000);
+    Wait.pause(2000);
     AsyncInvocation async0 = vm0.invokeAsync(createParentPR);
     async0.getResult(MAX_WAIT);
     async1.getResult(MAX_WAIT);
     async2.getResult(MAX_WAIT);
     
     //Wait for async tasks
-    pause(2000);
+    Wait.pause(2000);
     
     //Recreate the child region. 
     async2 = vm2.invokeAsync(createChildPR);
@@ -975,7 +979,7 @@ public class PersistentColocatedPartitionedRegionDUnitTest extends
       }
     });
     
-    ExpectedException ex = addExpectedException("PartitionOfflineException", vm1);
+    IgnoredException ex = IgnoredException.addIgnoredException("PartitionOfflineException", vm1);
     try {
       
     //Do a rebalance to create buckets in vm1. THis will cause vm0 to disconnect
@@ -995,7 +999,7 @@ public class PersistentColocatedPartitionedRegionDUnitTest extends
     vm0.invoke(new SerializableCallable() {
       
       public Object call() throws Exception {
-        waitForCriterion(new WaitCriterion() {
+        Wait.waitForCriterion(new WaitCriterion() {
           public boolean done() {
             InternalDistributedSystem ds = system;
             return ds == null || !ds.isConnected();
@@ -1292,7 +1296,7 @@ public class PersistentColocatedPartitionedRegionDUnitTest extends
         try {
           observer.waitForCreate();
         } catch (InterruptedException e) {
-          fail("interrupted", e);
+          Assert.fail("interrupted", e);
         }
       }
     };
@@ -1415,7 +1419,7 @@ public class PersistentColocatedPartitionedRegionDUnitTest extends
     closeCache();
     
     //Restart colocated with "region2"
-    ExpectedException ex = addExpectedException("DiskAccessException|IllegalStateException");
+    IgnoredException ex = IgnoredException.addIgnoredException("DiskAccessException|IllegalStateException");
     try {
       createColocatedPRs("region2");
       fail("Should have received an illegal state exception");
@@ -1437,7 +1441,7 @@ public class PersistentColocatedPartitionedRegionDUnitTest extends
     
     //Restart uncolocated. We don't allow changing
     //from uncolocated to colocated.
-    ex = addExpectedException("DiskAccessException|IllegalStateException");
+    ex = IgnoredException.addIgnoredException("DiskAccessException|IllegalStateException");
     try {
       createColocatedPRs(null);
       fail("Should have received an illegal state exception");

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/e2f18f97/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/partitioned/PersistentPartitionedRegionDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/partitioned/PersistentPartitionedRegionDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/partitioned/PersistentPartitionedRegionDUnitTest.java
index 794d418..73bab17 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/partitioned/PersistentPartitionedRegionDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/partitioned/PersistentPartitionedRegionDUnitTest.java
@@ -74,13 +74,18 @@ import com.gemstone.gemfire.internal.cache.InitialImageOperation.RequestImageMes
 import com.gemstone.gemfire.internal.cache.control.InternalResourceManager;
 import com.gemstone.gemfire.internal.cache.partitioned.ManageBucketMessage.ManageBucketReplyMessage;
 import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
+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.IgnoredException;
+import com.gemstone.gemfire.test.dunit.NetworkSupport;
 import com.gemstone.gemfire.test.dunit.Host;
 import com.gemstone.gemfire.test.dunit.RMIException;
 import com.gemstone.gemfire.test.dunit.SerializableCallable;
 import com.gemstone.gemfire.test.dunit.SerializableRunnable;
 import com.gemstone.gemfire.test.dunit.VM;
+import com.gemstone.gemfire.test.dunit.Wait;
+import com.gemstone.gemfire.test.dunit.WaitCriterion;
 
 /**
  * Tests the basic use cases for PR persistence.
@@ -143,8 +148,8 @@ public class PersistentPartitionedRegionDUnitTest extends PersistentPartitionedR
     createPR(vm0, 0, 0, 5);
     createData(vm0, 0, 5, "a");
     closeCache(vm0);
-    ExpectedException expect = addExpectedException("IllegalStateException", vm0);
-    expect = addExpectedException("DiskAccessException", vm0);
+    IgnoredException expect = IgnoredException.addIgnoredException("IllegalStateException", vm0);
+    expect = IgnoredException.addIgnoredException("DiskAccessException", vm0);
     try {
       createPR(vm0, 0, 0, 2);
       fail("Expect to get java.lang.IllegalStateException, but it did not");
@@ -254,8 +259,8 @@ public class PersistentPartitionedRegionDUnitTest extends PersistentPartitionedR
       }
     });
 
-    ExpectedException expected1 = addExpectedException("Fatal error from asynch");
-    ExpectedException expected2 = addExpectedException("ToDataException");
+    IgnoredException expected1 = IgnoredException.addIgnoredException("Fatal error from asynch");
+    IgnoredException expected2 = IgnoredException.addIgnoredException("ToDataException");
     try {
       int redundancy=1;
       createPR(vm0, redundancy, -1, 113, false);
@@ -422,7 +427,7 @@ public class PersistentPartitionedRegionDUnitTest extends PersistentPartitionedR
     createData(vm0, numBuckets, 113, "b");
     checkData(vm0, numBuckets, 113, "b");
     
-    ExpectedException ex = addExpectedException(RevokedPersistentDataException.class.getName(), vm1);
+    IgnoredException ex = IgnoredException.addIgnoredException(RevokedPersistentDataException.class.getName(), vm1);
     try {
       createPR(vm1, 1);
       fail("Should have recieved a SplitDistributedSystemException");
@@ -437,7 +442,7 @@ public class PersistentPartitionedRegionDUnitTest extends PersistentPartitionedR
   }
   
   public void testRevokeBeforeStartup() throws Throwable {
-    addExpectedException("RevokeFailedException");
+    IgnoredException.addIgnoredException("RevokeFailedException");
     Host host = Host.getHost(0);
     VM vm0 = host.getVM(0);
     VM vm1 = host.getVM(1);
@@ -491,7 +496,7 @@ public class PersistentPartitionedRegionDUnitTest extends PersistentPartitionedR
     createData(vm0, numBuckets, 113, "b");
     checkData(vm0, numBuckets, 113, "b");
     
-    ExpectedException ex = addExpectedException(RevokedPersistentDataException.class.getName(), vm1);
+    IgnoredException ex = IgnoredException.addIgnoredException(RevokedPersistentDataException.class.getName(), vm1);
     try {
       createPR(vm1, 1);
       fail("Should have recieved a SplitDistributedSystemException");
@@ -537,7 +542,7 @@ public class PersistentPartitionedRegionDUnitTest extends PersistentPartitionedR
     final int aVM1Bucket = vm1Buckets.iterator().next();
     closeCache(vm1);
 
-    ExpectedException ex = addExpectedException("PartitionOfflineException");
+    IgnoredException ex = IgnoredException.addIgnoredException("PartitionOfflineException");
     try { 
       checkReadWriteOperationsWithOfflineMember(vm0, aVM0Bucket, aVM1Bucket);
       //Make sure that a newly created member is informed about the offline member
@@ -574,7 +579,7 @@ public class PersistentPartitionedRegionDUnitTest extends PersistentPartitionedR
       }
     }
 
-    ExpectedException expect = addExpectedException("PartitionOfflineException", vm0);
+    IgnoredException expect = IgnoredException.addIgnoredException("PartitionOfflineException", vm0);
     //Try a function execution
     vm0.invoke(new SerializableRunnable("Test ways to read") {
       public void run() {
@@ -803,7 +808,7 @@ public class PersistentPartitionedRegionDUnitTest extends PersistentPartitionedR
       //This should work, because this bucket is still available.
       checkData(vm0, aVM0Bucket, aVM0Bucket + 1, "a");
       
-      ExpectedException expect = addExpectedException("PartitionOfflineException", vm0);
+      IgnoredException expect = IgnoredException.addIgnoredException("PartitionOfflineException", vm0);
       try {
         checkData(vm0, aVM1Bucket, aVM1Bucket + 1, "a");
         fail("Should not have been able to read from missing buckets!");
@@ -836,7 +841,7 @@ public class PersistentPartitionedRegionDUnitTest extends PersistentPartitionedR
       createData(vm2, aVM1Bucket, aVM1Bucket + 1, "a");
       checkData(vm2, aVM1Bucket, aVM1Bucket + 1, "a");
       
-      ExpectedException ex = addExpectedException(RevokedPersistentDataException.class.getName(), vm1);
+      IgnoredException ex = IgnoredException.addIgnoredException(RevokedPersistentDataException.class.getName(), vm1);
       try {
         createPR(vm1, 0);
         fail("Should have recieved a RevokedPersistentDataException");
@@ -884,7 +889,7 @@ public class PersistentPartitionedRegionDUnitTest extends PersistentPartitionedR
       Set<Integer> vm2Buckets = getBucketList(vm2);
       assertEquals(vm1Buckets, vm2Buckets);
       
-      ExpectedException ex = addExpectedException(RevokedPersistentDataException.class.getName(), vm1);
+      IgnoredException ex = IgnoredException.addIgnoredException(RevokedPersistentDataException.class.getName(), vm1);
       try {
         createPR(vm1, 1);
         fail("Should have recieved a SplitDistributedSystemException");
@@ -952,7 +957,7 @@ public class PersistentPartitionedRegionDUnitTest extends PersistentPartitionedR
       
       //VM2 should pick up the slack
       
-      waitForCriterion(new WaitCriterion() {
+      Wait.waitForCriterion(new WaitCriterion() {
         
         public boolean done() {
           Set<Integer> vm2Buckets = getBucketList(vm2);
@@ -1336,11 +1341,11 @@ public class PersistentPartitionedRegionDUnitTest extends PersistentPartitionedR
   
   public void testRegisterInterestNoDataStores() {
     //Closing the client may log a warning on the server
-    addExpectedException("Connection reset");
-    addExpectedException("SocketTimeoutException");
-    addExpectedException("ServerConnectivityException");
-    addExpectedException("Socket Closed");
-    addExpectedException("Unexpected IOException");
+    IgnoredException.addIgnoredException("Connection reset");
+    IgnoredException.addIgnoredException("SocketTimeoutException");
+    IgnoredException.addIgnoredException("ServerConnectivityException");
+    IgnoredException.addIgnoredException("Socket Closed");
+    IgnoredException.addIgnoredException("Unexpected IOException");
     final Host host = Host.getHost(0);
     VM vm0 = host.getVM(0);
     VM vm1 = host.getVM(1);
@@ -1381,7 +1386,7 @@ public class PersistentPartitionedRegionDUnitTest extends PersistentPartitionedR
           Cache cache = getCache();
 
           PoolFactory pf = PoolManager.createFactory();
-          pf.addServer(getServerHostName(host), serverPort);
+          pf.addServer(NetworkSupport.getServerHostName(host), serverPort);
           pf.setSubscriptionEnabled(true);
           pf.create("pool");
           AttributesFactory af = new AttributesFactory();
@@ -1663,7 +1668,7 @@ public class PersistentPartitionedRegionDUnitTest extends PersistentPartitionedR
     
     //This should recover redundancy, which should cause vm0 to disconnect
     
-    ExpectedException ex = addExpectedException("PartitionOfflineException");
+    IgnoredException ex = IgnoredException.addIgnoredException("PartitionOfflineException");
     try { 
     getLogWriter().info("Creating region in VM1");
     createPR(vm1, 1, 0, 1);
@@ -1746,7 +1751,7 @@ public class PersistentPartitionedRegionDUnitTest extends PersistentPartitionedR
         try {
           recoveryObserver.recoveryDone.await();
         } catch (InterruptedException e) {
-          fail("Interrupted", e);
+          Assert.fail("Interrupted", e);
         }
         InternalResourceManager.setResourceObserver(null);
       }
@@ -1821,7 +1826,7 @@ public class PersistentPartitionedRegionDUnitTest extends PersistentPartitionedR
    * to make sure that later we can recover redundancy.
    */
   public void testCrashDuringBucketGII() {
-    addExpectedException("PartitionOfflineException");
+    IgnoredException.addIgnoredException("PartitionOfflineException");
     Host host = Host.getHost(0);
     VM vm0 = host.getVM(0);
     VM vm1 = host.getVM(1);
@@ -1875,7 +1880,7 @@ public class PersistentPartitionedRegionDUnitTest extends PersistentPartitionedR
    * @throws InterruptedException 
    */
   public void testCrashDuringBucketGII2() throws InterruptedException {
-    addExpectedException("PartitionOfflineException");
+    IgnoredException.addIgnoredException("PartitionOfflineException");
     Host host = Host.getHost(0);
     VM vm0 = host.getVM(0);
     final VM vm1 = host.getVM(1);
@@ -1933,7 +1938,7 @@ public class PersistentPartitionedRegionDUnitTest extends PersistentPartitionedR
         return null;
       }
     };
-    DistributedTestCase.waitForCriterion(ev, 30 * 1000, 200, true);
+    Wait.waitForCriterion(ev, 30 * 1000, 200, true);
     assertEquals(Collections.singleton(0), getBucketList(vm1));
   }
   
@@ -1956,7 +1961,7 @@ public class PersistentPartitionedRegionDUnitTest extends PersistentPartitionedR
     createData(vm1, 1, 2, "a");
     
     //this should throw a conflicting data exception.
-    ExpectedException expect = addExpectedException("ConflictingPersistentDataException", vm0);
+    IgnoredException expect = IgnoredException.addIgnoredException("ConflictingPersistentDataException", vm0);
     try {
       createPR(vm0, 0);
       fail("should have seen a conflicting data exception");
@@ -1974,7 +1979,7 @@ public class PersistentPartitionedRegionDUnitTest extends PersistentPartitionedR
     //view from vm0 because vm0 was in conflict!
     //In fact, this is a bit of a problem, because now vm1 is dependent
     //on vm vm0.
-    expect = addExpectedException("PartitionOfflineException", vm1);
+    expect = IgnoredException.addIgnoredException("PartitionOfflineException", vm1);
     try {
       createData(vm1, 0, 1, "a");
       fail("Should have seen a PartitionOfflineException for bucket 0");

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/e2f18f97/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/partitioned/PersistentPartitionedRegionTestBase.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/partitioned/PersistentPartitionedRegionTestBase.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/partitioned/PersistentPartitionedRegionTestBase.java
index 267136a..a525328 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/partitioned/PersistentPartitionedRegionTestBase.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/partitioned/PersistentPartitionedRegionTestBase.java
@@ -56,10 +56,14 @@ import com.gemstone.gemfire.internal.cache.control.InternalResourceManager;
 import com.gemstone.gemfire.internal.cache.control.InternalResourceManager.ResourceObserver;
 import com.gemstone.gemfire.internal.cache.persistence.PersistenceAdvisor;
 import com.gemstone.gemfire.internal.cache.persistence.PersistentMemberID;
+import com.gemstone.gemfire.test.dunit.Assert;
 import com.gemstone.gemfire.test.dunit.AsyncInvocation;
+import com.gemstone.gemfire.test.dunit.Invoke;
 import com.gemstone.gemfire.test.dunit.SerializableCallable;
 import com.gemstone.gemfire.test.dunit.SerializableRunnable;
 import com.gemstone.gemfire.test.dunit.VM;
+import com.gemstone.gemfire.test.dunit.Wait;
+import com.gemstone.gemfire.test.dunit.WaitCriterion;
 
 /**
  * @author dsmith
@@ -84,7 +88,7 @@ public abstract class PersistentPartitionedRegionTestBase extends CacheTestCase
   public void setUp() throws Exception {
     super.setUp();
     disconnectAllFromDS();
-    invokeInEveryVM(PersistentPartitionedRegionTestBase.class,"setRegionName", new Object[]{getUniqueName()});
+    Invoke.invokeInEveryVM(PersistentPartitionedRegionTestBase.class,"setRegionName", new Object[]{getUniqueName()});
     setRegionName(getUniqueName());
   }
   
@@ -154,7 +158,7 @@ public abstract class PersistentPartitionedRegionTestBase extends CacheTestCase
         try {
           rf.start().getResults();
         } catch (Exception e) {
-          fail("interupted", e);
+          Assert.fail("interupted", e);
         }
       }
     });
@@ -367,7 +371,7 @@ public abstract class PersistentPartitionedRegionTestBase extends CacheTestCase
         try {
           recoveryDone.await(MAX_WAIT, TimeUnit.MILLISECONDS);
         } catch (InterruptedException e) {
-          fail("interrupted", e);
+          Assert.fail("interrupted", e);
         }
       }
     };
@@ -410,7 +414,7 @@ public abstract class PersistentPartitionedRegionTestBase extends CacheTestCase
           try {
             recoveryDone.await();
           } catch (InterruptedException e) {
-            fail("Interrupted", e);
+            Assert.fail("Interrupted", e);
           }
         }
       }
@@ -474,7 +478,7 @@ public abstract class PersistentPartitionedRegionTestBase extends CacheTestCase
       public Object call() throws Exception {
         Cache cache = getCache();
         final PartitionedRegion region = (PartitionedRegion) cache.getRegion(regionName);
-        waitForCriterion(new WaitCriterion() {
+        Wait.waitForCriterion(new WaitCriterion() {
           
           public boolean done() {
             return expectedBuckets.equals(getActualBuckets());
@@ -553,7 +557,7 @@ public abstract class PersistentPartitionedRegionTestBase extends CacheTestCase
                 }
               }
             };
-            waitForCriterion(wc, MAX_WAIT, 500, true);
+            Wait.waitForCriterion(wc, MAX_WAIT, 500, true);
           } finally {
             adminDS.disconnect();
           }
@@ -685,7 +689,7 @@ public abstract class PersistentPartitionedRegionTestBase extends CacheTestCase
         Cache cache = getCache();
         PartitionedRegion region = (PartitionedRegion) cache.getRegion(regionName);
         final PartitionedRegionDataStore dataStore = region.getDataStore();
-        waitForCriterion(new WaitCriterion() {
+        Wait.waitForCriterion(new WaitCriterion() {
     
           public boolean done() {
             Set<Integer> vm2Buckets = dataStore.getAllLocalBucketIds();
@@ -707,7 +711,7 @@ public abstract class PersistentPartitionedRegionTestBase extends CacheTestCase
       public void run() {
         Cache cache = getCache();
         final Region region = cache.getRegion(regionName);
-        waitForCriterion(new WaitCriterion() {
+        Wait.waitForCriterion(new WaitCriterion() {
           
           public boolean done() {
             PartitionRegionInfo info = PartitionRegionHelper.getPartitionRegionInfo(region);

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/e2f18f97/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/partitioned/PersistentPartitionedRegionWithTransactionDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/partitioned/PersistentPartitionedRegionWithTransactionDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/partitioned/PersistentPartitionedRegionWithTransactionDUnitTest.java
index 845a14c..7062999 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/partitioned/PersistentPartitionedRegionWithTransactionDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/partitioned/PersistentPartitionedRegionWithTransactionDUnitTest.java
@@ -23,6 +23,7 @@ import com.gemstone.gemfire.internal.cache.DiskStoreImpl;
 import com.gemstone.gemfire.internal.cache.TXManagerImpl;
 import com.gemstone.gemfire.test.dunit.AsyncInvocation;
 import com.gemstone.gemfire.test.dunit.Host;
+import com.gemstone.gemfire.test.dunit.Invoke;
 import com.gemstone.gemfire.test.dunit.SerializableRunnable;
 import com.gemstone.gemfire.test.dunit.VM;
 
@@ -40,9 +41,9 @@ public class PersistentPartitionedRegionWithTransactionDUnitTest extends Persist
   }
   
   @Override
-  public void tearDown2() throws Exception {
-    super.tearDown2();
-    invokeInEveryVM(new SerializableRunnable() {
+  public void tearDownBeforeDisconnect() throws Exception {
+    super.tearDownBeforeDisconnect();
+    Invoke.invokeInEveryVM(new SerializableRunnable() {
       
       public void run() {
         TXManagerImpl.ALLOW_PERSISTENT_TRANSACTIONS = false;
@@ -57,7 +58,7 @@ public class PersistentPartitionedRegionWithTransactionDUnitTest extends Persist
   @Override
   public void setUp() throws Exception {
     super.setUp();
-    invokeInEveryVM(new SerializableRunnable() {
+    Invoke.invokeInEveryVM(new SerializableRunnable() {
       
       public void run() {
         TXManagerImpl.ALLOW_PERSISTENT_TRANSACTIONS = true;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/e2f18f97/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/partitioned/ShutdownAllDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/partitioned/ShutdownAllDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/partitioned/ShutdownAllDUnitTest.java
index 97ff82d..18e0e26 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/partitioned/ShutdownAllDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/partitioned/ShutdownAllDUnitTest.java
@@ -55,13 +55,16 @@ import com.gemstone.gemfire.internal.cache.PartitionedRegion;
 import com.gemstone.gemfire.internal.cache.PutAllPartialResultException;
 import com.gemstone.gemfire.internal.cache.control.InternalResourceManager;
 import com.gemstone.gemfire.internal.cache.control.InternalResourceManager.ResourceObserver;
+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.RMIException;
 import com.gemstone.gemfire.test.dunit.SerializableCallable;
 import com.gemstone.gemfire.test.dunit.SerializableRunnable;
 import com.gemstone.gemfire.test.dunit.VM;
+import com.gemstone.gemfire.test.dunit.Wait;
 
 /**
  * Tests the basic use cases for PR persistence.
@@ -146,7 +149,7 @@ public class ShutdownAllDUnitTest extends CacheTestCase {
     createData(vm0, 0, numBuckets, "a", "region");
 
     vm0.invoke(addExceptionTag1(expectedExceptions));
-    invokeInEveryVM(new SerializableRunnable("set TestInternalGemFireError") {
+    Invoke.invokeInEveryVM(new SerializableRunnable("set TestInternalGemFireError") {
       public void run() {
         System.setProperty("TestInternalGemFireError", "true");
       }
@@ -155,7 +158,7 @@ public class ShutdownAllDUnitTest extends CacheTestCase {
     
     assertTrue(InternalDistributedSystem.getExistingSystems().isEmpty());
     
-    invokeInEveryVM(new SerializableRunnable("reset TestInternalGemFireError") {
+    Invoke.invokeInEveryVM(new SerializableRunnable("reset TestInternalGemFireError") {
       public void run() {
         System.setProperty("TestInternalGemFireError", "false");
       }
@@ -182,7 +185,7 @@ public class ShutdownAllDUnitTest extends CacheTestCase {
     
     vm0.invoke(addExceptionTag1(expectedExceptions));
     vm1.invoke(addExceptionTag1(expectedExceptions));
-    invokeInEveryVM(new SerializableRunnable("set TestInternalGemFireError") {
+    Invoke.invokeInEveryVM(new SerializableRunnable("set TestInternalGemFireError") {
       public void run() {
         System.setProperty("TestInternalGemFireError", "true");
       }
@@ -191,7 +194,7 @@ public class ShutdownAllDUnitTest extends CacheTestCase {
     
     assertTrue(InternalDistributedSystem.getExistingSystems().isEmpty());
     
-    invokeInEveryVM(new SerializableRunnable("reset TestInternalGemFireError") {
+    Invoke.invokeInEveryVM(new SerializableRunnable("reset TestInternalGemFireError") {
       public void run() {
         System.setProperty("TestInternalGemFireError", "false");
       }
@@ -487,7 +490,7 @@ public class ShutdownAllDUnitTest extends CacheTestCase {
     });
     
     //wait for shutdown to finish
-    pause(10000);
+    Wait.pause(10000);
     
     // restart vm0
     AsyncInvocation a0 = createRegionAsync(vm0, "region", "disk", true, 1);
@@ -550,7 +553,7 @@ public class ShutdownAllDUnitTest extends CacheTestCase {
     AsyncInvocation a0 = createRegionAsync(vm0, "region", "disk", true, 1);
     
     //Wait a bit for the initialization to get stuck
-    pause(20000);
+    Wait.pause(20000);
     assertTrue(a0.isAlive());
     
     //Do another shutdown all, with a member offline and another stuck
@@ -722,7 +725,7 @@ public class ShutdownAllDUnitTest extends CacheTestCase {
           try {
             recoveryDone.await();
           } catch (InterruptedException e) {
-            fail("Interrupted", e);
+            Assert.fail("Interrupted", e);
           }
         }
       }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/e2f18f97/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/partitioned/StreamingPartitionOperationOneDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/partitioned/StreamingPartitionOperationOneDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/partitioned/StreamingPartitionOperationOneDUnitTest.java
index b9e8ebe..f5e0b71 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/partitioned/StreamingPartitionOperationOneDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/partitioned/StreamingPartitionOperationOneDUnitTest.java
@@ -47,6 +47,7 @@ import com.gemstone.gemfire.distributed.internal.ReplyProcessor21;
 import com.gemstone.gemfire.distributed.internal.membership.InternalDistributedMember;
 import com.gemstone.gemfire.internal.cache.PartitionedRegion;
 import com.gemstone.gemfire.internal.cache.Token;
+import com.gemstone.gemfire.test.dunit.Assert;
 import com.gemstone.gemfire.test.dunit.Host;
 import com.gemstone.gemfire.test.dunit.VM;
 
@@ -108,7 +109,7 @@ public class StreamingPartitionOperationOneDUnitTest extends CacheTestCase {
       throw e;
     }
     catch (Throwable t) {
-      fail("getPartitionedDataFrom failed", t);
+      Assert.fail("getPartitionedDataFrom failed", t);
     }
     assertTrue(streamOp.dataValidated);
   }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/e2f18f97/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/partitioned/fixed/FixedPartitioningDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/partitioned/fixed/FixedPartitioningDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/partitioned/fixed/FixedPartitioningDUnitTest.java
index 30063d4..dd7f492 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/partitioned/fixed/FixedPartitioningDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/partitioned/fixed/FixedPartitioningDUnitTest.java
@@ -23,9 +23,11 @@ import com.gemstone.gemfire.cache.DuplicatePrimaryPartitionException;
 import com.gemstone.gemfire.cache.EntryNotFoundException;
 import com.gemstone.gemfire.cache.FixedPartitionAttributes;
 import com.gemstone.gemfire.cache.partition.PartitionNotAvailableException;
+import com.gemstone.gemfire.test.dunit.Assert;
 import com.gemstone.gemfire.test.dunit.AsyncInvocation;
+import com.gemstone.gemfire.test.dunit.IgnoredException;
 import com.gemstone.gemfire.test.dunit.Host;
-import com.gemstone.gemfire.test.dunit.DistributedTestCase.ExpectedException;
+import com.gemstone.gemfire.test.dunit.Wait;
 
 /**
  * This Dunit test class have multiple tests to tests different validations of
@@ -53,8 +55,8 @@ public class FixedPartitioningDUnitTest extends FixedPartitioningTestBase {
 
   }
 
-  public void tearDown2() throws Exception {
-    super.tearDown2();
+  public void tearDownBeforeDisconnect() throws Exception {
+    super.tearDownBeforeDisconnect();
   }
 
   /**
@@ -77,7 +79,7 @@ public class FixedPartitioningDUnitTest extends FixedPartitioningTestBase {
       if (!((illegal.getCause() instanceof IllegalStateException) && (illegal
           .getCause().getMessage()
           .contains("Fixed partition name cannot be null")))) {
-        fail("Expected IllegalStateException ", illegal);
+        Assert.fail("Expected IllegalStateException ", illegal);
       }
     }
   }
@@ -107,7 +109,7 @@ public class FixedPartitioningDUnitTest extends FixedPartitioningTestBase {
       if (!((illegal.getCause() instanceof IllegalStateException) && (illegal
           .getCause().getMessage()
           .contains("can be added only once in FixedPartitionAttributes")))) {
-        fail("Expected IllegalStateException ", illegal);
+        Assert.fail("Expected IllegalStateException ", illegal);
       }
     }
   }
@@ -134,7 +136,7 @@ public class FixedPartitioningDUnitTest extends FixedPartitioningTestBase {
     catch (Exception illegal) {
       if (!((illegal.getCause() instanceof IllegalStateException) && (illegal
           .getCause().getMessage().contains("can not be defined for accessor")))) {
-        fail("Expected IllegalStateException ", illegal);
+        Assert.fail("Expected IllegalStateException ", illegal);
       }
     }
   }
@@ -147,7 +149,7 @@ public class FixedPartitioningDUnitTest extends FixedPartitioningTestBase {
    */
 
   public void testSamePartitionName_Primary_OnTwoMembers() {
-    ExpectedException ex = addExpectedException("DuplicatePrimaryPartitionException");
+    IgnoredException ex = IgnoredException.addIgnoredException("DuplicatePrimaryPartitionException");
     try {
       member1.invoke(FixedPartitioningTestBase.class, "createCacheOnMember");
       FixedPartitionAttributes fpa1 = FixedPartitionAttributes
@@ -179,7 +181,7 @@ public class FixedPartitioningDUnitTest extends FixedPartitioningTestBase {
       if (!((duplicate.getCause() instanceof DuplicatePrimaryPartitionException) && (duplicate
           .getCause().getMessage()
           .contains("can not be defined as primary on more than one node")))) {
-        fail("Expected DuplicatePrimaryPartitionException ", duplicate);
+        Assert.fail("Expected DuplicatePrimaryPartitionException ", duplicate);
       }
     } finally {
       ex.remove();
@@ -192,7 +194,7 @@ public class FixedPartitioningDUnitTest extends FixedPartitioningTestBase {
    */
 
   public void testSamePartitionName_DifferentNumBuckets() {
-    ExpectedException ex = addExpectedException("IllegalStateException");
+    IgnoredException ex = IgnoredException.addIgnoredException("IllegalStateException");
     try {
       member1.invoke(FixedPartitioningTestBase.class, "createCacheOnMember");
       FixedPartitionAttributes fpa1 = FixedPartitionAttributes
@@ -220,7 +222,7 @@ public class FixedPartitioningDUnitTest extends FixedPartitioningTestBase {
     catch (Exception illegal) {
       if (!((illegal.getCause() instanceof IllegalStateException) && (illegal
           .getCause().getMessage().contains("num-buckets are not same")))) {
-        fail("Expected IllegalStateException ", illegal);
+        Assert.fail("Expected IllegalStateException ", illegal);
       }
     } finally {
       ex.remove();
@@ -235,7 +237,7 @@ public class FixedPartitioningDUnitTest extends FixedPartitioningTestBase {
    */
 
   public void testNumberOfPartitions() {
-    ExpectedException expected = addExpectedException("IllegalStateException");
+    IgnoredException expected = IgnoredException.addIgnoredException("IllegalStateException");
     try {
       member1.invoke(FixedPartitioningTestBase.class, "createCacheOnMember");
       member1.invoke(FixedPartitioningTestBase.class, "createRegionWithPartitionAttributes",
@@ -282,7 +284,7 @@ public class FixedPartitioningDUnitTest extends FixedPartitioningTestBase {
       if (!((ex.getCause() instanceof IllegalStateException) && (ex.getCause()
           .getMessage()
           .contains("should never exceed number of redundant copies")))) {
-        fail("Expected IllegalStateException ", ex);
+        Assert.fail("Expected IllegalStateException ", ex);
       }
     } finally {
       expected.remove();
@@ -295,7 +297,7 @@ public class FixedPartitioningDUnitTest extends FixedPartitioningTestBase {
    */
 
   public void testNumBuckets_totalNumBuckets() {
-    ExpectedException expected = addExpectedException("IllegalStateException");
+    IgnoredException expected = IgnoredException.addIgnoredException("IllegalStateException");
     try {
       member1.invoke(FixedPartitioningTestBase.class, "createCacheOnMember");
       member1.invoke(FixedPartitioningTestBase.class, "createRegionWithPartitionAttributes",
@@ -330,7 +332,7 @@ public class FixedPartitioningDUnitTest extends FixedPartitioningTestBase {
       if (!((ex.getCause() instanceof IllegalStateException) && (ex.getCause()
           .getMessage()
           .contains("for different primary partitions should not be greater than total-num-buckets ")))) {
-        fail("Expected IllegalStateException ", ex);
+        Assert.fail("Expected IllegalStateException ", ex);
       }
     } finally {
       expected.remove();
@@ -372,7 +374,7 @@ public class FixedPartitioningDUnitTest extends FixedPartitioningTestBase {
     }
     catch (Exception ex) {
       if (!((ex.getCause() instanceof PartitionNotAvailableException))) {
-        fail("Expected PartitionNotAvailableException ", ex);
+        Assert.fail("Expected PartitionNotAvailableException ", ex);
       }
     }
   }
@@ -384,7 +386,7 @@ public class FixedPartitioningDUnitTest extends FixedPartitioningTestBase {
    */
   
   public void test_DataStoreWithoutPartition_DataStoreWithPartition() {
-    ExpectedException expected = addExpectedException("IllegalStateException");
+    IgnoredException expected = IgnoredException.addIgnoredException("IllegalStateException");
     try {
       member1.invoke(FixedPartitioningTestBase.class, "createCacheOnMember");
       member1.invoke(FixedPartitioningTestBase.class, "createRegionWithPartitionAttributes",
@@ -402,7 +404,7 @@ public class FixedPartitioningDUnitTest extends FixedPartitioningTestBase {
     }
     catch (Exception ex) {
       if (!((ex.getCause() instanceof IllegalStateException))) {
-        fail("Expected IllegalStateException ", ex);
+        Assert.fail("Expected IllegalStateException ", ex);
       }
     } finally {
       expected.remove();
@@ -416,7 +418,7 @@ public class FixedPartitioningDUnitTest extends FixedPartitioningTestBase {
    */
 
   public void test_DataStoreWithPartition_DataStoreWithoutPartition() {
-    ExpectedException expected = addExpectedException("IllegalStateException");
+    IgnoredException expected = IgnoredException.addIgnoredException("IllegalStateException");
     try {
       member2.invoke(FixedPartitioningTestBase.class, "createCacheOnMember");
       FixedPartitionAttributes fpa1 = FixedPartitionAttributes
@@ -434,7 +436,7 @@ public class FixedPartitioningDUnitTest extends FixedPartitioningTestBase {
     }
     catch (Exception ex) {
       if (!((ex.getCause() instanceof IllegalStateException))) {
-        fail("Expected IllegalStateException ", ex);
+        Assert.fail("Expected IllegalStateException ", ex);
       }
     } finally {
       expected.remove();
@@ -668,7 +670,7 @@ public class FixedPartitioningDUnitTest extends FixedPartitioningTestBase {
     }
     catch (Exception ex) {
       if (!((ex.getCause() instanceof EntryNotFoundException))) {
-        fail("Expected EntryNotFoundException ", ex);
+        Assert.fail("Expected EntryNotFoundException ", ex);
       }
     }
     
@@ -727,7 +729,7 @@ public class FixedPartitioningDUnitTest extends FixedPartitioningTestBase {
     }
     catch (Exception ex) {
       if (!((ex.getCause() instanceof IllegalStateException))) {
-        fail("Expected IllegalStateException ", ex);
+        Assert.fail("Expected IllegalStateException ", ex);
       }
     }
   }
@@ -876,7 +878,7 @@ public class FixedPartitioningDUnitTest extends FixedPartitioningTestBase {
     }
     catch (Exception ex) {
       if (!((ex.getCause() instanceof IllegalStateException))) {
-        fail("Expected IllegalStateException ", ex);
+        Assert.fail("Expected IllegalStateException ", ex);
       }
     }
   }
@@ -931,7 +933,7 @@ public class FixedPartitioningDUnitTest extends FixedPartitioningTestBase {
     }
     catch (Exception ex) {
       if (!((ex.getCause() instanceof IllegalStateException))) {
-        fail("Expected IllegalStateException ", ex);
+        Assert.fail("Expected IllegalStateException ", ex);
       }
     }
   }
@@ -1208,7 +1210,7 @@ public class FixedPartitioningDUnitTest extends FixedPartitioningTestBase {
     createRegionWithPartitionAttributes("Quarter", fpaList, 3, 40, 12,
         new QuarterPartitionResolver(), null, false);
 
-    pause(1000);
+    Wait.pause(1000);
 
     member1.invoke(FixedPartitioningTestBase.class, "checkPrimaryBucketsForQuarter",
         new Object[] { 3, 0 });
@@ -1328,7 +1330,7 @@ public class FixedPartitioningDUnitTest extends FixedPartitioningTestBase {
         new Object[] { 9, 3 });
 
     member4.invoke(FixedPartitioningTestBase.class, "closeCache");
-    pause(1000);
+    Wait.pause(1000);
 
     member1.invoke(FixedPartitioningTestBase.class,
         "checkPrimarySecondaryData_TwoSecondaries", new Object[] { Quarter1,
@@ -1438,7 +1440,7 @@ public class FixedPartitioningDUnitTest extends FixedPartitioningTestBase {
         new Object[] { 6, 3 });
 
     member4.invoke(FixedPartitioningTestBase.class, "closeCache");
-    pause(1000);
+    Wait.pause(1000);
 
     member3.invoke(FixedPartitioningTestBase.class, "checkPrimaryBucketsForQuarterAfterCacheClosed",
         new Object[] { 6, 6 });
@@ -1456,7 +1458,7 @@ public class FixedPartitioningDUnitTest extends FixedPartitioningTestBase {
         new Object[] { "Quarter", fpaList, 1, 40, 12,
             new QuarterPartitionResolver(), null, false });
 
-    pause(1000);
+    Wait.pause(1000);
 
     member1.invoke(FixedPartitioningTestBase.class, "checkPrimarySecondaryData",
         new Object[] { Quarter1, true });
@@ -1543,7 +1545,7 @@ public class FixedPartitioningDUnitTest extends FixedPartitioningTestBase {
 
     member4.invoke(FixedPartitioningTestBase.class, "closeCache");
     member2.invoke(FixedPartitioningTestBase.class, "closeCache");
-    pause(1000);
+    Wait.pause(1000);
 
     member3.invoke(FixedPartitioningTestBase.class, "checkPrimaryBucketsForQuarterAfterCacheClosed",
         new Object[] { 6, 6 });
@@ -1572,7 +1574,7 @@ public class FixedPartitioningDUnitTest extends FixedPartitioningTestBase {
     member2.invoke(FixedPartitioningTestBase.class, "createRegionWithPartitionAttributes",
         new Object[] { "Quarter", fpaList, 1, 40, 12,
             new QuarterPartitionResolver(), null, false });
-    pause(1000);
+    Wait.pause(1000);
 
     member1.invoke(FixedPartitioningTestBase.class, "checkPrimarySecondaryData",
         new Object[] { Quarter1, true });
@@ -1594,7 +1596,7 @@ public class FixedPartitioningDUnitTest extends FixedPartitioningTestBase {
     
     member4.invoke(FixedPartitioningTestBase.class, "doRebalance");
     
-    pause(2000);
+    Wait.pause(2000);
     member1.invoke(FixedPartitioningTestBase.class, "checkPrimaryBucketsForQuarter",
         new Object[] { 6, 3 });
     member2.invoke(FixedPartitioningTestBase.class, "checkPrimaryBucketsForQuarter",
@@ -1674,7 +1676,7 @@ public class FixedPartitioningDUnitTest extends FixedPartitioningTestBase {
 
     member3.invoke(FixedPartitioningTestBase.class, "closeCache");
     
-    pause(1000);  
+    Wait.pause(1000);  
     
     member1.invoke(FixedPartitioningTestBase.class, "checkStartingBucketIDs_Nodedown");
     member2.invoke(FixedPartitioningTestBase.class, "checkStartingBucketIDs_Nodedown");
@@ -1685,7 +1687,7 @@ public class FixedPartitioningDUnitTest extends FixedPartitioningTestBase {
         new Object[] { "Quarter", fpaList, 2, 40, 12,
             new QuarterPartitionResolver(), null, false });
     
-    pause(3000);
+    Wait.pause(3000);
     
     member1.invoke(FixedPartitioningTestBase.class, "checkStartingBucketIDs_Nodeup");
     member2.invoke(FixedPartitioningTestBase.class, "checkStartingBucketIDs_Nodeup");

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/e2f18f97/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/partitioned/fixed/FixedPartitioningTestBase.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/partitioned/fixed/FixedPartitioningTestBase.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/partitioned/fixed/FixedPartitioningTestBase.java
index f48ab61..392a6d1 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/partitioned/fixed/FixedPartitioningTestBase.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/partitioned/fixed/FixedPartitioningTestBase.java
@@ -74,7 +74,8 @@ import com.gemstone.gemfire.internal.cache.tier.sockets.Message;
 import com.gemstone.gemfire.test.dunit.DistributedTestCase;
 import com.gemstone.gemfire.test.dunit.Host;
 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;
 
 /**
  * This is the base class to do operations
@@ -154,7 +155,7 @@ public class FixedPartitioningTestBase extends DistributedTestCase {
       assertNotNull(cache);
     }
     catch (Exception e) {
-      fail("Failed while creating the cache", e);
+      com.gemstone.gemfire.test.dunit.Assert.fail("Failed while creating the cache", e);
     }
   }
 
@@ -195,7 +196,7 @@ public class FixedPartitioningTestBase extends DistributedTestCase {
     try {
       RebalanceResults result = operation.getResults();
     } catch (InterruptedException e) {
-      fail("Not expecting exception", e);
+      com.gemstone.gemfire.test.dunit.Assert.fail("Not expecting exception", e);
     }
     
   }
@@ -342,7 +343,7 @@ public class FixedPartitioningTestBase extends DistributedTestCase {
           assertEquals(customer, region_Cust.get(custid));
         }
         catch (Exception e) {
-          fail(
+          com.gemstone.gemfire.test.dunit.Assert.fail(
               "getForColocation : failed while doing get operation in CustomerPartitionedRegion ",
               e);
         }
@@ -457,7 +458,7 @@ public class FixedPartitioningTestBase extends DistributedTestCase {
         partitionedregion.put(custid, customer);
       }
       catch (Exception e) {
-        fail(
+        com.gemstone.gemfire.test.dunit.Assert.fail(
             "putCustomerPartitionedRegion : failed while doing put operation in CustomerPartitionedRegion ",
             e);
       }
@@ -481,7 +482,7 @@ public class FixedPartitioningTestBase extends DistributedTestCase {
           partitionedregion.put(orderId, order);
         }
         catch (Exception e) {
-          fail(
+          com.gemstone.gemfire.test.dunit.Assert.fail(
               "putOrderPartitionedRegion : failed while doing put operation in OrderPartitionedRegion ",
               e);
         }
@@ -508,7 +509,7 @@ public class FixedPartitioningTestBase extends DistributedTestCase {
             partitionedregion.put(shipmentId, shipment);
           }
           catch (Exception e) {
-            fail(
+            com.gemstone.gemfire.test.dunit.Assert.fail(
                 "putShipmentPartitionedRegion : failed while doing put operation in ShipmentPartitionedRegion ",
                 e);
           }
@@ -532,7 +533,7 @@ public class FixedPartitioningTestBase extends DistributedTestCase {
         partitionedregion.put(custid, customer);
       }
       catch (Exception e) {
-        fail(
+        com.gemstone.gemfire.test.dunit.Assert.fail(
             "putCustomerPartitionedRegion : failed while doing put operation in CustomerPartitionedRegion ",
             e);
       }
@@ -556,7 +557,7 @@ public class FixedPartitioningTestBase extends DistributedTestCase {
           partitionedregion.put(orderId, order);
         }
         catch (Exception e) {
-          fail(
+          com.gemstone.gemfire.test.dunit.Assert.fail(
               "putOrderPartitionedRegion : failed while doing put operation in OrderPartitionedRegion ",
               e);
         }
@@ -583,7 +584,7 @@ public class FixedPartitioningTestBase extends DistributedTestCase {
             partitionedregion.put(shipmentId, shipment);
           }
           catch (Exception e) {
-            fail(
+            com.gemstone.gemfire.test.dunit.Assert.fail(
                 "putShipmentPartitionedRegion : failed while doing put operation in ShipmentPartitionedRegion ",
                 e);
           }
@@ -608,7 +609,7 @@ public class FixedPartitioningTestBase extends DistributedTestCase {
           partitionedregion.put(custid, customer);
         }
         catch (Exception e) {
-          fail(
+          com.gemstone.gemfire.test.dunit.Assert.fail(
               "putCustomerPartitionedRegion : failed while doing put operation in CustomerPartitionedRegion ",
               e);
         }
@@ -635,7 +636,7 @@ public class FixedPartitioningTestBase extends DistributedTestCase {
             partitionedregion.put(orderId, order);
           }
           catch (Exception e) {
-            fail(
+            com.gemstone.gemfire.test.dunit.Assert.fail(
                 "putOrderPartitionedRegion : failed while doing put operation in OrderPartitionedRegion ",
                 e);
           }
@@ -664,7 +665,7 @@ public class FixedPartitioningTestBase extends DistributedTestCase {
               partitionedregion.put(shipmentId, shipment);
             }
             catch (Exception e) {
-              fail(
+              com.gemstone.gemfire.test.dunit.Assert.fail(
                   "putShipmentPartitionedRegion : failed while doing put operation in ShipmentPartitionedRegion ",
                   e);
             }
@@ -690,7 +691,7 @@ public class FixedPartitioningTestBase extends DistributedTestCase {
           partitionedregion.put(custid, customer);
         }
         catch (Exception e) {
-          fail(
+          com.gemstone.gemfire.test.dunit.Assert.fail(
               "putCustomerPartitionedRegion : failed while doing put operation in CustomerPartitionedRegion ",
               e);
         }
@@ -717,7 +718,7 @@ public class FixedPartitioningTestBase extends DistributedTestCase {
             partitionedregion.put(orderId, order);
           }
           catch (Exception e) {
-            fail(
+            com.gemstone.gemfire.test.dunit.Assert.fail(
                 "putOrderPartitionedRegion : failed while doing put operation in OrderPartitionedRegion ",
                 e);
           }
@@ -746,7 +747,7 @@ public class FixedPartitioningTestBase extends DistributedTestCase {
               partitionedregion.put(shipmentId, shipment);
             }
             catch (Exception e) {
-              fail(
+              com.gemstone.gemfire.test.dunit.Assert.fail(
                   "putShipmentPartitionedRegion : failed while doing put operation in ShipmentPartitionedRegion ",
                   e);
             }
@@ -800,7 +801,7 @@ public class FixedPartitioningTestBase extends DistributedTestCase {
       }
     }
     catch (ParseException e) {
-      FixedPartitioningTestBase.fail("Exception Occured while parseing date", e);
+      com.gemstone.gemfire.test.dunit.Assert.fail("Exception Occured while parseing date", e);
     }
     return null;
   }
@@ -822,7 +823,7 @@ public class FixedPartitioningTestBase extends DistributedTestCase {
           .getRegion(Region.SEPARATOR + shipmentPartitionedRegionName);
     }
     catch (Exception e) {
-      fail(
+      com.gemstone.gemfire.test.dunit.Assert.fail(
           "validateAfterPutPartitionedRegion : failed while getting the region",
           e);
     }
@@ -1131,7 +1132,7 @@ public class FixedPartitioningTestBase extends DistributedTestCase {
           .getRegion(Region.SEPARATOR + customerPartitionedRegionName);
     }
     catch (Exception e) {
-      fail(
+      com.gemstone.gemfire.test.dunit.Assert.fail(
           "validateAfterPutPartitionedRegion : failed while getting the region",
           e);
     }
@@ -1159,7 +1160,7 @@ public class FixedPartitioningTestBase extends DistributedTestCase {
           .getRegion(Region.SEPARATOR + shipmentPartitionedRegionName);
     }
     catch (Exception e) {
-      fail(
+      com.gemstone.gemfire.test.dunit.Assert.fail(
           "validateAfterPutPartitionedRegion : failed while getting the region",
           e);
     }
@@ -1210,7 +1211,7 @@ public class FixedPartitioningTestBase extends DistributedTestCase {
           .getRegion(Region.SEPARATOR + shipmentPartitionedRegionName);
     }
     catch (Exception e) {
-      fail(
+      com.gemstone.gemfire.test.dunit.Assert.fail(
           "validateAfterPutPartitionedRegion : failed while getting the region",
           e);
     }
@@ -1304,7 +1305,7 @@ public class FixedPartitioningTestBase extends DistributedTestCase {
                 return excuse;
               }
             };
-            DistributedTestCase.waitForCriterion(wc, 20000, 500, false);
+            Wait.waitForCriterion(wc, 20000, 500, false);
             getLogWriter().info("end of beforeCalculatingStartingBucketId");
           }
         });
@@ -1315,7 +1316,7 @@ public class FixedPartitioningTestBase extends DistributedTestCase {
     PartitionedRegion.BEFORE_CALCULATE_STARTING_BUCKET_FLAG = false;
   }
   
-  public void tearDown2() throws Exception {
+  public void tearDownBeforeDisconnect() throws Exception {
     try {
       closeCache();
       member1.invoke(FixedPartitioningTestBase.class, "closeCache");
@@ -1334,7 +1335,7 @@ public class FixedPartitioningTestBase extends DistributedTestCase {
           vm.invoke(FixedPartitioningTestBase.class, "remoteTearDown");
         }
       }
-      super.tearDown2();
+      super.tearDownBeforeDisconnect();
     }
   }
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/e2f18f97/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/partitioned/fixed/FixedPartitioningWithColocationAndPersistenceDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/partitioned/fixed/FixedPartitioningWithColocationAndPersistenceDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/partitioned/fixed/FixedPartitioningWithColocationAndPersistenceDUnitTest.java
index 8f2dceb..7dec9ff 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/partitioned/fixed/FixedPartitioningWithColocationAndPersistenceDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/partitioned/fixed/FixedPartitioningWithColocationAndPersistenceDUnitTest.java
@@ -20,8 +20,10 @@ import java.util.ArrayList;
 import java.util.List;
 
 import com.gemstone.gemfire.cache.FixedPartitionAttributes;
+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.Wait;
 
 public class FixedPartitioningWithColocationAndPersistenceDUnitTest extends
     FixedPartitioningTestBase {
@@ -42,8 +44,8 @@ public class FixedPartitioningWithColocationAndPersistenceDUnitTest extends
 
   }
 
-  public void tearDown2() throws Exception {
-    super.tearDown2();
+  public void tearDownBeforeDisconnect() throws Exception {
+    super.tearDownBeforeDisconnect();
   }
 
   /**
@@ -75,7 +77,7 @@ public class FixedPartitioningWithColocationAndPersistenceDUnitTest extends
       if (!((illegal.getCause() instanceof IllegalStateException) && (illegal
           .getCause().getMessage()
           .contains("not be specified in PartitionAttributesFactory if colocated-with is specified")))) {
-        fail("Expected IllegalStateException ", illegal);
+        Assert.fail("Expected IllegalStateException ", illegal);
       }
     }
   }
@@ -232,7 +234,7 @@ public class FixedPartitioningWithColocationAndPersistenceDUnitTest extends
 
     }
     catch (Exception e) {
-      fail("Unexpected Exception ", e);
+      Assert.fail("Unexpected Exception ", e);
     }
   }
 
@@ -373,7 +375,7 @@ public class FixedPartitioningWithColocationAndPersistenceDUnitTest extends
 
     }
     catch (Exception e) {
-      fail("Unexpected Exception ", e);
+      Assert.fail("Unexpected Exception ", e);
     }
   }
 
@@ -491,7 +493,7 @@ public class FixedPartitioningWithColocationAndPersistenceDUnitTest extends
               "Customer", "Order", "Shipment" });
 
       member3.invoke(FixedPartitioningTestBase.class, "closeCache");
-      pause(4000);
+      Wait.pause(4000);
 
       member1.invoke(FixedPartitioningTestBase.class,
           "checkPrimaryBucketsForColocationAfterCacheClosed", new Object[] {
@@ -521,7 +523,7 @@ public class FixedPartitioningWithColocationAndPersistenceDUnitTest extends
               null, 2, 50, 20, new CustomerFixedPartitionResolver(), "Order",
               false });
 
-      pause(4000);
+      Wait.pause(4000);
 
       member1.invoke(FixedPartitioningTestBase.class,
           "validateAfterPutPartitionedRegion", new Object[] { "Customer",
@@ -552,7 +554,7 @@ public class FixedPartitioningWithColocationAndPersistenceDUnitTest extends
               null, 2, 50, 20, new CustomerFixedPartitionResolver(), "Order",
               false });
 
-      pause(4000);
+      Wait.pause(4000);
 
       member1.invoke(FixedPartitioningTestBase.class,
           "validateAfterPutPartitionedRegion", new Object[] { "Customer",
@@ -573,7 +575,7 @@ public class FixedPartitioningWithColocationAndPersistenceDUnitTest extends
 
     }
     catch (Exception e) {
-      fail("Unexpected Exception ", e);
+      Assert.fail("Unexpected Exception ", e);
     }
   }
 
@@ -686,7 +688,7 @@ public class FixedPartitioningWithColocationAndPersistenceDUnitTest extends
               "Customer", "Order", "Shipment" });
 
       member3.invoke(FixedPartitioningTestBase.class, "closeCache");
-      pause(4000);
+      Wait.pause(4000);
 
       member1.invoke(FixedPartitioningTestBase.class,
           "checkPrimaryBucketsForColocationAfterCacheClosed", new Object[] {
@@ -716,7 +718,7 @@ public class FixedPartitioningWithColocationAndPersistenceDUnitTest extends
               null, 2, 50, 20, new CustomerFixedPartitionResolver(), "Order",
               false });
 
-      pause(4000);
+      Wait.pause(4000);
 
       member1.invoke(FixedPartitioningTestBase.class,
           "validateAfterPutPartitionedRegion", new Object[] { "Customer",
@@ -747,7 +749,7 @@ public class FixedPartitioningWithColocationAndPersistenceDUnitTest extends
               null, 2, 50, 20, new CustomerFixedPartitionResolver(), "Order",
               false });
 
-      pause(4000);
+      Wait.pause(4000);
 
       member1.invoke(FixedPartitioningTestBase.class,
           "validateAfterPutPartitionedRegion", new Object[] { "Customer",
@@ -768,7 +770,7 @@ public class FixedPartitioningWithColocationAndPersistenceDUnitTest extends
 
     }
     catch (Exception e) {
-      fail("Unexpected Exception ", e);
+      Assert.fail("Unexpected Exception ", e);
     }
   }
 
@@ -801,7 +803,7 @@ public class FixedPartitioningWithColocationAndPersistenceDUnitTest extends
 
     member2.invoke(FixedPartitioningTestBase.class, "closeCache");
 
-    pause(1000);
+    Wait.pause(1000);
 
     member2.invoke(FixedPartitioningTestBase.class, "createCacheOnMember");
     fpa1 = FixedPartitionAttributes.createFixedPartition(Quarter2, true, 3);
@@ -909,14 +911,14 @@ public class FixedPartitioningWithColocationAndPersistenceDUnitTest extends
         "createRegionWithPartitionAttributes", new Object[] { "Quarter",
             fpaList, 1, 40, 12, new QuarterPartitionResolver(), null, true });
 
-    pause(4000);
+    Wait.pause(4000);
     member2.invoke(FixedPartitioningTestBase.class, "getForQuarter",
         new Object[] { "Quarter", Quarter1 });
     member2.invoke(FixedPartitioningTestBase.class, "getForQuarter",
         new Object[] { "Quarter", Quarter2 });
     member2.invoke(FixedPartitioningTestBase.class,
         "checkPrimaryDataPersistence", new Object[] { Quarter2 });
-    pause(2000);
+    Wait.pause(2000);
     member2.invoke(FixedPartitioningTestBase.class,
         "checkPrimaryBucketsForQuarter", new Object[] { 6, 6 });
 
@@ -930,7 +932,7 @@ public class FixedPartitioningWithColocationAndPersistenceDUnitTest extends
         "createRegionWithPartitionAttributes", new Object[] { "Quarter",
             fpaList, 1, 40, 12, new QuarterPartitionResolver(), null, true });
 
-    pause(4000);
+    Wait.pause(4000);
 
     member1.invoke(FixedPartitioningTestBase.class,
         "checkPrimaryDataPersistence", new Object[] { Quarter1 });
@@ -1064,7 +1066,7 @@ public class FixedPartitioningWithColocationAndPersistenceDUnitTest extends
               null, 1, 50, 20, new CustomerFixedPartitionResolver(), "Order",
               false });
 
-      pause(4000);
+      Wait.pause(4000);
       member1.invoke(FixedPartitioningTestBase.class,
           "checkPrimaryBucketsForColocation", new Object[] { 10, 5, "Customer",
               "Order", "Shipment" });
@@ -1080,7 +1082,7 @@ public class FixedPartitioningWithColocationAndPersistenceDUnitTest extends
 
     }
     catch (Exception e) {
-      fail("Unexpected Exception ", e);
+      Assert.fail("Unexpected Exception ", e);
     }
   }
 
@@ -1178,13 +1180,13 @@ public class FixedPartitioningWithColocationAndPersistenceDUnitTest extends
               fpaList, 1, 50, 20, new CustomerFixedPartitionResolver(), null,
               true });
 
-      pause(4000);
+      Wait.pause(4000);
       member2.invoke(FixedPartitioningTestBase.class, "getForColocation",
           new Object[] { "Customer", "Order", "Shipment" });
 
     }
     catch (Exception e) {
-      fail("Unexpected Exception ", e);
+      Assert.fail("Unexpected Exception ", e);
     }
   }
 
@@ -1247,7 +1249,7 @@ public class FixedPartitioningWithColocationAndPersistenceDUnitTest extends
         "createRegionWithPartitionAttributes", new Object[] { "Quarter",
             fpaList, 0, 40, 12, new QuarterPartitionResolver(), null, true });
 
-    pause(4000);
+    Wait.pause(4000);
     member2.invoke(FixedPartitioningTestBase.class,
         "checkPrimarySecondaryData", new Object[] { Quarter3, false });
 
@@ -1374,7 +1376,7 @@ public class FixedPartitioningWithColocationAndPersistenceDUnitTest extends
         "createRegionWithPartitionAttributes", new Object[] { "Quarter",
             fpaList, 1, 40, 12, new QuarterPartitionResolver(), null, true });
 
-    pause(4000);
+    Wait.pause(4000);
     member4.invoke(FixedPartitioningTestBase.class,
         "checkPrimarySecondaryData", new Object[] { Quarter4, false });
 
@@ -1424,7 +1426,7 @@ public class FixedPartitioningWithColocationAndPersistenceDUnitTest extends
     member1.invoke(FixedPartitioningTestBase.class, "closeCache");
     member2.invoke(FixedPartitioningTestBase.class, "closeCache");
 
-    pause(1000);
+    Wait.pause(1000);
 
     member2.invoke(FixedPartitioningTestBase.class, "createCacheOnMember");
     member2.invoke(FixedPartitioningTestBase.class,

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/e2f18f97/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/persistence/PersistentRVVRecoveryDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/persistence/PersistentRVVRecoveryDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/persistence/PersistentRVVRecoveryDUnitTest.java
index ed0b6dc..b31b824 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/persistence/PersistentRVVRecoveryDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/persistence/PersistentRVVRecoveryDUnitTest.java
@@ -66,10 +66,14 @@ import com.gemstone.gemfire.internal.cache.TombstoneService;
 import com.gemstone.gemfire.internal.cache.versions.RegionVersionVector;
 import com.gemstone.gemfire.internal.cache.versions.VersionTag;
 import com.gemstone.gemfire.test.dunit.AsyncInvocation;
+import com.gemstone.gemfire.test.dunit.IgnoredException;
 import com.gemstone.gemfire.test.dunit.Host;
+import com.gemstone.gemfire.test.dunit.Invoke;
 import com.gemstone.gemfire.test.dunit.SerializableCallable;
 import com.gemstone.gemfire.test.dunit.SerializableRunnable;
 import com.gemstone.gemfire.test.dunit.VM;
+import com.gemstone.gemfire.test.dunit.Wait;
+import com.gemstone.gemfire.test.dunit.WaitCriterion;
 
 public class PersistentRVVRecoveryDUnitTest extends PersistentReplicatedTestBase {
   
@@ -80,9 +84,9 @@ public class PersistentRVVRecoveryDUnitTest extends PersistentReplicatedTestBase
   }
   
   @Override
-  public void tearDown2() throws Exception {
-    super.tearDown2();
-    invokeInEveryVM(PersistentRecoveryOrderDUnitTest.class, "resetAckWaitThreshold");
+  public void tearDownBeforeDisconnect() throws Exception {
+    super.tearDownBeforeDisconnect();
+    Invoke.invokeInEveryVM(PersistentRecoveryOrderDUnitTest.class, "resetAckWaitThreshold");
   }
   
   public void testNoConcurrencyChecks () {
@@ -215,7 +219,7 @@ public class PersistentRVVRecoveryDUnitTest extends PersistentReplicatedTestBase
       }
       
     });
-    ExpectedException ex = addExpectedException("DiskAccessException");
+    IgnoredException ex = IgnoredException.addIgnoredException("DiskAccessException");
     try {
       //Force expiration, with our test hook that should close the cache
       tombstoneService = cache.getTombstoneService();
@@ -285,7 +289,7 @@ public class PersistentRVVRecoveryDUnitTest extends PersistentReplicatedTestBase
 
           // We should wait for timeout time so that tomstones are expired
           // right away when they are gIId based on their original timestamp.
-          pause((int) TEST_REPLICATED_TOMBSTONE_TIMEOUT);
+          Wait.pause((int) TEST_REPLICATED_TOMBSTONE_TIMEOUT);
 
           TombstoneService.REPLICATED_TOMBSTONE_TIMEOUT = TEST_REPLICATED_TOMBSTONE_TIMEOUT;
           TombstoneService.EXPIRED_TOMBSTONE_LIMIT = entryCount;
@@ -295,7 +299,7 @@ public class PersistentRVVRecoveryDUnitTest extends PersistentReplicatedTestBase
           assertEquals(entryCount, getTombstoneCount(region));
 
           getCache().getLogger().fine("Waiting for maximumSleepTime ms");
-          pause(10000); // maximumSleepTime+500 in TombstoneSweeper GC thread
+          Wait.pause(10000); // maximumSleepTime+500 in TombstoneSweeper GC thread
 
           // Tombstones should have been expired and garbage collected by now by
           // TombstoneService.
@@ -390,7 +394,7 @@ public class PersistentRVVRecoveryDUnitTest extends PersistentReplicatedTestBase
         Cache cache = getCache();
         Region region = cache.getRegion("prRegion");
         while (!region.get("testKey").equals("testValue2")) {
-          pause(100);
+          Wait.pause(100);
         }
         region.destroy("testKey");
       }
@@ -751,7 +755,7 @@ public class PersistentRVVRecoveryDUnitTest extends PersistentReplicatedTestBase
     //and then do the wait in the flusher thread.
     
     //Setup the callbacks to wait for krf creation and throw an exception
-    ExpectedException ex = addExpectedException("DiskAccessException");
+    IgnoredException ex = IgnoredException.addIgnoredException("DiskAccessException");
     LocalRegion.ISSUE_CALLBACKS_TO_CACHE_OBSERVER=true;
     try {
       final CountDownLatch krfCreated = new CountDownLatch(1);
@@ -808,7 +812,7 @@ public class PersistentRVVRecoveryDUnitTest extends PersistentReplicatedTestBase
 
       //Wait for the region to be destroyed. The region won't be destroyed
       //until the async flusher thread ends up switching oplogs
-      waitForCriterion(new WaitCriterion() {
+      Wait.waitForCriterion(new WaitCriterion() {
 
         @Override
         public boolean done() {


Mime
View raw message