geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hiteshkhame...@apache.org
Subject [39/94] [abbrv] [partial] incubator-geode git commit: GEODE-837: update tests from JUnit3 to JUnit4
Date Wed, 15 Jun 2016 00:07:55 GMT
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/b914df23/geode-core/src/test/java/com/gemstone/gemfire/cache30/MultiVMRegionTestCase.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache30/MultiVMRegionTestCase.java b/geode-core/src/test/java/com/gemstone/gemfire/cache30/MultiVMRegionTestCase.java
index 4ecf3e3..a8a512e 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache30/MultiVMRegionTestCase.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache30/MultiVMRegionTestCase.java
@@ -17,13 +17,13 @@
 package com.gemstone.gemfire.cache30;
 
 import static com.gemstone.gemfire.internal.lang.ThrowableUtils.*;
+import static com.gemstone.gemfire.test.dunit.Assert.*;
+import static org.junit.Assume.*;
 
 import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
 import java.io.DataInput;
 import java.io.DataInputStream;
 import java.io.DataOutput;
-import java.io.DataOutputStream;
 import java.io.IOException;
 import java.io.Serializable;
 import java.util.ArrayList;
@@ -42,11 +42,10 @@ import java.util.Random;
 import java.util.Set;
 import java.util.concurrent.LinkedBlockingQueue;
 
-import junit.framework.Assert;
-import junit.framework.AssertionFailedError;
-
 import org.apache.logging.log4j.Logger;
+import org.junit.AfterClass;
 import org.junit.Ignore;
+import org.junit.Test;
 import org.junit.experimental.categories.Category;
 
 import com.gemstone.gemfire.DataSerializable;
@@ -107,26 +106,22 @@ import com.gemstone.gemfire.internal.cache.TXManagerImpl;
 import com.gemstone.gemfire.internal.cache.TXStateProxy;
 import com.gemstone.gemfire.internal.cache.Token;
 import com.gemstone.gemfire.internal.cache.TombstoneService;
-import com.gemstone.gemfire.internal.cache.versions.RegionVersionHolder;
 import com.gemstone.gemfire.internal.cache.versions.RegionVersionVector;
-import com.gemstone.gemfire.internal.cache.versions.VMRegionVersionVector;
 import com.gemstone.gemfire.internal.cache.versions.VersionTag;
 import com.gemstone.gemfire.internal.logging.LogService;
 import com.gemstone.gemfire.internal.offheap.MemoryAllocatorImpl;
 import com.gemstone.gemfire.internal.offheap.StoredObject;
 import com.gemstone.gemfire.test.dunit.AsyncInvocation;
-import com.gemstone.gemfire.test.dunit.DistributedTestCase;
 import com.gemstone.gemfire.test.dunit.DistributedTestUtils;
 import com.gemstone.gemfire.test.dunit.Host;
-import com.gemstone.gemfire.test.dunit.RMIException;
+import com.gemstone.gemfire.test.dunit.IgnoredException;
+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.ThreadUtils;
 import com.gemstone.gemfire.test.dunit.VM;
 import com.gemstone.gemfire.test.dunit.Wait;
 import com.gemstone.gemfire.test.dunit.WaitCriterion;
-import com.gemstone.gemfire.test.dunit.IgnoredException;
-import com.gemstone.gemfire.test.dunit.Invoke;
 import com.gemstone.gemfire.test.junit.categories.FlakyTest;
 
 /**
@@ -136,37 +131,23 @@ import com.gemstone.gemfire.test.junit.categories.FlakyTest;
 public abstract class MultiVMRegionTestCase extends RegionTestCase {
 
   private static final Logger logger = LogService.getLogger();
-  
-  Properties props = new Properties();
-
-  final int putRange_1Start = 1;
-
-  final int putRange_1End = 5;
-
-  final int putRange_2Start = 6;
-
-  final int putRange_2End = 10;
 
-  final int putRange_3Start = 11;
-
-  final int putRange_3End = 15;
-
-  final int putRange_4Start = 16;
-
-  final int putRange_4End = 20;
-
-  final int removeRange_1Start = 2;
-
-  final int removeRange_1End = 4;
-
-  final int removeRange_2Start = 7;
-
-  final int removeRange_2End = 9;
-
-  public MultiVMRegionTestCase(String name) {
-    super(name);
-  }
-  
+  private Properties props = new Properties();
+
+  private final int putRange_1Start = 1;
+  private final int putRange_1End = 5;
+  private final int putRange_2Start = 6;
+  private final int putRange_2End = 10;
+  private final int putRange_3Start = 11;
+  private final int putRange_3End = 15;
+  private final int putRange_4Start = 16;
+  private final int putRange_4End = 20;
+  private final int removeRange_1Start = 2;
+  private final int removeRange_1End = 4;
+  private final int removeRange_2Start = 7;
+  private final int removeRange_2End = 9;
+
+  @AfterClass
   public static void caseTearDown() throws Exception {
     disconnectAllFromDS();
   }
@@ -176,27 +157,17 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
     CCRegion = null;
   }
 
-  // @todo can be used in tests
-//  protected CacheSerializableRunnable createRegionTask(final String name) {
-//    return new CacheSerializableRunnable("Create Region") {
-//      public void run2() throws CacheException {
-//        assertNotNull(createRegion(name));
-//      }
-//    };
-//  }
-
-
-  ////////  Test Methods
-
   /**
    * This is a for the ConcurrentMap operations.
    * 4 VMs are used to
    * create the region and operations are performed on one of the nodes
    */
+  @Test
   public void testConcurrentOperations() throws Exception {
     SerializableRunnable createRegion = new CacheSerializableRunnable(
     "createRegion") {
 
+      @Override
       public void run2() throws CacheException {
         Cache cache = getCache();
         RegionAttributes regionAttribs = getRegionAttributes();
@@ -227,6 +198,7 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
     //String exceptionStr = "";
     VM vm0 = Host.getHost(0).getVM(0);
     vm0.invoke(new CacheSerializableRunnable("doConcurrentMapOperations") {
+      @Override
       public void run2() throws CacheException {
         Cache cache = getCache();
         final Region pr = cache.getRegion(rName);
@@ -344,6 +316,7 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
      */
     vm0.invoke(new CacheSerializableRunnable("destroyRegionOp") {
                
+       @Override
        public void run2() {
          Cache cache = getCache();
          Region pr = cache.getRegion(rName);
@@ -359,13 +332,15 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
    * Tests that doing a {@link Region#put put} in a distributed region
    * one VM updates the value in another VM.
    */
-  public void testDistributedUpdate() {
+  @Test
+  public void testDistributedUpdate() throws Exception {
     assertTrue(getRegionAttributes().getScope().isDistributed());
 
     final String name = this.getUniqueName();
 
     SerializableRunnable create =
       new CacheSerializableRunnable("Create Region") {
+          @Override
           public void run2() throws CacheException {
             createRegion(name);
           }
@@ -384,6 +359,7 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
 
     SerializableRunnable put =
       new CacheSerializableRunnable("Put key/value") {
+          @Override
           public void run2() throws CacheException {
             Region region =
               getRootRegion().getSubregion(name);
@@ -396,6 +372,7 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
     vm1.invoke(put);
 
     vm0.invoke(new CacheSerializableRunnable("Update") {
+        @Override
         public void run2() throws CacheException {
           Region region = getRootRegion().getSubregion(name);
           region.put(key, newValue);
@@ -404,6 +381,7 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
       });
 
     vm1.invoke(new CacheSerializableRunnable("Validate update") {
+        @Override
         public void run2() throws CacheException {
           Region region = getRootRegion().getSubregion(name);
           Region.Entry entry = region.getEntry(key);
@@ -425,11 +403,10 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
    * DISABLED 4-16-04 - the current implementation assumes events
    * are processed synchronously, which is no longer true.
    */
-  public void _ttestOrderedUpdates() throws Throwable {
-    if (getRegionAttributes().getScope() ==
-        Scope.DISTRIBUTED_NO_ACK) {
-      return;
-    }
+  @Ignore("TODO: test is DISABLED 4-16-04 - the current implementation assumes events are processed synchronously, which is no longer true")
+  @Test
+  public void testOrderedUpdates() throws Exception {
+    assumeFalse(getRegionAttributes().getScope() == Scope.DISTRIBUTED_NO_ACK);
 
     final String name = this.getUniqueName();
     final Object key = "KEY";
@@ -441,6 +418,7 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
 
     SerializableRunnable create =
       new CacheSerializableRunnable("Create region entry") {
+          @Override
           public void run2() throws CacheException {
             Region region = createRegion(name);
             region.create(key, null);
@@ -451,11 +429,13 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
     vm1.invoke(create);
 
     vm1.invoke(new CacheSerializableRunnable("Set listener") {
+        @Override
         public void run2() throws CacheException {
           Region region = getRootRegion().getSubregion(name);
           region.setUserAttribute(new LinkedBlockingQueue());
           region.getAttributesMutator().addCacheListener(new
             CacheListenerAdapter() {
+              @Override
               public void afterUpdate(EntryEvent e) {
                 Region region2 = e.getRegion();
                 LinkedBlockingQueue queue =
@@ -467,7 +447,7 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
                   queue.put(value);
 
                 } catch (InterruptedException ex) {
-                  com.gemstone.gemfire.test.dunit.Assert.fail("Why was I interrupted?", ex);
+                  fail("Why was I interrupted?", ex);
                 }
               }
             });
@@ -476,6 +456,7 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
       });
     AsyncInvocation ai1 =
       vm1.invokeAsync(new CacheSerializableRunnable("Verify") {
+          @Override
           public void run2() throws CacheException {
             Region region =
               getRootRegion().getSubregion(name);
@@ -489,7 +470,7 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
                 assertEquals(i, value.intValue());
 
               } catch (InterruptedException ex) {
-                com.gemstone.gemfire.test.dunit.Assert.fail("Why was I interrupted?", ex);
+                fail("Why was I interrupted?", ex);
               }
             }
           }
@@ -497,6 +478,7 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
 
     AsyncInvocation ai0 =
       vm0.invokeAsync(new CacheSerializableRunnable("Populate") {
+          @Override
           public void run2() throws CacheException {
             Region region =
               getRootRegion().getSubregion(name);
@@ -511,10 +493,10 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
     ThreadUtils.join(ai1, 30 * 1000);
 
     if (ai0.exceptionOccurred()) {
-      com.gemstone.gemfire.test.dunit.Assert.fail("ai0 failed", ai0.getException());
+      fail("ai0 failed", ai0.getException());
 
     } else if (ai1.exceptionOccurred()) {
-      com.gemstone.gemfire.test.dunit.Assert.fail("ai1 failed", ai1.getException());
+      fail("ai1 failed", ai1.getException());
     }
   }
 
@@ -522,7 +504,8 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
    * Tests that doing a distributed get results in a
    * <code>netSearch</code>.
    */
-  public void testDistributedGet() {
+  @Test
+  public void testDistributedGet() throws Exception {
     assertTrue(getRegionAttributes().getScope().isDistributed());
 
     final String name = this.getUniqueName();
@@ -534,6 +517,7 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
     VM vm1 = host.getVM(1);
 
     vm0.invoke(new CacheSerializableRunnable("Populate region") {
+        @Override
         public void run2() throws CacheException {
           Region region = createRegion(name);
           region.put(key, value);
@@ -541,6 +525,7 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
       });
 
     SerializableRunnable get = new CacheSerializableRunnable("Distributed get") {
+        @Override
         public void run2() throws CacheException {
           Region region = createRegion(name);
           assertEquals(value, region.get(key));
@@ -556,15 +541,15 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
    * in one VM does not effect a region in a different VM that does
    * not have that key defined.
    */
-  public void testDistributedPutNoUpdate()
-    throws InterruptedException {
-
+  @Test
+  public void testDistributedPutNoUpdate() throws Exception {
     assertTrue(getRegionAttributes().getScope().isDistributed());
 
     final String name = this.getUniqueName();
 
     SerializableRunnable create =
       new CacheSerializableRunnable("Create Region") {
+          @Override
           public void run2() throws CacheException {
             createRegion(name);
           }
@@ -583,6 +568,7 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
     final Object value = "VALUE";
 
     vm0.invoke(new CacheSerializableRunnable("Put key/value") {
+        @Override
         public void run2() throws CacheException {
           Region region =
             getRootRegion().getSubregion(name);
@@ -593,6 +579,7 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
     Thread.sleep(250);
 
     vm1.invoke(new CacheSerializableRunnable("Verify no update") {
+        @Override
         public void run2() throws CacheException {
           Region region = getRootRegion().getSubregion(name);
           Region.Entry entry = region.getEntry(key);
@@ -612,7 +599,8 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
    * VM defines that entry.  The first VM updates the entry.  The
    * second VM should see the updated value.
    */
-  public void testDefinedEntryUpdated() {
+  @Test
+  public void testDefinedEntryUpdated() throws Exception {
     final String name = this.getUniqueName();
     final Object key = "KEY";
     final Object oldValue = "OLD_VALUE";
@@ -624,6 +612,7 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
 
     SerializableRunnable create =
       new CacheSerializableRunnable("Create Region") {
+          @Override
           public void run2() throws CacheException {
             createRegion(name);
           }
@@ -633,6 +622,7 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
     vm1.invoke(create);
 
     vm0.invoke(new CacheSerializableRunnable("Create and populate") {
+        @Override
         public void run2() throws CacheException {
           Region region =
             getRootRegion().getSubregion(name);
@@ -640,6 +630,7 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
         }
       });
     vm1.invoke(new CacheSerializableRunnable("Define entry") {
+        @Override
         public void run2() throws CacheException {
           Region region =
             getRootRegion().getSubregion(name);
@@ -648,6 +639,7 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
         }
       });
     vm0.invoke(new CacheSerializableRunnable("Update entry") {
+        @Override
         public void run2() throws CacheException {
           Region region =
             getRootRegion().getSubregion(name);
@@ -655,6 +647,7 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
         }
       });
     Invoke.invokeRepeatingIfNecessary(vm1, new CacheSerializableRunnable("Get entry") {
+        @Override
         public void run2() throws CacheException {
           Region region =
             getRootRegion().getSubregion(name);
@@ -668,13 +661,15 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
    * Tests that {@linkplain Region#destroy destroying} an entry is
    * propagated to all VMs that define that entry.
    */
-  public void testDistributedDestroy() throws InterruptedException {
+  @Test
+  public void testDistributedDestroy() throws Exception {
     assertTrue(getRegionAttributes().getScope().isDistributed());
 
     final String name = this.getUniqueName();
 
     SerializableRunnable create =
       new CacheSerializableRunnable("Create Region") {
+          @Override
           public void run2() throws CacheException {
 //DebuggerSupport.waitForJavaDebugger(getLogWriter(), " about to create region");
             Region region = createRegion(name);
@@ -699,6 +694,7 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
 
     SerializableRunnable put =
       new CacheSerializableRunnable("Put key/value") {
+          @Override
           public void run2() throws CacheException {
 //DebuggerSupport.waitForJavaDebugger(getLogWriter(), " about to put");
             Region region =
@@ -716,6 +712,7 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
 
     SerializableRunnable verifyPut =
       new CacheSerializableRunnable("Verify Put") {
+          @Override
           public void run2() throws CacheException {
             Region root = getRootRegion();
             assertTrue(!root.isDestroyed());
@@ -731,6 +728,7 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
     vm2.invoke(verifyPut);
 
     vm0.invoke(new CacheSerializableRunnable("Destroy Entry") {
+        @Override
         public void run2() throws CacheException {
           Region region =
             getRootRegion().getSubregion(name);
@@ -741,6 +739,7 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
 
     CacheSerializableRunnable verifyDestroy =
       new CacheSerializableRunnable("Verify entry destruction") {
+          @Override
           public void run2() throws CacheException {
             Region root = getRootRegion();
             assertTrue(!root.isDestroyed());
@@ -758,15 +757,15 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
    * Tests that {@linkplain Region#destroy destroying} a region is
    * propagated to all VMs that define that region.
    */
-  public void testDistributedRegionDestroy()
-    throws InterruptedException {
-
+  @Test
+  public void testDistributedRegionDestroy() throws Exception {
     assertTrue(getRegionAttributes().getScope().isDistributed());
 
     final String name = this.getUniqueName();
 
     SerializableRunnable create =
       new CacheSerializableRunnable("Create Region") {
+          @Override
           public void run2() throws CacheException {
             createRegion(name);
           }
@@ -778,6 +777,7 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
     VM vm0 = host.getVM(0);
 
     vm0.invoke(new CacheSerializableRunnable("Destroy Region") {
+        @Override
         public void run2() throws CacheException {
           Region region =
             getRootRegion().getSubregion(name);
@@ -787,11 +787,14 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
       });
 
     Invoke.invokeInEveryVM(new CacheSerializableRunnable("Verify region destruction") {
+      @Override
       public void run2() throws CacheException {
         WaitCriterion ev = new WaitCriterion() {
+          @Override
           public boolean done() {
             return getRootRegion().getSubregion(name) == null;
           }
+          @Override
           public String description() {
             return "Waiting for region " + name + " to be destroyed";
           }
@@ -807,10 +810,10 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
    * Tests that a {@linkplain Region#localDestroy} does not effect
    * other VMs that define that entry.
    */
-  public void testLocalDestroy() throws InterruptedException {
-    if (!supportsLocalDestroyAndLocalInvalidate()) {
-      return;
-    }
+  @Test
+  public void testLocalDestroy() throws Exception {
+    assumeTrue(supportsLocalDestroyAndLocalInvalidate());
+
     // test not valid for persistBackup region since they have to be
     // mirrored KEYS_VALUES
     if (getRegionAttributes().getDataPolicy().withPersistence()) return;
@@ -821,6 +824,7 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
 
     SerializableRunnable create =
       new CacheSerializableRunnable("Create Region") {
+          @Override
           public void run2() throws CacheException {
             createRegion(name);
           }
@@ -840,6 +844,7 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
 
     SerializableRunnable put =
       new CacheSerializableRunnable("Put key/value") {
+          @Override
           public void run2() throws CacheException {
             Region region =
               getRootRegion().getSubregion(name);
@@ -853,6 +858,7 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
     Thread.sleep(250);
 
     vm0.invoke(new CacheSerializableRunnable("Local Destroy Entry") {
+        @Override
         public void run2() throws CacheException {
           Region region =
             getRootRegion().getSubregion(name);
@@ -864,6 +870,7 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
 
     SerializableRunnable verify =
       new CacheSerializableRunnable("Verify entry existence") {
+          @Override
           public void run2() throws CacheException {
             Region region = getRootRegion().getSubregion(name);
             assertNotNull(region.getEntry(key));
@@ -876,15 +883,15 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
    * Tests that a {@link Region#localDestroyRegion} is not propagated
    * to other VMs that define that region.
    */
-  public void testLocalRegionDestroy()
-    throws InterruptedException {
-
+  @Test
+  public void testLocalRegionDestroy() throws Exception {
     assertTrue(getRegionAttributes().getScope().isDistributed());
 
     final String name = this.getUniqueName();
 
     SerializableRunnable create =
       new CacheSerializableRunnable("Create Region") {
+          @Override
           public void run2() throws CacheException {
             createRegion(name);
           }
@@ -900,6 +907,7 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
     Thread.sleep(250);
 
     vm0.invoke(new CacheSerializableRunnable("Local Destroy Region") {
+        @Override
         public void run2() throws CacheException {
           Region region =
             getRootRegion().getSubregion(name);
@@ -911,6 +919,7 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
 
     SerializableRunnable verify =
       new CacheSerializableRunnable("Verify region existence") {
+          @Override
           public void run2() throws CacheException {
             Region region =
               getRootRegion().getSubregion(name);
@@ -924,13 +933,15 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
    * Tests that {@linkplain Region#invalidate invalidating} an entry is
    * propagated to all VMs that define that entry.
    */
-  public void testDistributedInvalidate() {
+  @Test
+  public void testDistributedInvalidate() throws Exception {
     assertTrue(getRegionAttributes().getScope().isDistributed());
 
     final String name = this.getUniqueName();
 
     SerializableRunnable create =
       new CacheSerializableRunnable("Create Region") {
+          @Override
           public void run2() throws CacheException {
             createRegion(name);
           }
@@ -952,6 +963,7 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
 
     SerializableRunnable put =
       new CacheSerializableRunnable("Put key/value") {
+          @Override
           public void run2() throws CacheException {
             Region region =
               getRootRegion().getSubregion(name);
@@ -965,6 +977,7 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
     vm2.invoke(put);
 
     vm0.invoke(new CacheSerializableRunnable("Invalidate Entry") {
+        @Override
         public void run2() throws CacheException {
           Region region =
             getRootRegion().getSubregion(name);
@@ -975,6 +988,7 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
 
     CacheSerializableRunnable verify =
       new CacheSerializableRunnable("Verify entry invalidation") {
+          @Override
           public void run2() throws CacheException {
             Region region =
               getRootRegion().getSubregion(name);
@@ -999,7 +1013,8 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
    * Tests that {@linkplain Region#invalidate invalidating} an entry
    * in multiple VMs does not cause any problems.
    */
-  public void testDistributedInvalidate4() throws InterruptedException {
+  @Test
+  public void testDistributedInvalidate4() throws Exception {
     assertTrue(getRegionAttributes().getScope().isDistributed());
 
     final String name = this.getUniqueName();
@@ -1008,6 +1023,7 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
 
     SerializableRunnable create =
       new CacheSerializableRunnable("Create Region") {
+          @Override
           public void run2() throws CacheException {
             createRegion(name);
           }
@@ -1022,6 +1038,7 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
 
     SerializableRunnable put =
         new CacheSerializableRunnable("put entry") {
+            @Override
             public void run2() throws CacheException {
               Region region =
                   getRootRegion().getSubregion(name);
@@ -1037,6 +1054,7 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
 
       SerializableRunnable invalidate =
       new CacheSerializableRunnable("Invalidate Entry") {
+        @Override
         public void run2() throws CacheException {
           Region region =
             getRootRegion().getSubregion(name);
@@ -1052,6 +1070,7 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
 
     SerializableRunnable verify =
       new CacheSerializableRunnable("Verify entry invalidation") {
+          @Override
           public void run2() throws CacheException {
             Region region =
               getRootRegion().getSubregion(name);
@@ -1071,17 +1090,17 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
    * Tests that {@linkplain Region#invalidateRegion invalidating} a
    * region is propagated to all VMs that define that entry.
    */
-  public void testDistributedRegionInvalidate()
-    throws InterruptedException {
-    if (!supportsSubregions()) {
-      return;
-    }
+  @Test
+  public void testDistributedRegionInvalidate() throws Exception {
+    assumeTrue(supportsSubregions());
+
     final String name = this.getUniqueName();
     final String subname = "sub";
     final boolean useSubs = getRegionAttributes().getPartitionAttributes() == null;
 
     SerializableRunnable create =
       new CacheSerializableRunnable("Create Region") {
+          @Override
           public void run2() throws CacheException {
             Region region;
             region = createRegion(name);
@@ -1100,6 +1119,7 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
 
     SerializableRunnable put =
       new CacheSerializableRunnable("Put key/value") {
+          @Override
           public void run2() throws CacheException {
             Region region =
               getRootRegion().getSubregion(name);
@@ -1122,6 +1142,7 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
     VM vm0 = host.getVM(0);
 
     vm0.invoke(new CacheSerializableRunnable("Invalidate Region") {
+        @Override
         public void run2() throws CacheException {
           Region region =
             getRootRegion().getSubregion(name);
@@ -1131,6 +1152,7 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
 
     CacheSerializableRunnable verify =
       new CacheSerializableRunnable("Verify region invalidation") {
+          @Override
           public void run2() throws CacheException {
             Region region =
               getRootRegion().getSubregion(name);
@@ -1165,7 +1187,8 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
    * Tests that a {@link CacheListener} is invoked in a remote VM.
    */
   @Category(FlakyTest.class) // GEODE-153 & GEODE-932: time sensitive, waitForInvocation (waitForCriterion), 3 second timeouts
-  public void testRemoteCacheListener() throws InterruptedException {
+  @Test
+  public void testRemoteCacheListener() throws Exception {
     assertTrue(getRegionAttributes().getScope().isDistributed());
 
     final String name = this.getUniqueName();
@@ -1177,6 +1200,7 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
 
     SerializableRunnable populate =
       new CacheSerializableRunnable("Create Region and Put") {
+          @Override
           public void run2() throws CacheException {
             Region region = createRegion(name);
             region.put(key, oldValue);
@@ -1191,10 +1215,12 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
     vm1.invoke(populate);
 
     vm1.invoke(new CacheSerializableRunnable("Set listener") {
+        @Override
         public void run2() throws CacheException {
           final Region region =
             getRootRegion().getSubregion(name);
           listener = new TestCacheListener() {
+              @Override
               public void afterUpdate2(EntryEvent event) {
                 assertEquals(Operation.UPDATE, event.getOperation());
                 assertEquals(region, event.getRegion());
@@ -1219,7 +1245,7 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
                 try {
                   assertEquals(newValue, DataSerializer.readObject(dis));
                 } catch (Exception e) {
-                  com.gemstone.gemfire.test.dunit.Assert.fail("Unexpected Exception", e);
+                  fail("Unexpected Exception", e);
                 }
               }
             };
@@ -1238,6 +1264,7 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
     // If needed then do a flushIfNecessary(region) after adding the cache listener
 
     vm0.invoke(new CacheSerializableRunnable("Update") {
+        @Override
         public void run2() throws CacheException {
           Region region =
             getRootRegion().getSubregion(name);
@@ -1246,6 +1273,7 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
       });
 
     vm1.invoke(new CacheSerializableRunnable("Verify Update") {
+        @Override
         public void run2() throws CacheException {
           listener.waitForInvocation(3000, 10);
 
@@ -1253,6 +1281,7 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
           final Region region =
             getRootRegion().getSubregion(name);
           listener = new TestCacheListener() {
+              @Override
               public void afterInvalidate2(EntryEvent event) {
                 assertEquals(Operation.INVALIDATE, event.getOperation());
                 assertEquals(region, event.getRegion());
@@ -1272,7 +1301,7 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
                 try {
                   assertEquals(newValue, DataSerializer.readObject(dis));
                 } catch (Exception e) {
-                  com.gemstone.gemfire.test.dunit.Assert.fail("Unexpected Exception", e);
+                  fail("Unexpected Exception", e);
                 }
               }
             };
@@ -1281,6 +1310,7 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
       });
 
     vm0.invoke(new CacheSerializableRunnable("Invalidate") {
+        @Override
         public void run2() throws CacheException {
           Region region =
             getRootRegion().getSubregion(name);
@@ -1289,6 +1319,7 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
       });
 
     vm1.invoke(new CacheSerializableRunnable("Verify Invalidate") {
+        @Override
         public void run2() throws CacheException {
           listener.waitForInvocation(3000, 10);
 
@@ -1296,6 +1327,7 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
           final Region region =
             getRootRegion().getSubregion(name);
           listener = new TestCacheListener() {
+              @Override
               public void afterDestroy2(EntryEvent event) {
                 assertTrue(event.getOperation().isDestroy());
                 assertEquals(region, event.getRegion());
@@ -1319,6 +1351,7 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
       });
 
     vm0.invoke(new CacheSerializableRunnable("Destroy") {
+        @Override
         public void run2() throws CacheException {
           Region region =
             getRootRegion().getSubregion(name);
@@ -1327,6 +1360,7 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
       });
 
     vm1.invoke(new CacheSerializableRunnable("Verify Destroy") {
+        @Override
         public void run2() throws CacheException {
           listener.waitForInvocation(3000, 10);
 
@@ -1334,6 +1368,7 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
           final Region region =
             getRootRegion().getSubregion(name);
           listener = new TestCacheListener() {
+              @Override
               public void afterRegionInvalidate2(RegionEvent event) {
                 assertEquals(Operation.REGION_INVALIDATE, event.getOperation());
                 assertEquals(region, event.getRegion());
@@ -1348,6 +1383,7 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
       });
 
     vm0.invoke(new CacheSerializableRunnable("Invalidate Region") {
+        @Override
         public void run2() throws CacheException {
           Region region =
             getRootRegion().getSubregion(name);
@@ -1356,6 +1392,7 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
       });
 
     vm1.invoke(new CacheSerializableRunnable("Verify Invalidate Region") {
+        @Override
         public void run2() throws CacheException {
           listener.waitForInvocation(3000, 10);
 
@@ -1363,6 +1400,7 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
           final Region region =
             getRootRegion().getSubregion(name);
           listener = new TestCacheListener() {
+              @Override
               public void afterRegionDestroy2(RegionEvent event) {
                 assertEquals(Operation.REGION_DESTROY, event.getOperation());
                 assertEquals(region, event.getRegion());
@@ -1377,6 +1415,7 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
       });
 
     vm0.invoke(new CacheSerializableRunnable("Destroy Region") {
+        @Override
         public void run2() throws CacheException {
           Region region =
             getRootRegion().getSubregion(name);
@@ -1385,26 +1424,27 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
       });
 
     vm1.invoke(new CacheSerializableRunnable("Verify Destroy Region") {
+        @Override
         public void run2() throws CacheException {
           listener.waitForInvocation(3000, 10);
         }
       });
   }
 
-
   /**
    * Tests that a {@link CacheListener} is invoked in a remote VM.
    */
-  public void testRemoteCacheListenerInSubregion() throws InterruptedException {
-    if (!supportsSubregions()) {
-      return;
-    }
+  @Test
+  public void testRemoteCacheListenerInSubregion() throws Exception {
+    assumeTrue(supportsSubregions());
+
     assertTrue(getRegionAttributes().getScope().isDistributed());
 
     final String name = this.getUniqueName();
 
     SerializableRunnable create =
       new CacheSerializableRunnable("Create Region") {
+          @Override
           public void run2() throws CacheException {
             createRegion(name);
           }
@@ -1415,6 +1455,7 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
     final VM vm1 = host.getVM(1);
 
     vm0.invoke(new CacheSerializableRunnable("Create Root") {
+      @Override
       public void run2() throws CacheException {
         createRootRegion();
       }
@@ -1423,10 +1464,12 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
     vm1.invoke(create);
 
     vm1.invoke(new CacheSerializableRunnable("Set listener") {
+        @Override
         public void run2() throws CacheException {
           final Region region =
             getRootRegion().getSubregion(name);
           listener = new TestCacheListener() {
+              @Override
               public void afterRegionInvalidate2(RegionEvent event) {
                 assertEquals(Operation.REGION_INVALIDATE, event.getOperation());
                 assertEquals(region, event.getRegion());
@@ -1441,12 +1484,14 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
       });
 
     vm0.invoke(new CacheSerializableRunnable("Invalidate Root Region") {
+        @Override
         public void run2() throws CacheException {
           getRootRegion().invalidateRegion(getSystem().getDistributedMember());
         }
       });
 
     vm1.invoke(new CacheSerializableRunnable("Verify Invalidate Region") {
+        @Override
         public void run2() throws CacheException {
           listener.waitForInvocation(3000, 10);
 
@@ -1454,6 +1499,7 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
           final Region region =
             getRootRegion().getSubregion(name);
           listener = new TestCacheListener() {
+              @Override
               public void afterRegionDestroy2(RegionEvent event) {
                 assertEquals(Operation.REGION_DESTROY, event.getOperation());
                 assertEquals(region, event.getRegion());
@@ -1468,12 +1514,14 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
       });
 
     vm0.invoke(new CacheSerializableRunnable("Destroy Root Region") {
+        @Override
         public void run2() throws CacheException {
           getRootRegion().destroyRegion(getSystem().getDistributedMember());
         }
       });
 
     vm1.invoke(new CacheSerializableRunnable("Verify Destroy Region") {
+        @Override
         public void run2() throws CacheException {
           listener.waitForInvocation(3000, 10);
         }
@@ -1493,10 +1541,10 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
    * Tests that a {@link CacheLoader} is invoked in a remote VM.  This
    * essentially tests <code>netLoad</code>.
    */
-  public void testRemoteCacheLoader() throws InterruptedException {
-    if (!supportsNetLoad()) {
-      return;
-    }
+  @Test
+  public void testRemoteCacheLoader() throws Exception {
+    assumeTrue(supportsNetLoad());
+
     assertTrue(getRegionAttributes().getScope().isDistributed());
 
     final String name = this.getUniqueName();
@@ -1505,6 +1553,7 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
 
     SerializableRunnable create =
       new CacheSerializableRunnable("Create Region") {
+          @Override
           public void run2() throws CacheException {
             createRegion(name);
           }
@@ -1520,10 +1569,12 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
 
 
     vm1.invoke(new CacheSerializableRunnable("Set CacheLoader") {
+        @Override
         public void run2() throws CacheException {
           final Region region =
             getRootRegion().getSubregion(name);
           loader = new TestCacheLoader() {
+              @Override
               public Object load2(LoaderHelper helper)
                 throws CacheLoaderException {
                 assertEquals(region, helper.getRegion());
@@ -1538,6 +1589,7 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
       });
 
     vm0.invoke(new CacheSerializableRunnable("Remote load") {
+        @Override
         public void run2() throws CacheException {
           Region region =
             getRootRegion().getSubregion(name);
@@ -1546,6 +1598,7 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
       });
 
     vm1.invoke(new SerializableRunnable("Verify loader") {
+        @Override
         public void run() {
           assertTrue(loader.wasInvoked());
         }
@@ -1556,10 +1609,10 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
    * Tests that the parameter passed to a remote {@link CacheLoader}
    * is actually passed.
    */
-  public void testRemoteCacheLoaderArg() throws InterruptedException {
-    if (!supportsNetLoad()) {
-      return;
-    }
+  @Test
+  public void testRemoteCacheLoaderArg() throws Exception {
+    assumeTrue(supportsNetLoad());
+
     assertTrue(getRegionAttributes().getScope().isDistributed());
 
     final String name = this.getUniqueName();
@@ -1569,6 +1622,7 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
 
     SerializableRunnable create =
       new CacheSerializableRunnable("Create Region") {
+          @Override
           public void run2() throws CacheException {
             createRegion(name);
             // Can't test non-Serializable callback argument here
@@ -1587,10 +1641,12 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
     vm1.invoke(create);
 
     vm1.invoke(new CacheSerializableRunnable("Set CacheLoader") {
+        @Override
         public void run2() throws CacheException {
           final Region region =
             getRootRegion().getSubregion(name);
           loader = new TestCacheLoader() {
+              @Override
               public Object load2(LoaderHelper helper)
                 throws CacheLoaderException {
                 assertEquals(region, helper.getRegion());
@@ -1606,6 +1662,7 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
       });
 
     vm0.invoke(new CacheSerializableRunnable("Remote load") {
+        @Override
         public void run2() throws CacheException {
           Region region =
             getRootRegion().getSubregion(name);
@@ -1627,6 +1684,7 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
       });
 
     vm1.invoke(new SerializableRunnable("Verify loader") {
+        @Override
         public void run() {
           assertTrue(loader.wasInvoked());
         }
@@ -1637,24 +1695,23 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
    * Tests that a remote {@link CacheLoader} that throws a {@link
    * CacheLoaderException} results is propagated back to the caller.
    */
-  public void testRemoteCacheLoaderException() throws InterruptedException {
-    if (!supportsNetLoad()) {
-      return;
-    }
+  @Test
+  public void testRemoteCacheLoaderException() throws Exception {
+    assumeTrue(supportsNetLoad());
+
     assertTrue(getRegionAttributes().getScope().isDistributed());
 
     final String name = this.getUniqueName();
     final Object key = "KEY";
-//    final Object value = "VALUE";
 
     SerializableRunnable create =
       new CacheSerializableRunnable("Create Region") {
+          @Override
           public void run2() throws CacheException {
             createRegion(name);
           }
         };
 
-
     Host host = Host.getHost(0);
     VM vm0 = host.getVM(0);
     VM vm1 = host.getVM(1);
@@ -1663,10 +1720,12 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
     vm1.invoke(create);
 
     vm1.invoke(new CacheSerializableRunnable("Set CacheLoader") {
+        @Override
         public void run2() throws CacheException {
           final Region region =
             getRootRegion().getSubregion(name);
           loader = new TestCacheLoader() {
+              @Override
               public Object load2(LoaderHelper helper)
                 throws CacheLoaderException {
                 assertEquals(region, helper.getRegion());
@@ -1683,6 +1742,7 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
       });
 
     vm0.invoke(new CacheSerializableRunnable("Remote load") {
+        @Override
         public void run2() throws CacheException {
           Region region =
             getRootRegion().getSubregion(name);
@@ -1697,23 +1757,21 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
       });
 
     vm1.invoke(new SerializableRunnable("Verify loader") {
+        @Override
         public void run() {
           assertTrue(loader.wasInvoked());
         }
       });
   }
 
+  @Test
+  public void testCacheLoaderWithNetSearch() throws Exception {
+    assumeTrue(supportsNetLoad());
 
-  public void testCacheLoaderWithNetSearch() throws CacheException {
-    if (!supportsNetLoad()) {
-      return;
-    }
     // some tests use mirroring by default (e.g. persistBackup regions)
     // if so, then this test won't work right
-    if (getRegionAttributes().getDataPolicy().withReplication()
-        || getRegionAttributes().getDataPolicy().isPreloaded()) {
-      return;
-    }
+    assumeFalse(getRegionAttributes().getDataPolicy().withReplication());
+    assumeFalse(getRegionAttributes().getDataPolicy().isPreloaded());
 
     final String name = this.getUniqueName();
     final Object key = this.getUniqueName();
@@ -1723,20 +1781,8 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
     // use vm on other gemfire system
     VM vm1 = host.getVM(1);
     vm1.invoke(new CacheSerializableRunnable("set remote value") {
+      @Override
       public void run2() throws CacheException {
-//        final TestCacheLoader remoteloader = new TestCacheLoader() {
-//            public Object load2(LoaderHelper helper)
-//              throws CacheLoaderException {
-//
-//              assertIndexDetailsEquals(key, helper.getKey());
-//              assertIndexDetailsEquals(name, helper.getRegion().getName());
-//              return value;
-//            }
-//          };
-//
-//        AttributesFactory factory =
-//          new AttributesFactory(getRegionAttributes());
-//        factory.setCacheLoader(remoteloader);
         Region rgn = createRegion(name);
         rgn.put(key, value);
         flushIfNecessary(rgn);
@@ -1744,6 +1790,7 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
     });
 
     final TestCacheLoader loader1 = new TestCacheLoader() {
+        @Override
         public Object load2(LoaderHelper helper)
           throws CacheLoaderException {
 
@@ -1756,7 +1803,7 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
             assertEquals(value, result);
             return result;
           } catch (TimeoutException ex) {
-            com.gemstone.gemfire.test.dunit.Assert.fail("Why did I time out?", ex);
+            fail("Why did I time out?", ex);
           }
           return null;
         }
@@ -1779,13 +1826,13 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
 
     // make sure value is still there in vm1
     vm1.invoke(new CacheSerializableRunnable("verify remote value") {
+      @Override
       public void run2() throws CacheException {
         Region rgn = getRootRegion().getSubregion(name);
         assertEquals(value, rgn.getEntry(key).getValue());
       }
     });
 
-//    com.gemstone.gemfire.internal.util.DebuggerSupport.waitForJavaDebugger(getLogWriter());
     assertEquals(value, region.get(key));
     // if global scope, then a netSearch is done BEFORE the loader is invoked,
     // so we get the value but the loader is never invoked.
@@ -1798,18 +1845,13 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
     assertEquals(value, region.getEntry(key).getValue());
   }
 
-
-  public void testCacheLoaderWithNetLoad() throws CacheException {
-
-
+  @Test
+  public void testCacheLoaderWithNetLoad() throws Exception {
     // replicated regions and partitioned regions make no sense for this
     // test
-    if (getRegionAttributes().getDataPolicy().withReplication() ||
-        getRegionAttributes().getDataPolicy().isPreloaded() ||
-        getRegionAttributes().getPartitionAttributes() != null)
-    {
-      return;
-    }
+    assumeFalse(getRegionAttributes().getDataPolicy().withReplication());
+    assumeFalse(getRegionAttributes().getDataPolicy().isPreloaded());
+    assumeTrue(getRegionAttributes().getPartitionAttributes() == null);
 
     final String name = this.getUniqueName();
     final Object key = this.getUniqueName();
@@ -1819,8 +1861,10 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
     // use vm on other gemfire system
     VM vm1 = host.getVM(1);
     vm1.invoke(new CacheSerializableRunnable("set up remote loader") {
+      @Override
       public void run2() throws CacheException {
         final TestCacheLoader remoteloader = new TestCacheLoader() {
+            @Override
             public Object load2(LoaderHelper helper)
               throws CacheLoaderException {
 
@@ -1838,6 +1882,7 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
     });
 
     final TestCacheLoader loader1 = new TestCacheLoader() {
+        @Override
         public Object load2(LoaderHelper helper)
           throws CacheLoaderException {
 
@@ -1850,7 +1895,7 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
             assertEquals(value, result);
             return result;
           } catch (TimeoutException ex) {
-            com.gemstone.gemfire.test.dunit.Assert.fail("Why did I time out?", ex);
+            fail("Why did I time out?", ex);
           }
           return null;
         }
@@ -1871,7 +1916,6 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
     assertNotNull(entry);
     assertNull(entry.getValue());
 
-//    com.gemstone.gemfire.internal.util.DebuggerSupport.waitForJavaDebugger(getLogWriter());
     assertEquals(value, region.get(key));
 
     assertTrue(loader1.wasInvoked());
@@ -1883,15 +1927,16 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
    * Tests that {@link Region#get} returns <code>null</code> when
    * there is no remote loader.
    */
-  public void testNoRemoteCacheLoader() throws InterruptedException {
+  @Test
+  public void testNoRemoteCacheLoader() throws Exception {
     assertTrue(getRegionAttributes().getScope().isDistributed());
 
     final String name = this.getUniqueName();
     final Object key = "KEY";
-//    final Object value = "VALUE";
 
     SerializableRunnable create =
       new CacheSerializableRunnable("Create Region") {
+          @Override
           public void run2() throws CacheException {
             createRegion(name);
           }
@@ -1904,6 +1949,7 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
     vm1.invoke(create);
 
     vm0.invoke(new CacheSerializableRunnable("Remote load") {
+        @Override
         public void run2() throws CacheException {
           Region region =
             getRootRegion().getSubregion(name);
@@ -1917,19 +1963,21 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
    * the remote region has an invalid entry (that is, a key, but no
    * value).
    */
-  public void testNoLoaderWithInvalidEntry() {
-    if (!supportsNetLoad()) {
-      return;
-    }
+  @Test
+  public void testNoLoaderWithInvalidEntry() throws Exception {
+    assumeTrue(supportsNetLoad());
+
     final String name = this.getUniqueName();
     final Object key = "KEY";
     final Object value = "VALUE";
 
     SerializableRunnable create =
       new CacheSerializableRunnable("Create Region") {
+          @Override
           public void run2() throws CacheException {
             Region region = createRegion(name);
             loader = new TestCacheLoader() {
+                @Override
                 public Object load2(LoaderHelper helper)
                   throws CacheLoaderException {
 
@@ -1949,6 +1997,7 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
     vm1.invoke(create);
 
     vm1.invoke(new CacheSerializableRunnable("Create invalid entry") {
+      @Override
       public void run2() throws CacheException {
         Region region =
           getRootRegion().getSubregion(name);
@@ -1957,16 +2006,17 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
       });
 
     vm0.invoke(new CacheSerializableRunnable("Remote get") {
+        @Override
         public void run2() throws CacheException {
           Region region =
             getRootRegion().getSubregion(name);
-// DebuggerSupport.waitForJavaDebugger(getLogWriter());
           assertEquals(value, region.get(key));
           assertTrue(loader.wasInvoked());
         }
       });
 
     vm1.invoke(new SerializableRunnable("Verify loader") {
+        @Override
         public void run() {
           assertFalse(loader.wasInvoked());
         }
@@ -1978,7 +2028,8 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
    * <code>CacheWriter</code> arguments and {@link
    * CacheWriterException}s are propagated appropriately.
    */
-  public void testRemoteCacheWriter() throws InterruptedException {
+  @Test
+  public void testRemoteCacheWriter() throws Exception {
     assertTrue(getRegionAttributes().getScope().isDistributed());
 
     final String name = this.getUniqueName();
@@ -1993,6 +2044,7 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
 
     SerializableRunnable create =
       new CacheSerializableRunnable("Create Region") {
+          @Override
           public void run2() throws CacheException {
             Region region = createRegion(name);
 
@@ -2023,10 +2075,12 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
     ////////  Create
 
     vm1.invoke(new CacheSerializableRunnable("Set Writer") {
+        @Override
         public void run2() throws CacheException {
           final Region region =
             getRootRegion().getSubregion(name);
           writer = new TestCacheWriter() {
+              @Override
               public void beforeCreate2(EntryEvent event)
                 throws CacheWriterException {
 
@@ -2056,6 +2110,7 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
       });
 
     vm0.invoke(new CacheSerializableRunnable("Create with Exception") {
+        @Override
         public void run2() throws CacheException {
           Region region =
             getRootRegion().getSubregion(name);
@@ -2076,12 +2131,14 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
       });
 
     vm1.invoke(new SerializableRunnable("Verify callback") {
+        @Override
         public void run() {
           assertTrue(writer.wasInvoked());
         }
       });
 
     vm0.invoke(new CacheSerializableRunnable("Create with Argument") {
+        @Override
         public void run2() throws CacheException {
           Region region =
             getRootRegion().getSubregion(name);
@@ -2099,6 +2156,7 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
         }
       });
     vm1.invoke(new SerializableRunnable("Verify callback") {
+        @Override
         public void run() {
           assertTrue(writer.wasInvoked());
         }
@@ -2107,10 +2165,12 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
     ////////  Update
 
     vm1.invoke(new CacheSerializableRunnable("Set Writer") {
+        @Override
         public void run2() throws CacheException {
           final Region region =
             getRootRegion().getSubregion(name);
           writer = new TestCacheWriter() {
+              @Override
               public void beforeUpdate2(EntryEvent event)
                 throws CacheWriterException {
 
@@ -2142,6 +2202,7 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
       });
 
     vm0.invoke(new CacheSerializableRunnable("Update with Exception") {
+        @Override
         public void run2() throws CacheException {
           Region region =
             getRootRegion().getSubregion(name);
@@ -2166,12 +2227,14 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
         }
       });
     vm1.invoke(new SerializableRunnable("Verify callback") {
+        @Override
         public void run() {
           assertTrue(writer.wasInvoked());
         }
       });
 
     vm0.invoke(new CacheSerializableRunnable("Update with Argument") {
+        @Override
         public void run2() throws CacheException {
           Region region =
             getRootRegion().getSubregion(name);
@@ -2185,6 +2248,7 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
         }
       });
     vm1.invoke(new SerializableRunnable("Verify callback") {
+        @Override
         public void run() {
           assertTrue(writer.wasInvoked());
         }
@@ -2193,10 +2257,12 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
     ////////  Destroy
 
     vm1.invoke(new CacheSerializableRunnable("Set Writer") {
+        @Override
         public void run2() throws CacheException {
           final Region region =
             getRootRegion().getSubregion(name);
           writer = new TestCacheWriter() {
+              @Override
               public void beforeDestroy2(EntryEvent event)
                 throws CacheWriterException {
 
@@ -2227,6 +2293,7 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
       });
 
     vm0.invoke(new CacheSerializableRunnable("Destroy with Exception") {
+        @Override
         public void run2() throws CacheException {
           Region region =
             getRootRegion().getSubregion(name);
@@ -2246,12 +2313,14 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
         }
       });
     vm1.invoke(new SerializableRunnable("Verify callback") {
+        @Override
         public void run() {
           assertTrue(writer.wasInvoked());
         }
       });
 
     vm0.invoke(new CacheSerializableRunnable("Destroy with Argument") {
+        @Override
         public void run2() throws CacheException {
           Region region =
             getRootRegion().getSubregion(name);
@@ -2265,6 +2334,7 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
        }
       });
     vm1.invoke(new SerializableRunnable("Verify callback") {
+        @Override
         public void run() {
           assertTrue(writer.wasInvoked());
         }
@@ -2273,10 +2343,12 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
     ////////  Region Destroy
 
     vm1.invoke(new CacheSerializableRunnable("Set Writer") {
+        @Override
         public void run2() throws CacheException {
           final Region region =
             getRootRegion().getSubregion(name);
           writer = new TestCacheWriter() {
+              @Override
               public void beforeRegionDestroy2(RegionEvent event)
                 throws CacheWriterException {
 
@@ -2300,6 +2372,7 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
       });
 
     vm0.invoke(new CacheSerializableRunnable("Destroy with Exception") {
+        @Override
         public void run2() throws CacheException {
           Region region =
             getRootRegion().getSubregion(name);
@@ -2309,7 +2382,7 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
 
           } catch (CacheWriterException ex) {
             if (region.isDestroyed()) {
-              com.gemstone.gemfire.test.dunit.Assert.fail("should not have an exception if region is destroyed", ex);
+              fail("should not have an exception if region is destroyed", ex);
             }
             assertEquals(1, region.size());
             if (region.getAttributes().getOffHeap() && !(region instanceof PartitionedRegion)) {
@@ -2321,12 +2394,14 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
         }
       });
     vm1.invoke(new SerializableRunnable("Verify callback") {
+        @Override
         public void run() {
           assertTrue(writer.wasInvoked());
         }
       });
 
     vm0.invoke(new CacheSerializableRunnable("Destroy with Argument") {
+        @Override
         public void run2() throws CacheException {
           Region region =
             getRootRegion().getSubregion(name);
@@ -2341,9 +2416,11 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
             GemFireCacheImpl gfc = (GemFireCacheImpl) getCache();
             final MemoryAllocatorImpl ma = (MemoryAllocatorImpl) gfc.getOffHeapStore();
             WaitCriterion waitForStatChange = new WaitCriterion() {
+              @Override
               public boolean done() {
                 return ma.getStats().getObjects() == 0;
               }
+              @Override
               public String description() {
                 return "never saw off-heap object count go to zero. Last value was " + ma.getStats().getObjects();
               }
@@ -2353,6 +2430,7 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
         }
       });
     vm1.invoke(new SerializableRunnable("Verify callback") {
+        @Override
         public void run() {
           assertTrue(writer.wasInvoked());
         }
@@ -2363,9 +2441,8 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
    * Tests that, when given a choice, a local <code>CacheWriter</code>
    * is invoked instead of a remote one.
    */
-  public void testLocalAndRemoteCacheWriters()
-    throws InterruptedException {
-
+  @Test
+  public void testLocalAndRemoteCacheWriters() throws Exception {
     assertTrue(getRegionAttributes().getScope().isDistributed());
 
     final String name = this.getUniqueName();
@@ -2378,18 +2455,23 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
     VM vm1 = host.getVM(1);
 
     vm0.invoke(new CacheSerializableRunnable("Create \"Local\" Region") {
+        @Override
         public void run2() throws CacheException {
           Region region = createRegion(name);
           writer = new TestCacheWriter() {
+              @Override
               public void beforeUpdate2(EntryEvent event)
                 throws CacheWriterException { }
 
+              @Override
               public void beforeCreate2(EntryEvent event)
                 throws CacheWriterException { }
 
+              @Override
               public void beforeDestroy2(EntryEvent event)
                 throws CacheWriterException { }
 
+              @Override
               public void beforeRegionDestroy2(RegionEvent event)
                 throws CacheWriterException { }
           };
@@ -2398,6 +2480,7 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
       });
 
    SerializableRunnable create = new CacheSerializableRunnable("Create \"Local\" Region") {
+      @Override
       public void run2() throws CacheException {
         Region region = createRegion(name);
         writer = new TestCacheWriter() { };
@@ -2409,12 +2492,14 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
 
     SerializableRunnable verify = new
       SerializableRunnable("Verify no callback") {
+        @Override
         public void run() {
           assertFalse(writer.wasInvoked());
         }
       };
 
     vm0.invoke(new CacheSerializableRunnable("Create entry") {
+        @Override
         public void run2() throws CacheException {
           Region region =
             getRootRegion().getSubregion(name);
@@ -2425,6 +2510,7 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
     vm1.invoke(verify);
 
     vm0.invoke(new CacheSerializableRunnable("Update entry") {
+        @Override
         public void run2() throws CacheException {
           Region region =
             getRootRegion().getSubregion(name);
@@ -2435,6 +2521,7 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
     vm1.invoke(verify);
 
     vm0.invoke(new CacheSerializableRunnable("Destroy entry") {
+        @Override
         public void run2() throws CacheException {
           Region region =
             getRootRegion().getSubregion(name);
@@ -2445,6 +2532,7 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
     vm1.invoke(verify);
 
     vm0.invoke(new CacheSerializableRunnable("Destroy region") {
+        @Override
         public void run2() throws CacheException {
           Region region =
             getRootRegion().getSubregion(name);
@@ -2460,9 +2548,8 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
    * argument in place, the change is visible to the
    * <code>CacheWriter</code> even if it is in another VM.
    */
-  public void testCacheLoaderModifyingArgument()
-    throws InterruptedException {
-
+  @Test
+  public void testCacheLoaderModifyingArgument() throws Exception {
     assertTrue(getRegionAttributes().getScope().isDistributed());
 
     final String name = this.getUniqueName();
@@ -2473,6 +2560,7 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
 
     SerializableRunnable create =
       new CacheSerializableRunnable("Create Region") {
+          @Override
           public void run2() throws CacheException {
             createRegion(name);
           }
@@ -2487,10 +2575,12 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
     vm1.invoke(create);
 
     CacheSerializableRunnable setLoader = new CacheSerializableRunnable("Set CacheLoader") {
+      @Override
       public void run2() throws CacheException {
         final Region region =
           getRootRegion().getSubregion(name);
         loader = new TestCacheLoader() {
+            @Override
             public Object load2(LoaderHelper helper)
               throws CacheLoaderException {
 
@@ -2509,10 +2599,12 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
 
     // if  this is a partitioned region, we need the loader in both vms
     vm1.invoke(new CacheSerializableRunnable("Conditionally create second loader") {
+      @Override
       public void run2() throws CacheException {
         final Region region = getRootRegion().getSubregion(name);
         if (region.getAttributes().getPartitionAttributes() != null) {
           loader = new TestCacheLoader() {
+            @Override
             public Object load2(LoaderHelper helper)
               throws CacheLoaderException {
 
@@ -2528,9 +2620,11 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
     });
 
     vm1.invoke(new CacheSerializableRunnable("Set CacheWriter") {
+        @Override
         public void run2() throws CacheException {
           final Region region = getRootRegion().getSubregion(name);
           writer = new TestCacheWriter() {
+              @Override
               public void beforeCreate2(EntryEvent event)
                 throws CacheWriterException {
 
@@ -2544,6 +2638,7 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
       });
 
     vm0.invoke(new CacheSerializableRunnable("Create entry") {
+        @Override
         public void run2() throws CacheException {
           Region region =
             getRootRegion().getSubregion(name);
@@ -2555,24 +2650,21 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
       });
 
     vm1.invoke(new CacheSerializableRunnable("Validate callback") {
+        @Override
         public void run2() throws CacheException {
-//          if (getRootRegion().getSubregion(name).getAttributes()
-//              .getPartitionAttributes() == null) { // bug 36500 - remove check when fixed
-            assertTrue(writer.wasInvoked());
-//          }
+          assertTrue(writer.wasInvoked());
         }
       });
   }
 
-
   /**
    * Tests that invoking <code>netSearch</code> in a remote loader
    * returns <code>null</code> instead of causing infinite recursion.
    */
-  public void testRemoteLoaderNetSearch() throws CacheException {
-    if (!supportsNetLoad()) {
-      return;
-    }
+  @Test
+  public void testRemoteLoaderNetSearch() throws Exception {
+    assumeTrue(supportsNetLoad());
+
     assertTrue(getRegionAttributes().getScope().isDistributed());
 
     final String name = this.getUniqueName();
@@ -2584,6 +2676,7 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
     VM vm1 = host.getVM(1);
 
     SerializableRunnable create = new CacheSerializableRunnable("Get value") {
+        @Override
         public void run2() throws CacheException {
           Region region = createRegion(name);
           assertEquals(value, region.get(key));
@@ -2592,10 +2685,12 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
 
 
     vm0.invoke(new CacheSerializableRunnable("Create Region") {
+        @Override
         public void run2() throws CacheException {
           Region region = createRegion(name);
           region.getAttributesMutator().setCacheLoader(new
             TestCacheLoader() {
+              @Override
               public Object load2(LoaderHelper helper)
                 throws CacheLoaderException {
 
@@ -2603,7 +2698,7 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
                   assertNull(helper.netSearch(true));
 
                 } catch (TimeoutException ex) {
-                  com.gemstone.gemfire.test.dunit.Assert.fail("Why did I time out?", ex);
+                  fail("Why did I time out?", ex);
                 }
                 return value;
               }
@@ -2617,7 +2712,8 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
   /**
    * Tests that a local loader is preferred to a remote one
    */
-  public void testLocalCacheLoader() {
+  @Test
+  public void testLocalCacheLoader() throws Exception {
     final String name = this.getUniqueName();
     final Object key = "KEY";
     final Object value = "VALUE";
@@ -2627,9 +2723,11 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
     VM vm1 = host.getVM(1);
 
     SerializableRunnable create = new CacheSerializableRunnable("Create \"remote\" region") {
+        @Override
         public void run2() throws CacheException {
           Region region = createRegion(name);
           loader = new TestCacheLoader() {
+              @Override
               public Object load2(LoaderHelper helper)
                 throws CacheLoaderException {
                 if (helper.getRegion().getAttributes().getPartitionAttributes() == null) {
@@ -2647,10 +2745,12 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
 
 
     vm0.invoke(new CacheSerializableRunnable("Create \"local\" region") {
+        @Override
         public void run2() throws CacheException {
           Region region = createRegion(name);
           region.getAttributesMutator().setCacheLoader(new
             TestCacheLoader() {
+              @Override
               public Object load2(LoaderHelper helper)
                 throws CacheLoaderException {
                 return value;
@@ -2663,6 +2763,7 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
 
 
     vm0.invoke(new CacheSerializableRunnable("Get") {
+        @Override
         public void run2() throws CacheException {
           Region region =
             getRootRegion().getSubregion(name);
@@ -2670,6 +2771,7 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
         }
       });
     vm1.invoke(new SerializableRunnable("Verify loader not invoked") {
+        @Override
         public void run() {
           assertFalse(loader.wasInvoked());
         }
@@ -2680,22 +2782,25 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
    * Tests that an entry update is propagated to other caches that
    * have that same entry defined.
    */
+  @Test
   public void testDistributedPut() throws Exception {
     final String rgnName = getUniqueName();
 
     SerializableRunnable create = new SerializableRunnable("testDistributedPut: Create Region") {
+      @Override
       public void run() {
         try {
           createRegion(rgnName);
           getSystem().getLogWriter().info("testDistributedPut: Created Region");
         }
         catch (CacheException e) {
-          com.gemstone.gemfire.test.dunit.Assert.fail("While creating region", e);
+          fail("While creating region", e);
         }
       }
     };
 
     SerializableRunnable newKey = new SerializableRunnable("testDistributedPut: Create Key") {
+      @Override
       public void run() {
         try {
           if (!getRegionAttributes().getDataPolicy().withReplication() &&
@@ -2707,7 +2812,7 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
          }
         }
         catch (CacheException e) {
-          com.gemstone.gemfire.test.dunit.Assert.fail("While creating region", e);
+          fail("While creating region", e);
         }
       }
     };
@@ -2738,6 +2843,7 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
       getSystem().getLogWriter().info("testDistributedPut: Put Value");
 
       Invoke.invokeInEveryVMRepeatingIfNecessary(new CacheSerializableRunnable("testDistributedPut: Verify Received Value") {
+        @Override
         public void run2() {
           Region rgn1 = getRootRegion().getSubregion(rgnName);
           assertNotNull("Could not find entry for 'key'", rgn1.getEntry("key"));
@@ -2868,11 +2974,9 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
    * Tests that keys and values are pushed with {@link
    * DataPolicy#REPLICATE}.
    */
-  public void testReplicate() throws InterruptedException {
-    if (!supportsReplication()) {
-      return;
-    }
-    //pauseIfNecessary(100); // wait for previous tearDown to complete
+  @Test
+  public void testReplicate() throws Exception {
+    assumeTrue(supportsReplication());
 
     final String name = this.getUniqueName();
     final Object key1 = "KEY1";
@@ -2892,6 +2996,7 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
 
     SerializableRunnable create = new
       CacheSerializableRunnable("Create Mirrored Region") {
+        @Override
         public void run2() throws CacheException {
           RegionAttributes ra = getRegionAttributes();
           AttributesFactory factory =
@@ -2909,6 +3014,7 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
     vm2.invoke(create);
 
     vm0.invoke(new CacheSerializableRunnable("Put data") {
+        @Override
         public void run2() throws CacheException {
           Region region =
             getRootRegion().getSubregion(name);
@@ -2920,6 +3026,7 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
       });
 
     Invoke.invokeRepeatingIfNecessary(vm2, new CacheSerializableRunnable("Wait for update") {
+      @Override
       public void run2() throws CacheException {
         Region region = getRootRegion().getSubregion(name);
         assertNotNull(region.getEntry(key1));
@@ -2931,6 +3038,7 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
     // Destroy the local entries so we know that they are not found by
     // a netSearch
     vm0.invoke(new CacheSerializableRunnable("Remove local entries") {
+        @Override
         public void run2() throws CacheException {
           Region region =
             getRootRegion().getSubregion(name);
@@ -2940,6 +3048,7 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
       });
 
     Invoke.invokeRepeatingIfNecessary(vm2, new CacheSerializableRunnable("Verify keys") {
+        @Override
         public void run2() throws CacheException {
           Region region =
             getRootRegion().getSubregion(name);
@@ -2966,10 +3075,10 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
    * Tests that a newly-created mirrored region contains all of the
    * entries of another region.
    */
-  public void testGetInitialImage() {
-    if (!supportsReplication()) {
-      return;
-    }
+  @Test
+  public void testGetInitialImage() throws Exception {
+    assumeTrue(supportsReplication());
+
     final String name = this.getUniqueName();
     final Object key1 = "KEY1";
     final Object value1 = "VALUE1";
@@ -2984,6 +3093,7 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
 
     SerializableRunnable create = new
       CacheSerializableRunnable("Create Mirrored Region") {
+        @Override
         public void run2() throws CacheException {
           RegionAttributes ra = getRegionAttributes();
           AttributesFactory factory =
@@ -2997,10 +3107,10 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
         }
       };
 
-
     vm0.invoke(create);
 
     vm0.invoke(new CacheSerializableRunnable("Put data") {
+        @Override
         public void run2() throws CacheException {
           Region region =
             getRootRegion().getSubregion(name);
@@ -3015,6 +3125,7 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
     // Destroy the local entries so we know that they are not found by
     // a netSearch
     vm0.invoke(new CacheSerializableRunnable("Remove local entries") {
+        @Override
         public void run2() throws CacheException {
           Region region =
             getRootRegion().getSubregion(name);
@@ -3023,6 +3134,7 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
       });
 
     vm2.invoke(new CacheSerializableRunnable("Verify keys/values") {
+        @Override
         public void run2() throws CacheException {
           Region region =
             getRootRegion().getSubregion(name);
@@ -3042,18 +3154,18 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
       });
   }
 
-
   private static final int CHUNK_SIZE = 500 * 1024; // == InitialImageOperation.CHUNK_SIZE_IN_BYTES
   private static final int NUM_ENTRIES = 100;
   private static final int VALUE_SIZE = CHUNK_SIZE * 10 / NUM_ENTRIES;
+
   /**
    * Tests that a newly-created mirrored region contains all of the
    * entries of another region, with a large quantity of data.
    */
-  public void testLargeGetInitialImage() {
-    if (!supportsReplication()) {
-      return;
-    }
+  @Test
+  public void testLargeGetInitialImage() throws Exception {
+    assumeTrue(supportsReplication());
+
     final String name = this.getUniqueName();
     final Integer[] keys = new Integer[NUM_ENTRIES];
     final byte[][] values = new byte[NUM_ENTRIES][];
@@ -3070,6 +3182,7 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
 
     SerializableRunnable create = new
       CacheSerializableRunnable("Create Mirrored Region") {
+        @Override
         public void run2() throws CacheException {
           RegionAttributes ra = getRegionAttributes();
           AttributesFactory factory =
@@ -3087,6 +3200,7 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
     vm0.invoke(create);
 
     vm0.invoke(new CacheSerializableRunnable("Put data") {
+        @Override
         public void run2() throws CacheException {
           Region region =
             getRootRegion().getSubregion(name);
@@ -3101,6 +3215,7 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
     // Destroy the local entries so we know that they are not found by
     // a netSearch
     vm0.invoke(new CacheSerializableRunnable("Remove local entries") {
+        @Override
         public void run2() throws CacheException {
           Region region =
             getRootRegion().getSubregion(name);
@@ -3109,6 +3224,7 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
       });
 
     vm2.invoke(new CacheSerializableRunnable("Verify keys/values") {
+        @Override
         public void run2() throws CacheException {
           Region region =
             getRootRegion().getSubregion(name);
@@ -3129,11 +3245,9 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
    * Tests that a mirrored region gets data pushed to it from a
    * non-mirrored region and the afterCreate event is invoked on a listener.
    */
-  public void testMirroredDataFromNonMirrored()
-    throws InterruptedException {
-    if (!supportsReplication()) {
-      return;
-    }
+  @Test
+  public void testMirroredDataFromNonMirrored() throws Exception {
+    assumeTrue(supportsReplication());
 
     final String name = this.getUniqueName();
     final Object key1 = "KEY1";
@@ -3148,6 +3262,7 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
     VM vm2 = host.getVM(2); // use a VM on a different gemfire system
 
     SerializableRunnable create = new CacheSerializableRunnable("Populate non-mirrored region") {
+      @Override
       public void run2() throws CacheException {
         RegionAttributes ra = getRegionAttributes();
         AttributesFactory fac =
@@ -3173,6 +3288,7 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
       List expectedValues = new ArrayList(Arrays.asList(new Object[] {
         value1, value2, value3}));
 
+      @Override
       public synchronized void afterCreate2(EntryEvent event) {
         //getLogWriter().info("Invoking afterCreate2 with key=" + event.getKey());
         int index = expectedKeys.indexOf(event.getKey());
@@ -3185,6 +3301,7 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
     }
 
     vm0.invoke(new CacheSerializableRunnable("Create Mirrored Region") {
+        @Override
         public void run2() throws CacheException {
           RegionAttributes ra = getRegionAttributes();
           AttributesFactory factory =
@@ -3204,6 +3321,7 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
     // Destroy the local entries so we know that they are not found by
     // a netSearch
     vm2.invoke(new CacheSerializableRunnable("Remove local entries") {
+        @Override
         public void run2() throws CacheException {
           Region region =
             getRootRegion().getSubregion(name);
@@ -3215,6 +3333,7 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
       });
 
     vm0.invoke(new CacheSerializableRunnable("Verify keys/values and listener") {
+        @Override
         public void run2() throws CacheException {
           Region region =
             getRootRegion().getSubregion(name);
@@ -3247,11 +3366,9 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
    * Tests that a mirrored region does not push data to a non-mirrored
    * region.
    */
-  public void testNoMirroredDataToNonMirrored()
-    throws InterruptedException {
-    if (!supportsReplication()) {
-      return;
-    }
+  @Test
+  public void testNoMirroredDataToNonMirrored() throws Exception {
+    assumeTrue(supportsReplication());
 
     final String name = this.getUniqueName();
     final Object key1 = "KEY1";
@@ -3266,12 +3383,14 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
     VM vm2 = host.getVM(2); // use VM on different gemfire system
 
     vm0.invoke(new CacheSerializableRunnable("Create Non-mirrored Region") {
+        @Override
         public void run2() throws CacheException {
           createRegion(name, getRegionAttributes());
         }
       });
 
     SerializableRunnable create = new CacheSerializableRunnable("Populate mirrored region") {
+      @Override
       public void run2() throws CacheException {
         RegionAttributes ra = getRegionAttributes();
         AttributesFactory factory =
@@ -3294,6 +3413,7 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
 
     // Make sure that data wasn't pushed
     vm0.invoke(new CacheSerializableRunnable("Verify keys/values") {
+        @Override
         public void run2() throws CacheException {
           final Region region =
             getRootRegion().getSubregion(name);
@@ -3330,10 +3450,10 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
   /**
    * Tests that a local load occurs, even with mirroring
    */
-  public void testMirroredLocalLoad() {
-    if (!supportsReplication()) {
-      return;
-    }
+  @Test
+  public void testMirroredLocalLoad() throws Exception {
+    assumeTrue(supportsReplication());
+
     final String name = this.getUniqueName();
     final Object key = "KEY";
     final Object value = "VALUE";
@@ -3343,6 +3463,7 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
     VM vm2 = host.getVM(2); // use VMs on different gemfire systems
 
     vm0.invoke(new CacheSerializableRunnable("Create region with loader") {
+        @Override
         public void run2() throws CacheException {
           RegionAttributes ra = getRegionAttributes();
           AttributesFactory factory =
@@ -3353,6 +3474,7 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
           }
           factory.setDataPolicy(DataPolicy.REPLICATE);
           factory.setCacheLoader(new TestCacheLoader() {
+              @Override
               public Object load2(LoaderHelper helper)
                 throws CacheLoaderException {
                 return value;
@@ -3363,6 +3485,7 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
     });
 
     SerializableRunnable create = new CacheSerializableRunnable("Create region with bad loader") {
+      @Override
       public void run2() throws CacheException {
         RegionAttributes ra = getRegionAttributes();
         AttributesFactory factory =
@@ -3373,6 +3496,7 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
         }
         factory.setDataPolicy(DataPolicy.REPLICATE);
         loader = new TestCacheLoader() {
+          @Override
           public Object load2(LoaderHelper helper)
           throws CacheLoaderException {
 
@@ -3389,6 +3513,7 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
     vm2.invoke(create);
 
     vm0.invoke(new CacheSerializableRunnable("Get") {
+      @Override
       public void run2() throws CacheException {
        Region region =
          getRootRegion().getSubregion(name);
@@ -3397,6 +3522,7 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
     });
 
     vm2.invoke(new CacheSerializableRunnable("Verify no load") {
+      @Override
       public void run2() throws CacheException {
        assertFalse(loader.wasInvoked());
       }
@@ -3407,10 +3533,10 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
    * Tests sure that a <code>netLoad</code> occurs, even with
    * mirroring
    */
-  public void testMirroredNetLoad() {
-    if (!supportsReplication()) {
-      return;
-    }
+  @Test
+  public void testMirroredNetLoad() throws Exception {
+    assumeTrue(supportsReplication());
+
     final String name = this.getUniqueName();
     final Object key = "KEY";
     final Object value = "VALUE";
@@ -3420,6 +3546,7 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
     VM vm2 = host.getVM(2); // use VMs on different gemfire systems
 
     SerializableRunnable create = new CacheSerializableRunnable("Create region with loader") {
+      @Override
       public void run2() throws CacheException {
           RegionAttributes ra = getRegionAttributes();
           AttributesFactory factory =
@@ -3430,6 +3557,7 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
           }
           factory.setDataPolicy(DataPolicy.REPLICATE);
           factory.setCacheLoader(new TestCacheLoader() {
+              @Override
               public Object load2(LoaderHelper helper)
                 throws CacheLoaderException {
                 return value;
@@ -3441,6 +3569,7 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
 
 
     vm0.invoke(new CacheSerializableRunnable("Create region with bad loader") {
+        @Override
         public void run2() throws CacheException {
           RegionAttributes ra = getRegionAttributes();
           AttributesFactory factory =
@@ -3457,6 +3586,7 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
     vm2.invoke(create);
 
     vm0.invoke(new Cac

<TRUNCATED>


Mime
View raw message