You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@geode.apache.org by hi...@apache.org on 2016/06/15 16:42:24 UTC

[43/97] [abbrv] [partial] incubator-geode git commit: GEODE-837: update tests from JUnit3 to JUnit4

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/b914df23/geode-core/src/test/java/com/gemstone/gemfire/cache/query/partitioned/PRColocatedEquiJoinDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache/query/partitioned/PRColocatedEquiJoinDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache/query/partitioned/PRColocatedEquiJoinDUnitTest.java
index f86b94e..b50b650 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache/query/partitioned/PRColocatedEquiJoinDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache/query/partitioned/PRColocatedEquiJoinDUnitTest.java
@@ -19,6 +19,15 @@
  */
 package com.gemstone.gemfire.cache.query.partitioned;
 
+import org.junit.experimental.categories.Category;
+import org.junit.Test;
+
+import static org.junit.Assert.*;
+
+import com.gemstone.gemfire.test.dunit.cache.internal.JUnit4CacheTestCase;
+import com.gemstone.gemfire.test.dunit.internal.JUnit4DistributedTestCase;
+import com.gemstone.gemfire.test.junit.categories.DistributedTest;
+
 import static com.gemstone.gemfire.cache.query.Utils.*;
 
 import java.util.ArrayList;
@@ -64,6 +73,7 @@ import com.gemstone.gemfire.test.dunit.Wait;
 /**
  *
  */
+@Category(DistributedTest.class)
 public class PRColocatedEquiJoinDUnitTest extends PartitionedRegionDUnitTestCase {
 
   int totalNumBuckets = 100;
@@ -87,8 +97,8 @@ public class PRColocatedEquiJoinDUnitTest extends PartitionedRegionDUnitTestCase
   /**
    * @param name
    */
-  public PRColocatedEquiJoinDUnitTest(String name) {
-    super(name);
+  public PRColocatedEquiJoinDUnitTest() {
+    super();
   }
   public void setCacheInVMs(VM... vms) {
     for (VM vm : vms) {
@@ -102,6 +112,7 @@ public class PRColocatedEquiJoinDUnitTest extends PartitionedRegionDUnitTestCase
    * 3. Fires a LOCAL query on one data store VM and verifies the result. 
    * @throws Exception
    */
+  @Test
   public void testPRLocalQuerying() throws Exception
   {
     Host host = Host.getHost(0);
@@ -180,6 +191,7 @@ public class PRColocatedEquiJoinDUnitTest extends PartitionedRegionDUnitTestCase
             "PRQBasicQueryDUnitTest#testPRBasicQuerying: Querying PR's Test ENDED");
   }
 
+  @Test
   public void testNonColocatedPRLocalQuerying() throws Exception
   {
     IgnoredException.addIgnoredException("UnsupportedOperationException");
@@ -385,6 +397,7 @@ public class PRColocatedEquiJoinDUnitTest extends PartitionedRegionDUnitTestCase
    * 3. Fires a LOCAL query on one data store VM and verifies the result. 
    * @throws Exception
    */
+  @Test
   public void testPRLocalQueryingWithIndexes() throws Exception {
 
     Host host = Host.getHost(0);
@@ -474,6 +487,7 @@ public class PRColocatedEquiJoinDUnitTest extends PartitionedRegionDUnitTestCase
    * 3. Fires a LOCAL query on one data store VM and verifies the result. 
    * @throws Exception
    */
+  @Test
   public void testPRLocalQueryingWithIndexOnOneRegion() throws Exception {
 
     Host host = Host.getHost(0);
@@ -561,6 +575,7 @@ public class PRColocatedEquiJoinDUnitTest extends PartitionedRegionDUnitTestCase
    * 3. Fires a LOCAL query on one data store VM and verifies the result. 
    * @throws Exception
    */
+  @Test
   public void testPRRRLocalQuerying() throws Exception
   {
     Host host = Host.getHost(0);
@@ -645,6 +660,7 @@ public class PRColocatedEquiJoinDUnitTest extends PartitionedRegionDUnitTestCase
    * 3. Fires a LOCAL query on one data store VM and verifies the result. 
    * @throws Exception
    */
+  @Test
   public void testPRRRLocalQueryingWithIndexes() throws Exception {
 
     Host host = Host.getHost(0);
@@ -734,6 +750,7 @@ public class PRColocatedEquiJoinDUnitTest extends PartitionedRegionDUnitTestCase
    * 3. Fires a LOCAL query on one data store VM and verifies the result. 
    * @throws Exception
    */
+  @Test
   public void testPRRRLocalQueryingWithIndexOnOnePRRegion() throws Exception {
 
     Host host = Host.getHost(0);
@@ -820,6 +837,7 @@ public class PRColocatedEquiJoinDUnitTest extends PartitionedRegionDUnitTestCase
    * 3. Fires a LOCAL query on one data store VM and verifies the result. 
    * @throws Exception
    */
+  @Test
   public void testRRPRLocalQuerying() throws Exception
   {
     Host host = Host.getHost(0);
@@ -904,6 +922,7 @@ public class PRColocatedEquiJoinDUnitTest extends PartitionedRegionDUnitTestCase
    * 3. Fires a LOCAL query on one data store VM and verifies the result. 
    * @throws Exception
    */
+  @Test
   public void testRRPRLocalQueryingWithIndexes() throws Exception {
 
     Host host = Host.getHost(0);
@@ -991,6 +1010,7 @@ public class PRColocatedEquiJoinDUnitTest extends PartitionedRegionDUnitTestCase
    * 3. Fires a LOCAL query on one data store VM and verifies the result. 
    * @throws Exception
    */
+  @Test
   public void testRRPRLocalQueryingWithIndexOnOnePRRegion() throws Exception {
 
     Host host = Host.getHost(0);
@@ -1077,6 +1097,7 @@ public class PRColocatedEquiJoinDUnitTest extends PartitionedRegionDUnitTestCase
    * 3. Fires a LOCAL query on one data store VM and verifies the result. 
    * @throws Exception
    */
+  @Test
   public void testPRNonLocalQueryException() throws Exception {
     
     Host host = Host.getHost(0);
@@ -1235,6 +1256,7 @@ public class PRColocatedEquiJoinDUnitTest extends PartitionedRegionDUnitTestCase
             "PRQBasicQueryDUnitTest#testPRBasicQuerying: Querying PR's Test ENDED");
   }
 
+  @Test
   public void testPRRRLocalQueryingWithHetroIndexes() throws Exception {
 
     Host host = Host.getHost(0);
@@ -1318,6 +1340,7 @@ public class PRColocatedEquiJoinDUnitTest extends PartitionedRegionDUnitTestCase
   }
 
 
+  @Test
   public void testRRPRLocalQueryingWithHetroIndexes() throws Exception {
 
     Host host = Host.getHost(0);
@@ -1400,6 +1423,7 @@ public class PRColocatedEquiJoinDUnitTest extends PartitionedRegionDUnitTestCase
             "PRQBasicQueryDUnitTest#testPRBasicQuerying: Querying PR's Test ENDED");
   }
 
+  @Test
   public void testPRRRCompactRangeAndNestedRangeIndexQuerying() throws Exception {
 
     Host host = Host.getHost(0);
@@ -1482,6 +1506,7 @@ public class PRColocatedEquiJoinDUnitTest extends PartitionedRegionDUnitTestCase
             "PRQBasicQueryDUnitTest#testPRBasicQuerying: Querying PR's Test ENDED");
   }
 
+  @Test
   public void testPRRRIndexQueryWithSameTypeIndexQueryResults() throws Exception {
 
     Host host = Host.getHost(0);
@@ -1577,6 +1602,7 @@ public class PRColocatedEquiJoinDUnitTest extends PartitionedRegionDUnitTestCase
    * 3. Fires a LOCAL query on one data store VM and verifies the result. 
    * @throws Exception
    */
+  @Test
   public void testPRRRNonLocalQueryingWithNoRROnOneNode() throws Exception
   {
     

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/b914df23/geode-core/src/test/java/com/gemstone/gemfire/cache/query/partitioned/PRInvalidQueryDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache/query/partitioned/PRInvalidQueryDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache/query/partitioned/PRInvalidQueryDUnitTest.java
index 4fa2b5a..ed98c3e 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache/query/partitioned/PRInvalidQueryDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache/query/partitioned/PRInvalidQueryDUnitTest.java
@@ -17,6 +17,15 @@
 
 package com.gemstone.gemfire.cache.query.partitioned;
 
+import org.junit.experimental.categories.Category;
+import org.junit.Test;
+
+import static org.junit.Assert.*;
+
+import com.gemstone.gemfire.test.dunit.cache.internal.JUnit4CacheTestCase;
+import com.gemstone.gemfire.test.dunit.internal.JUnit4DistributedTestCase;
+import com.gemstone.gemfire.test.junit.categories.DistributedTest;
+
 /**
  * This tests creates partition regions across VM's executes Queries on PR's so
  * that they generate various Exceptions
@@ -30,6 +39,7 @@ import com.gemstone.gemfire.test.dunit.Host;
 import com.gemstone.gemfire.test.dunit.LogWriterUtils;
 import com.gemstone.gemfire.test.dunit.VM;
 
+@Category(DistributedTest.class)
 public class PRInvalidQueryDUnitTest extends PartitionedRegionDUnitTestCase
 
 {
@@ -39,9 +49,9 @@ public class PRInvalidQueryDUnitTest extends PartitionedRegionDUnitTestCase
    * @param name
    */
 
-  public PRInvalidQueryDUnitTest(String name) {
+  public PRInvalidQueryDUnitTest() {
 
-    super(name);
+    super();
   }
 
   public void setCacheInVMs(VM... vms) {
@@ -70,6 +80,7 @@ public class PRInvalidQueryDUnitTest extends PartitionedRegionDUnitTestCase
    * @throws Exception
    */
 
+  @Test
   public void testPRDAckCreationAndQueryingWithInvalidQuery() throws Exception
   {
     LogWriterUtils.getLogWriter()

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/b914df23/geode-core/src/test/java/com/gemstone/gemfire/cache/query/partitioned/PRQueryCacheCloseDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache/query/partitioned/PRQueryCacheCloseDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache/query/partitioned/PRQueryCacheCloseDUnitTest.java
index 97021f5..f76529f 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache/query/partitioned/PRQueryCacheCloseDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache/query/partitioned/PRQueryCacheCloseDUnitTest.java
@@ -17,6 +17,15 @@
 
 package com.gemstone.gemfire.cache.query.partitioned;
 
+import org.junit.experimental.categories.Category;
+import org.junit.Test;
+
+import static org.junit.Assert.*;
+
+import com.gemstone.gemfire.test.dunit.cache.internal.JUnit4CacheTestCase;
+import com.gemstone.gemfire.test.dunit.internal.JUnit4DistributedTestCase;
+import com.gemstone.gemfire.test.junit.categories.DistributedTest;
+
 /**
  * This test tests the PR query behaviour with respect to cache closure
  * happening on one of the data stores. PR is configured with redundantCopies =
@@ -44,6 +53,7 @@ import com.gemstone.gemfire.test.dunit.VM;
 import com.gemstone.gemfire.test.dunit.Wait;
 import com.gemstone.gemfire.test.dunit.cache.internal.JUnit4CacheTestCase;
 
+@Category(DistributedTest.class)
 public class PRQueryCacheCloseDUnitTest extends PartitionedRegionDUnitTestCase
 {
 
@@ -53,9 +63,9 @@ public class PRQueryCacheCloseDUnitTest extends PartitionedRegionDUnitTestCase
    * @param name
    */
 
-  public PRQueryCacheCloseDUnitTest(String name) {
+  public PRQueryCacheCloseDUnitTest() {
 
-    super(name);
+    super();
   }
   public void setCacheInVMs(VM... vms) {
     for (VM vm : vms) {
@@ -89,6 +99,7 @@ public class PRQueryCacheCloseDUnitTest extends PartitionedRegionDUnitTestCase
    * 6. then recreates the PR on the same VM <br>
    * 7. Verfies the size , type , contents of both the resultSets Obtained <br>
    */
+  @Test
   public void testPRWithCacheCloseInOneDatastoreWithDelay() throws Exception
   {
 
@@ -222,6 +233,7 @@ public class PRQueryCacheCloseDUnitTest extends PartitionedRegionDUnitTestCase
    * 6. then recreates the PR on the same VM <br>
    * 7. Verfies the size , type , contents of both the resultSets Obtained <br>
    */
+  @Test
   public void testPRWithCacheCloseInOneDatastoreWithoutDelay() throws Exception
   {
     LogWriterUtils.getLogWriter()

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/b914df23/geode-core/src/test/java/com/gemstone/gemfire/cache/query/partitioned/PRQueryDUnitHelper.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache/query/partitioned/PRQueryDUnitHelper.java b/geode-core/src/test/java/com/gemstone/gemfire/cache/query/partitioned/PRQueryDUnitHelper.java
index 241aeb6..6b6623e 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache/query/partitioned/PRQueryDUnitHelper.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache/query/partitioned/PRQueryDUnitHelper.java
@@ -86,25 +86,15 @@ import com.gemstone.gemfire.util.test.TestUtil;
 
 /**
  * This is a helper class for the various Partitioned Query DUnit Test Cases
- * 
  */
+public class PRQueryDUnitHelper implements Serializable {
 
-public class PRQueryDUnitHelper implements Serializable
-{
-  /**
-   * constructor *
-   * 
-   * @param name
-   */
   static Cache cache = null;
+
   public static void setCache(Cache cache) {
     PRQueryDUnitHelper.cache = cache;
   }
 
-  public PRQueryDUnitHelper() {
-
-  }
-
   public static Cache getCache() {
     return cache;
   }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/b914df23/geode-core/src/test/java/com/gemstone/gemfire/cache/query/partitioned/PRQueryDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache/query/partitioned/PRQueryDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache/query/partitioned/PRQueryDUnitTest.java
index c5ec4b7..1135939 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache/query/partitioned/PRQueryDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache/query/partitioned/PRQueryDUnitTest.java
@@ -17,6 +17,15 @@
 
 package com.gemstone.gemfire.cache.query.partitioned;
 
+import org.junit.experimental.categories.Category;
+import org.junit.Test;
+
+import static org.junit.Assert.*;
+
+import com.gemstone.gemfire.test.dunit.cache.internal.JUnit4CacheTestCase;
+import com.gemstone.gemfire.test.dunit.internal.JUnit4DistributedTestCase;
+import com.gemstone.gemfire.test.junit.categories.DistributedTest;
+
 /**
  * This tests creates partition regions across VM's and a local Region across
  * one of the VM executes Queries both on Local Region & PR's & compare
@@ -53,6 +62,7 @@ import com.gemstone.gemfire.test.dunit.Host;
 import com.gemstone.gemfire.test.dunit.SerializableCallable;
 import com.gemstone.gemfire.test.dunit.VM;
 
+@Category(DistributedTest.class)
 public class PRQueryDUnitTest extends PartitionedRegionDUnitTestCase
 
 {
@@ -62,8 +72,8 @@ public class PRQueryDUnitTest extends PartitionedRegionDUnitTestCase
    * @param name
    */
 
-  public PRQueryDUnitTest(String name) {
-    super(name);
+  public PRQueryDUnitTest() {
+    super();
   }
 
   public void setCacheInVMs(VM... vms) {
@@ -100,6 +110,7 @@ public class PRQueryDUnitTest extends PartitionedRegionDUnitTestCase
    * @throws Exception
    */
 
+  @Test
   public void testPRDAckCreationAndQuerying() throws Exception
   {
     LogWriterUtils.getLogWriter()
@@ -184,6 +195,7 @@ public class PRQueryDUnitTest extends PartitionedRegionDUnitTestCase
     * @throws Exception
     */
 
+  @Test
   public void testPRDAckCreationAndQueryingFull() throws Exception
   {
     LogWriterUtils.getLogWriter()
@@ -270,6 +282,7 @@ public class PRQueryDUnitTest extends PartitionedRegionDUnitTestCase
    * @throws Exception
    */
 
+  @Test
   public void testPRDAckCreationAndQueryingWithConstants() throws Exception
   {
     LogWriterUtils.getLogWriter()
@@ -353,6 +366,7 @@ public class PRQueryDUnitTest extends PartitionedRegionDUnitTestCase
    * the query loop
    * @throws Exception
    */
+  @Test
   public void testDataLossDuringQueryProcessor() throws Exception {
     final String rName = getUniqueName();
     Host host = Host.getHost(0);
@@ -431,6 +445,7 @@ public class PRQueryDUnitTest extends PartitionedRegionDUnitTestCase
     }
   }
 
+  @Test
   public void testQueryResultsFromMembers() throws Exception {
     final String rName = getUniqueName();
     Host host = Host.getHost(0);
@@ -536,6 +551,7 @@ public class PRQueryDUnitTest extends PartitionedRegionDUnitTestCase
     }
   }
 
+  @Test
   public void testQueryResultsFromMembersWithAccessor() throws Exception {
     final String rName = getUniqueName();
     Host host = Host.getHost(0);
@@ -650,6 +666,7 @@ public class PRQueryDUnitTest extends PartitionedRegionDUnitTestCase
    * the query loop
    * @throws Exception
    */
+  @Test
   public void testSimulatedDataLossBeforeQueryProcessor() throws Exception
   {
     final String rName = getUniqueName();
@@ -733,6 +750,7 @@ public class PRQueryDUnitTest extends PartitionedRegionDUnitTestCase
    * @throws Exception
    */
 
+  @Test
   public void testPRAccessorCreationAndQuerying() throws Exception
   {
     LogWriterUtils.getLogWriter()
@@ -824,7 +842,8 @@ public class PRQueryDUnitTest extends PartitionedRegionDUnitTestCase
    * @throws Exception
    */
 
- public void testPRDAckCreationAndQueryingWithOrderBy() throws Exception
+  @Test
+  public void testPRDAckCreationAndQueryingWithOrderBy() throws Exception
  {
    int dataSize = 10;
    int step = 2;
@@ -911,7 +930,8 @@ public class PRQueryDUnitTest extends PartitionedRegionDUnitTestCase
   * @throws Exception
   */
 
- public void testPRDAckCreationAndQueryingWithOrderByVerifyOrder() throws Exception
+  @Test
+  public void testPRDAckCreationAndQueryingWithOrderByVerifyOrder() throws Exception
  {
    int dataSize = 10;
    int step = 2;
@@ -997,6 +1017,7 @@ public class PRQueryDUnitTest extends PartitionedRegionDUnitTestCase
    *
    * @throws Exception
    */
+  @Test
   public void testPRAccessorCreationAndQueryWithOrderBy() throws Exception
   {
     int dataSize = 10;
@@ -1081,6 +1102,7 @@ public class PRQueryDUnitTest extends PartitionedRegionDUnitTestCase
             "PRQueryDUnitTest#testPRAccessorCreationAndQuerying : Querying PR's Test ENDED*****");
   }
 
+  @Test
   public void testPRDAckCreationAndQueryingWithOrderByLimit() throws Exception
   {
     int dataSize = 10;
@@ -1169,6 +1191,7 @@ public class PRQueryDUnitTest extends PartitionedRegionDUnitTestCase
    * @throws Exception
    */
 
+  @Test
   public void testPRAccessorCreationAndQueryingWithNoData() throws Exception
   {
     LogWriterUtils.getLogWriter()

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/b914df23/geode-core/src/test/java/com/gemstone/gemfire/cache/query/partitioned/PRQueryRegionCloseDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache/query/partitioned/PRQueryRegionCloseDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache/query/partitioned/PRQueryRegionCloseDUnitTest.java
index c8975db..edc821a 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache/query/partitioned/PRQueryRegionCloseDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache/query/partitioned/PRQueryRegionCloseDUnitTest.java
@@ -17,6 +17,15 @@
 
 package com.gemstone.gemfire.cache.query.partitioned;
 
+import org.junit.experimental.categories.Category;
+import org.junit.Test;
+
+import static org.junit.Assert.*;
+
+import com.gemstone.gemfire.test.dunit.cache.internal.JUnit4CacheTestCase;
+import com.gemstone.gemfire.test.dunit.internal.JUnit4DistributedTestCase;
+import com.gemstone.gemfire.test.junit.categories.DistributedTest;
+
 /**
  * This test creates partition regions with one Accessor node & two Datastores
  * Calls region.close() on one of the data stores while the query is being
@@ -42,6 +51,7 @@ import com.gemstone.gemfire.test.dunit.VM;
 import com.gemstone.gemfire.test.dunit.Wait;
 import com.gemstone.gemfire.internal.cache.ForceReattemptException;
 
+@Category(DistributedTest.class)
 public class PRQueryRegionCloseDUnitTest extends PartitionedRegionDUnitTestCase
 {
 
@@ -51,8 +61,8 @@ public class PRQueryRegionCloseDUnitTest extends PartitionedRegionDUnitTestCase
    * @param name
    */
 
-  public PRQueryRegionCloseDUnitTest(String name) {
-    super(name);
+  public PRQueryRegionCloseDUnitTest() {
+    super();
   }
 
   public void setCacheInVMs(VM... vms) {
@@ -88,6 +98,7 @@ public class PRQueryRegionCloseDUnitTest extends PartitionedRegionDUnitTestCase
    * 6. then recreates the PR on the same VM <br>
    * 7. Verfies the size , type , contents of both the resultSets Obtained <br>
    */
+  @Test
   public void testPRWithRegionCloseInOneDatastoreWithoutDelay()
       throws Exception
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/b914df23/geode-core/src/test/java/com/gemstone/gemfire/cache/query/partitioned/PRQueryRegionDestroyedDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache/query/partitioned/PRQueryRegionDestroyedDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache/query/partitioned/PRQueryRegionDestroyedDUnitTest.java
index 1892be9..41dcad7 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache/query/partitioned/PRQueryRegionDestroyedDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache/query/partitioned/PRQueryRegionDestroyedDUnitTest.java
@@ -17,6 +17,15 @@
 
 package com.gemstone.gemfire.cache.query.partitioned;
 
+import org.junit.experimental.categories.Category;
+import org.junit.Test;
+
+import static org.junit.Assert.*;
+
+import com.gemstone.gemfire.test.dunit.cache.internal.JUnit4CacheTestCase;
+import com.gemstone.gemfire.test.dunit.internal.JUnit4DistributedTestCase;
+import com.gemstone.gemfire.test.junit.categories.DistributedTest;
+
 /**
  * This test creates partition regions with one Accessor node & two Datastores
  * Calls region.destroy() on one of the data stores while the query is being
@@ -42,6 +51,7 @@ import com.gemstone.gemfire.test.dunit.VM;
 import com.gemstone.gemfire.test.dunit.Wait;
 import com.gemstone.gemfire.internal.cache.ForceReattemptException;
 
+@Category(DistributedTest.class)
 public class PRQueryRegionDestroyedDUnitTest extends PartitionedRegionDUnitTestCase
 {
 
@@ -51,9 +61,9 @@ public class PRQueryRegionDestroyedDUnitTest extends PartitionedRegionDUnitTestC
    * @param name
    */
 
-  public PRQueryRegionDestroyedDUnitTest(String name) {
+  public PRQueryRegionDestroyedDUnitTest() {
 
-    super(name);
+    super();
   }
   public void setCacheInVMs(VM... vms) {
     for (VM vm : vms) {
@@ -82,6 +92,7 @@ public class PRQueryRegionDestroyedDUnitTest extends PartitionedRegionDUnitTestC
    * 6. then recreates the PR on the same VM <br>
    * 7. Verfies the size , type , contents of both the resultSets Obtained <br>
    */
+  @Test
   public void testPRWithRegionDestroyInOneDatastoreWithDelay()
       throws Exception
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/b914df23/geode-core/src/test/java/com/gemstone/gemfire/cache/query/partitioned/PRQueryRemoteNodeExceptionDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache/query/partitioned/PRQueryRemoteNodeExceptionDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache/query/partitioned/PRQueryRemoteNodeExceptionDUnitTest.java
index 2fc1bc5..ac108ef 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache/query/partitioned/PRQueryRemoteNodeExceptionDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache/query/partitioned/PRQueryRemoteNodeExceptionDUnitTest.java
@@ -19,11 +19,14 @@
  */
 package com.gemstone.gemfire.cache.query.partitioned;
 
-import static com.gemstone.gemfire.cache.query.Utils.createPortfolioData;
+import static com.gemstone.gemfire.cache.query.Utils.*;
+import static org.junit.Assert.*;
 
 import java.util.LinkedList;
 import java.util.List;
-import java.util.Properties;
+
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
 
 import com.gemstone.gemfire.cache.Cache;
 import com.gemstone.gemfire.cache.CacheClosedException;
@@ -31,43 +34,28 @@ import com.gemstone.gemfire.cache.CacheException;
 import com.gemstone.gemfire.cache.Region;
 import com.gemstone.gemfire.cache.query.Query;
 import com.gemstone.gemfire.cache.query.QueryInvocationTargetException;
-import com.gemstone.gemfire.cache.query.cq.dunit.CqQueryTestListener;
 import com.gemstone.gemfire.cache.query.data.PortfolioData;
 import com.gemstone.gemfire.cache.query.internal.DefaultQuery;
 import com.gemstone.gemfire.cache.query.internal.IndexTrackingQueryObserver;
-import com.gemstone.gemfire.cache.query.internal.QueryObserver;
 import com.gemstone.gemfire.cache.query.internal.QueryObserverAdapter;
 import com.gemstone.gemfire.cache.query.internal.QueryObserverHolder;
 import com.gemstone.gemfire.cache30.CacheSerializableRunnable;
-import com.gemstone.gemfire.distributed.internal.DistributionMessageObserver;
-import com.gemstone.gemfire.internal.cache.BucketRegion;
 import com.gemstone.gemfire.internal.cache.PartitionedRegion;
 import com.gemstone.gemfire.internal.cache.PartitionedRegionDUnitTestCase;
 import com.gemstone.gemfire.test.dunit.Assert;
-import com.gemstone.gemfire.test.dunit.DistributedTestCase;
 import com.gemstone.gemfire.test.dunit.Host;
 import com.gemstone.gemfire.test.dunit.Invoke;
 import com.gemstone.gemfire.test.dunit.LogWriterUtils;
-import com.gemstone.gemfire.test.dunit.SerializableRunnable;
 import com.gemstone.gemfire.test.dunit.VM;
+import com.gemstone.gemfire.test.junit.categories.DistributedTest;
 
 /**
  * This test verifies exception handling on coordinator node for remote as
  * well as local querying.
- *
  */
+@Category(DistributedTest.class)
 public class PRQueryRemoteNodeExceptionDUnitTest extends PartitionedRegionDUnitTestCase {
 
-  /**
-   * constructor *
-   * 
-   * @param name
-   */
-
-  public PRQueryRemoteNodeExceptionDUnitTest(String name) {
-    super(name);
-  }
-
   public void setCacheInVMs(VM... vms) {
     for (VM vm : vms) {
       vm.invoke(() -> PRQueryDUnitHelper.setCache(getCache()));
@@ -103,6 +91,7 @@ public class PRQueryRemoteNodeExceptionDUnitTest extends PartitionedRegionDUnitT
    * 6. then re-executes the query on one of the data-store node. <br>
    * 7. Verifies the exception thrown is from local node not from remote node <br>
    */
+  @Test
   public void testPRWithLocalAndRemoteException()
       throws Exception {
 
@@ -234,6 +223,7 @@ public class PRQueryRemoteNodeExceptionDUnitTest extends PartitionedRegionDUnitT
             "PRQueryRemoteNodeExceptionDUnitTest#testPRWithLocalAndRemoteException: Querying with PR Local/Remote Exception Test ENDED");
   }
   
+  @Test
   public void testRemoteException() throws Exception {
 
     LogWriterUtils.getLogWriter()
@@ -365,6 +355,7 @@ public class PRQueryRemoteNodeExceptionDUnitTest extends PartitionedRegionDUnitT
             "PRQueryRemoteNodeExceptionDUnitTest#testPRWithLocalAndRemoteException: Querying with PR Local/Remote Exception Test ENDED");
   }
   
+  @Test
   public void testCacheCloseExceptionFromLocalAndRemote() throws Exception {
 
     LogWriterUtils.getLogWriter()
@@ -498,6 +489,7 @@ public class PRQueryRemoteNodeExceptionDUnitTest extends PartitionedRegionDUnitT
             "PRQueryRemoteNodeExceptionDUnitTest#testPRWithLocalAndRemoteException: Querying with PR Local/Remote Exception Test ENDED");
   }
   
+  @Test
   public void testCacheCloseExceptionFromLocalAndRemote2() throws Exception {
 
     LogWriterUtils.getLogWriter()
@@ -641,6 +633,7 @@ public class PRQueryRemoteNodeExceptionDUnitTest extends PartitionedRegionDUnitT
             "PRQueryRemoteNodeExceptionDUnitTest#testPRWithLocalAndRemoteException: Querying with PR Local/Remote Exception Test ENDED");
   }
   
+  @Test
   public void testForceReattemptExceptionFromLocal() throws Exception {
 
     LogWriterUtils.getLogWriter()

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/b914df23/geode-core/src/test/java/com/gemstone/gemfire/cache/snapshot/ParallelSnapshotDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache/snapshot/ParallelSnapshotDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache/snapshot/ParallelSnapshotDUnitTest.java
index 5b123f2..0e2b4cd 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache/snapshot/ParallelSnapshotDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache/snapshot/ParallelSnapshotDUnitTest.java
@@ -16,6 +16,15 @@
  */
 package com.gemstone.gemfire.cache.snapshot;
 
+import org.junit.experimental.categories.Category;
+import org.junit.Test;
+
+import static org.junit.Assert.*;
+
+import com.gemstone.gemfire.test.dunit.cache.internal.JUnit4CacheTestCase;
+import com.gemstone.gemfire.test.dunit.internal.JUnit4DistributedTestCase;
+import com.gemstone.gemfire.test.junit.categories.DistributedTest;
+
 import java.io.File;
 import java.io.FilenameFilter;
 import java.io.IOException;
@@ -35,7 +44,8 @@ import com.gemstone.gemfire.test.dunit.Host;
 import com.gemstone.gemfire.test.dunit.SerializableCallable;
 import com.gemstone.gemfire.test.dunit.VM;
 
-public class ParallelSnapshotDUnitTest extends CacheTestCase {
+@Category(DistributedTest.class)
+public class ParallelSnapshotDUnitTest extends JUnit4CacheTestCase {
   static byte[] ffff = new byte[] { 0xf, 0xf, 0xf, 0xf };
   static byte[] eeee = new byte[] { 0xe, 0xe, 0xe, 0xe };
   
@@ -61,15 +71,17 @@ public class ParallelSnapshotDUnitTest extends CacheTestCase {
     }
   }
   
-  public ParallelSnapshotDUnitTest(String name) {
-    super(name);
+  public ParallelSnapshotDUnitTest() {
+    super();
   }
   
+  @Test
   public void testExportImport() throws Exception {
     doExport(false);
     doImport(false);
   }
   
+  @Test
   public void testExportImportErrors() throws Exception {
     try {
       doExport(true);

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/b914df23/geode-core/src/test/java/com/gemstone/gemfire/cache/snapshot/SnapshotByteArrayDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache/snapshot/SnapshotByteArrayDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache/snapshot/SnapshotByteArrayDUnitTest.java
index eae745a..4a75094 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache/snapshot/SnapshotByteArrayDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache/snapshot/SnapshotByteArrayDUnitTest.java
@@ -16,6 +16,15 @@
  */
 package com.gemstone.gemfire.cache.snapshot;
 
+import org.junit.experimental.categories.Category;
+import org.junit.Test;
+
+import static org.junit.Assert.*;
+
+import com.gemstone.gemfire.test.dunit.cache.internal.JUnit4CacheTestCase;
+import com.gemstone.gemfire.test.dunit.internal.JUnit4DistributedTestCase;
+import com.gemstone.gemfire.test.junit.categories.DistributedTest;
+
 import java.io.File;
 
 import com.examples.snapshot.MyPdxSerializer;
@@ -31,13 +40,15 @@ import com.gemstone.gemfire.test.dunit.Host;
 import com.gemstone.gemfire.test.dunit.LogWriterUtils;
 import com.gemstone.gemfire.test.dunit.SerializableCallable;
 
-public class SnapshotByteArrayDUnitTest extends CacheTestCase {
+@Category(DistributedTest.class)
+public class SnapshotByteArrayDUnitTest extends JUnit4CacheTestCase {
   private final File snap = new File("snapshot-ops");
   
-  public SnapshotByteArrayDUnitTest(String name) {
-    super(name);
+  public SnapshotByteArrayDUnitTest() {
+    super();
   }
 
+  @Test
   public void testImportByteArray() throws Exception {
     SerializableCallable load = new SerializableCallable() {
       @Override

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/b914df23/geode-core/src/test/java/com/gemstone/gemfire/cache/snapshot/SnapshotDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache/snapshot/SnapshotDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache/snapshot/SnapshotDUnitTest.java
index 06bfecc..d9b041a 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache/snapshot/SnapshotDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache/snapshot/SnapshotDUnitTest.java
@@ -16,6 +16,15 @@
  */
 package com.gemstone.gemfire.cache.snapshot;
 
+import org.junit.experimental.categories.Category;
+import org.junit.Test;
+
+import static org.junit.Assert.*;
+
+import com.gemstone.gemfire.test.dunit.cache.internal.JUnit4CacheTestCase;
+import com.gemstone.gemfire.test.dunit.internal.JUnit4DistributedTestCase;
+import com.gemstone.gemfire.test.junit.categories.DistributedTest;
+
 import java.io.File;
 import java.io.FilenameFilter;
 import java.util.HashMap;
@@ -39,11 +48,13 @@ import com.gemstone.gemfire.cache30.CacheTestCase;
 import com.gemstone.gemfire.test.dunit.Host;
 import com.gemstone.gemfire.test.dunit.SerializableCallable;
 
-public class SnapshotDUnitTest extends CacheTestCase {
-  public SnapshotDUnitTest(String name) {
-    super(name);
+@Category(DistributedTest.class)
+public class SnapshotDUnitTest extends JUnit4CacheTestCase {
+  public SnapshotDUnitTest() {
+    super();
   }
 
+  @Test
   public void testExportAndImport() throws Exception {
     File dir = new File(getDiskDirs()[0], "snap");
     dir.mkdir();
@@ -108,6 +119,7 @@ public class SnapshotDUnitTest extends CacheTestCase {
     }
   }
 
+  @Test
   public void testCacheExportFilterException() throws Exception {
     SnapshotFilter<Object, Object> oops = new SnapshotFilter<Object, Object>() {
       @Override
@@ -132,6 +144,7 @@ public class SnapshotDUnitTest extends CacheTestCase {
     assertTrue(caughtException);
   }
   
+  @Test
   public void testCacheImportFilterException() throws Exception {
     SnapshotFilter<Object, Object> oops = new SnapshotFilter<Object, Object>() {
       @Override

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/b914df23/geode-core/src/test/java/com/gemstone/gemfire/cache/snapshot/SnapshotPerformanceDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache/snapshot/SnapshotPerformanceDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache/snapshot/SnapshotPerformanceDUnitTest.java
index c5b0e55..ec75ba1 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache/snapshot/SnapshotPerformanceDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache/snapshot/SnapshotPerformanceDUnitTest.java
@@ -16,6 +16,15 @@
  */
 package com.gemstone.gemfire.cache.snapshot;
 
+import org.junit.experimental.categories.Category;
+import org.junit.Test;
+
+import static org.junit.Assert.*;
+
+import com.gemstone.gemfire.test.dunit.cache.internal.JUnit4CacheTestCase;
+import com.gemstone.gemfire.test.dunit.internal.JUnit4DistributedTestCase;
+import com.gemstone.gemfire.test.junit.categories.DistributedTest;
+
 import java.io.File;
 import java.io.FilenameFilter;
 import java.util.HashMap;
@@ -34,11 +43,13 @@ import com.gemstone.gemfire.test.dunit.Host;
 import com.gemstone.gemfire.test.dunit.LogWriterUtils;
 import com.gemstone.gemfire.test.dunit.SerializableCallable;
 
-public class SnapshotPerformanceDUnitTest extends CacheTestCase {
-  public SnapshotPerformanceDUnitTest(String name) {
-    super(name);
+@Category(DistributedTest.class)
+public class SnapshotPerformanceDUnitTest extends JUnit4CacheTestCase {
+  public SnapshotPerformanceDUnitTest() {
+    super();
   }
 
+  @Test
   public void testPerformance() throws Exception {
     int iterations = 5;
     int dataCount = 10000;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/b914df23/geode-core/src/test/java/com/gemstone/gemfire/cache30/Bug34387DUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache30/Bug34387DUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache30/Bug34387DUnitTest.java
index e8fac48..f1ee791 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache30/Bug34387DUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache30/Bug34387DUnitTest.java
@@ -16,6 +16,15 @@
  */
 package com.gemstone.gemfire.cache30;
 
+import org.junit.experimental.categories.Category;
+import org.junit.Test;
+
+import static org.junit.Assert.*;
+
+import com.gemstone.gemfire.test.dunit.cache.internal.JUnit4CacheTestCase;
+import com.gemstone.gemfire.test.dunit.internal.JUnit4DistributedTestCase;
+import com.gemstone.gemfire.test.junit.categories.DistributedTest;
+
 import com.gemstone.gemfire.cache.AttributesFactory;
 import com.gemstone.gemfire.cache.CacheException;
 import com.gemstone.gemfire.cache.CacheListener;
@@ -37,7 +46,8 @@ import com.gemstone.gemfire.test.dunit.VM;
  *
  * @since GemFire 5.0
  */
-public class Bug34387DUnitTest extends CacheTestCase {
+@Category(DistributedTest.class)
+public class Bug34387DUnitTest extends JUnit4CacheTestCase {
 
 //  private transient Region r;
 //  private transient DistributedMember otherId;
@@ -45,8 +55,8 @@ public class Bug34387DUnitTest extends CacheTestCase {
   
   static volatile boolean callbackFailure;
   
-  public Bug34387DUnitTest(String name) {
-    super(name);
+  public Bug34387DUnitTest() {
+    super();
   }
 
   protected static void callbackAssertEquals(String message, Object expected, 
@@ -115,6 +125,7 @@ public class Bug34387DUnitTest extends CacheTestCase {
   /**
    * test create followed by localDestroy
    */
+  @Test
   public void testCreateAndLD() throws CacheException {
     initOtherId();
     AttributesFactory af = new AttributesFactory();
@@ -144,6 +155,7 @@ public class Bug34387DUnitTest extends CacheTestCase {
   /**
    * test create followed by localInvalidate
    */
+  @Test
   public void testCreateAndLI() throws CacheException {
     initOtherId();
     AttributesFactory af = new AttributesFactory();

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/b914df23/geode-core/src/test/java/com/gemstone/gemfire/cache30/Bug34948DUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache30/Bug34948DUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache30/Bug34948DUnitTest.java
index 2d1dcf4..3fc35af 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache30/Bug34948DUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache30/Bug34948DUnitTest.java
@@ -16,6 +16,15 @@
  */
 package com.gemstone.gemfire.cache30;
 
+import org.junit.experimental.categories.Category;
+import org.junit.Test;
+
+import static org.junit.Assert.*;
+
+import com.gemstone.gemfire.test.dunit.cache.internal.JUnit4CacheTestCase;
+import com.gemstone.gemfire.test.dunit.internal.JUnit4DistributedTestCase;
+import com.gemstone.gemfire.test.junit.categories.DistributedTest;
+
 import java.io.DataInput;
 import java.io.DataOutput;
 import java.io.IOException;
@@ -41,10 +50,11 @@ import com.gemstone.gemfire.test.dunit.VM;
  *
  * @since GemFire 5.0
  */
-public class Bug34948DUnitTest extends CacheTestCase {
+@Category(DistributedTest.class)
+public class Bug34948DUnitTest extends JUnit4CacheTestCase {
 
-  public Bug34948DUnitTest(String name) {
-    super(name);
+  public Bug34948DUnitTest() {
+    super();
   }
 
   //////////////////////  Test Methods  //////////////////////
@@ -98,6 +108,7 @@ public class Bug34948DUnitTest extends CacheTestCase {
    * Make sure that value is only deserialized in cache whose application
    * asks for the value.
    */
+  @Test
   public void testBug34948() throws CacheException {
     final AttributesFactory factory = new AttributesFactory();
     factory.setScope(Scope.DISTRIBUTED_ACK);

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/b914df23/geode-core/src/test/java/com/gemstone/gemfire/cache30/Bug35214DUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache30/Bug35214DUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache30/Bug35214DUnitTest.java
index 9714bdd..02f065d 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache30/Bug35214DUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache30/Bug35214DUnitTest.java
@@ -16,6 +16,15 @@
  */
 package com.gemstone.gemfire.cache30;
 
+import org.junit.experimental.categories.Category;
+import org.junit.Test;
+
+import static org.junit.Assert.*;
+
+import com.gemstone.gemfire.test.dunit.cache.internal.JUnit4CacheTestCase;
+import com.gemstone.gemfire.test.dunit.internal.JUnit4DistributedTestCase;
+import com.gemstone.gemfire.test.junit.categories.DistributedTest;
+
 import com.gemstone.gemfire.SystemFailure;
 import com.gemstone.gemfire.cache.AttributesFactory;
 import com.gemstone.gemfire.cache.CacheException;
@@ -43,7 +52,8 @@ import com.gemstone.gemfire.test.dunit.WaitCriterion;
  *
  * @since GemFire 5.0
  */
-public class Bug35214DUnitTest extends CacheTestCase {
+@Category(DistributedTest.class)
+public class Bug35214DUnitTest extends JUnit4CacheTestCase {
 
   protected volatile int expirationCount = 0;
 
@@ -51,8 +61,8 @@ public class Bug35214DUnitTest extends CacheTestCase {
 
   protected static volatile boolean callbackFailure;
   
-  public Bug35214DUnitTest(String name) {
-    super(name);
+  public Bug35214DUnitTest() {
+    super();
   }
 
   private VM getOtherVm() {
@@ -148,6 +158,7 @@ public class Bug35214DUnitTest extends CacheTestCase {
   /**
    * make sure entries do not expire during a GII
    */
+  @Test
   public void testNoEntryExpireDuringGII() throws Exception {
     initOtherVm();
     AsyncInvocation updater = null;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/b914df23/geode-core/src/test/java/com/gemstone/gemfire/cache30/Bug38013DUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache30/Bug38013DUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache30/Bug38013DUnitTest.java
index 2c76556..da33c71 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache30/Bug38013DUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache30/Bug38013DUnitTest.java
@@ -16,6 +16,15 @@
  */
 package com.gemstone.gemfire.cache30;
 
+import org.junit.experimental.categories.Category;
+import org.junit.Test;
+
+import static org.junit.Assert.*;
+
+import com.gemstone.gemfire.test.dunit.cache.internal.JUnit4CacheTestCase;
+import com.gemstone.gemfire.test.dunit.internal.JUnit4DistributedTestCase;
+import com.gemstone.gemfire.test.junit.categories.DistributedTest;
+
 import java.io.DataInput;
 import java.io.DataOutput;
 import java.io.IOException;
@@ -40,10 +49,11 @@ import com.gemstone.gemfire.test.dunit.VM;
  *
  * @since GemFire 5.0
  */
-public class Bug38013DUnitTest extends CacheTestCase {
+@Category(DistributedTest.class)
+public class Bug38013DUnitTest extends JUnit4CacheTestCase {
 
-  public Bug38013DUnitTest(String name) {
-    super(name);
+  public Bug38013DUnitTest() {
+    super();
   }
 
   //////////////////////  Test Methods  //////////////////////
@@ -100,6 +110,7 @@ public class Bug38013DUnitTest extends CacheTestCase {
    * Make sure that value is only deserialized in cache whose application
    * asks for the value.
    */
+  @Test
   public void testBug38013() throws CacheException {
     final AttributesFactory factory = new AttributesFactory();
     PartitionAttributesFactory paf = new PartitionAttributesFactory();

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/b914df23/geode-core/src/test/java/com/gemstone/gemfire/cache30/Bug38741DUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache30/Bug38741DUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache30/Bug38741DUnitTest.java
index 49a6ce6..830eead 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache30/Bug38741DUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache30/Bug38741DUnitTest.java
@@ -16,36 +16,58 @@
  */
 package com.gemstone.gemfire.cache30;
 
+import static com.gemstone.gemfire.distributed.DistributedSystemConfigProperties.*;
+import static com.gemstone.gemfire.test.dunit.Assert.*;
+
+import java.io.DataInput;
+import java.io.DataOutput;
+import java.io.IOException;
+import java.util.Collection;
+import java.util.Properties;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.atomic.AtomicInteger;
+
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
 import com.gemstone.gemfire.CopyHelper;
 import com.gemstone.gemfire.DataSerializable;
 import com.gemstone.gemfire.DataSerializer;
-import com.gemstone.gemfire.cache.*;
+import com.gemstone.gemfire.cache.AttributesFactory;
+import com.gemstone.gemfire.cache.CacheException;
+import com.gemstone.gemfire.cache.InterestResultPolicy;
+import com.gemstone.gemfire.cache.PartitionAttributesFactory;
+import com.gemstone.gemfire.cache.Region;
+import com.gemstone.gemfire.cache.RegionAttributes;
+import com.gemstone.gemfire.cache.Scope;
 import com.gemstone.gemfire.internal.NanoTimer;
-import com.gemstone.gemfire.internal.cache.*;
+import com.gemstone.gemfire.internal.cache.BucketRegion;
 import com.gemstone.gemfire.internal.cache.BucketRegion.RawValue;
+import com.gemstone.gemfire.internal.cache.CacheServerImpl;
+import com.gemstone.gemfire.internal.cache.CachedDeserializable;
+import com.gemstone.gemfire.internal.cache.EnumListenerEvent;
+import com.gemstone.gemfire.internal.cache.EventID;
+import com.gemstone.gemfire.internal.cache.KeyInfo;
+import com.gemstone.gemfire.internal.cache.LocalRegion;
+import com.gemstone.gemfire.internal.cache.PartitionedRegion;
 import com.gemstone.gemfire.internal.cache.PartitionedRegionDataStore.BucketVisitor;
 import com.gemstone.gemfire.internal.cache.ha.HARegionQueue;
 import com.gemstone.gemfire.internal.cache.tier.sockets.CacheClientProxy;
 import com.gemstone.gemfire.internal.cache.tier.sockets.ClientProxyMembershipID;
 import com.gemstone.gemfire.internal.cache.tier.sockets.ClientUpdateMessageImpl;
-import com.gemstone.gemfire.test.dunit.*;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-import java.util.Collection;
-import java.util.Properties;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.atomic.AtomicInteger;
-
-import static com.gemstone.gemfire.distributed.DistributedSystemConfigProperties.*;
+import com.gemstone.gemfire.test.dunit.Assert;
+import com.gemstone.gemfire.test.dunit.Host;
+import com.gemstone.gemfire.test.dunit.NetworkUtils;
+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.junit.categories.DistributedTest;
 
 /**
- *
  * @since GemFire bugfix5.7
  */
+@Category(DistributedTest.class)
 public class Bug38741DUnitTest extends ClientServerTestCase {
-  private static final long serialVersionUID = 1L;
 
   protected RegionAttributes getRegionAttributes() {
     AttributesFactory factory = new AttributesFactory();
@@ -53,16 +75,13 @@ public class Bug38741DUnitTest extends ClientServerTestCase {
     return factory.create();
   }
 
-  public Bug38741DUnitTest(String name) {
-    super(name);
-  }
-
   /**
    * Test that CopyOnRead doesn't cause {@link HARegionQueue#peek()} to create a copy,
    * assuming that creating copies performs a serialize and de-serialize operation.
    * @throws Exception when there is a failure
    * @since GemFire bugfix5.7
    */
+  @Test
   public void testCopyOnReadWithBridgeServer() throws Exception {
     final Host h = Host.getHost(0);
     final VM client = h.getVM(2);
@@ -245,6 +264,7 @@ public class Bug38741DUnitTest extends ClientServerTestCase {
    * expected number of copies when copy-on-read is set to true
    * @throws Exception
    */
+  @Test
   public void testPartitionedRegionAndCopyOnRead() throws Exception {
     final Host h = Host.getHost(0);
     final VM accessor = h.getVM(2);

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/b914df23/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheCloseDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheCloseDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheCloseDUnitTest.java
index 798fc1b..338a842 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheCloseDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheCloseDUnitTest.java
@@ -16,6 +16,15 @@
  */
 package com.gemstone.gemfire.cache30;
 
+import org.junit.experimental.categories.Category;
+import org.junit.Test;
+
+import static org.junit.Assert.*;
+
+import com.gemstone.gemfire.test.dunit.cache.internal.JUnit4CacheTestCase;
+import com.gemstone.gemfire.test.dunit.internal.JUnit4DistributedTestCase;
+import com.gemstone.gemfire.test.junit.categories.DistributedTest;
+
 import java.util.ArrayList;
 import java.util.Iterator;
 import java.util.List;
@@ -32,10 +41,11 @@ import com.gemstone.gemfire.cache.RegionAttributes;
  *
  * @since GemFire 3.0
  */
-public class CacheCloseDUnitTest extends CacheTestCase {
+@Category(DistributedTest.class)
+public class CacheCloseDUnitTest extends JUnit4CacheTestCase {
 
-  public CacheCloseDUnitTest(String name) {
-    super(name);
+  public CacheCloseDUnitTest() {
+    super();
   }
 
   private RegionAttributes createAtts(List callbacks) {
@@ -72,6 +82,7 @@ public class CacheCloseDUnitTest extends CacheTestCase {
   
   //////////////////////  Test Methods  //////////////////////
 
+  @Test
   public void testCallbacksClosed() throws CacheException {
     {
       List callbacks = new ArrayList();

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/b914df23/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheListenerTestCase.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheListenerTestCase.java b/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheListenerTestCase.java
index ac028db..1980848 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheListenerTestCase.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheListenerTestCase.java
@@ -16,6 +16,15 @@
  */
 package com.gemstone.gemfire.cache30;
 
+import org.junit.experimental.categories.Category;
+import org.junit.Test;
+
+import static org.junit.Assert.*;
+
+import com.gemstone.gemfire.test.dunit.cache.internal.JUnit4CacheTestCase;
+import com.gemstone.gemfire.test.dunit.internal.JUnit4DistributedTestCase;
+import com.gemstone.gemfire.test.junit.categories.DistributedTest;
+
 import com.gemstone.gemfire.cache.AttributesFactory;
 import com.gemstone.gemfire.cache.CacheException;
 import com.gemstone.gemfire.cache.CacheListener;
@@ -39,8 +48,8 @@ import com.gemstone.gemfire.test.dunit.Wait;
 public abstract class CacheListenerTestCase
   extends CacheLoaderTestCase {
 
-  public CacheListenerTestCase(String name) {
-    super(name);
+  public CacheListenerTestCase() {
+    super();
   }
 
   ///////////////////////  Test Methods  ///////////////////////
@@ -49,6 +58,7 @@ public abstract class CacheListenerTestCase
    * Tests that the <code>CacheListener</code> is called after an entry
    * is {@linkplain CacheListener#afterCreate created}.
    */
+  @Test
   public void testCacheListenerAfterCreate() throws CacheException {
     String name = this.getUniqueName();
     final Object key = this.getUniqueName();
@@ -102,6 +112,7 @@ public abstract class CacheListenerTestCase
    * Tests that the <code>CacheListener</code> is called after an entry
    * is {@linkplain CacheListener#afterUpdate updated}.
    */
+  @Test
   public void testCacheListenerAfterUpdate() throws CacheException {
     String name = this.getUniqueName();
     final Object key = this.getUniqueName();
@@ -168,6 +179,7 @@ public abstract class CacheListenerTestCase
    * Tests that the <code>CacheListener</code> is called after an
    * entry is {@linkplain CacheListener#afterDestroy destroyed}.
    */
+  @Test
   public void testCacheListenerAfterDestroy() throws CacheException {
     String name = this.getUniqueName();
     final Object key = this.getUniqueName();
@@ -212,6 +224,7 @@ public abstract class CacheListenerTestCase
    * Tests that the <code>CacheListener</code> is called after an
    * entry is {@linkplain CacheListener#afterInvalidate invalidated}.
    */
+  @Test
   public void testCacheListenerAfterInvalidate() throws CacheException {
     String name = this.getUniqueName();
     final Object key = this.getUniqueName();
@@ -258,6 +271,7 @@ public abstract class CacheListenerTestCase
     assertFalse(listener.wasInvoked());
   }
   
+  @Test
   public void testCacheListenerAfterInvalidateWithForce() throws CacheException {
     AbstractRegionMap.FORCE_INVALIDATE_EVENT = true;
     try {
@@ -321,6 +335,7 @@ public abstract class CacheListenerTestCase
    * @see CacheListener#afterRegionDestroy
    * @see CacheListener#close
    */
+  @Test
   public void testCacheListenerAfterRegionDestroy()
     throws CacheException,InterruptedException {
 
@@ -381,6 +396,7 @@ public abstract class CacheListenerTestCase
    * @see CacheListener#afterRegionInvalidate
    * @see CacheListener#close
    */
+  @Test
   public void testCacheListenerAfterRegionInvalidate()
     throws CacheException, InterruptedException  {
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/b914df23/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheLoaderTestCase.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheLoaderTestCase.java b/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheLoaderTestCase.java
index 265e086..3f08137 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheLoaderTestCase.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheLoaderTestCase.java
@@ -16,6 +16,15 @@
  */
 package com.gemstone.gemfire.cache30;
 
+import org.junit.experimental.categories.Category;
+import org.junit.Test;
+
+import static org.junit.Assert.*;
+
+import com.gemstone.gemfire.test.dunit.cache.internal.JUnit4CacheTestCase;
+import com.gemstone.gemfire.test.dunit.internal.JUnit4DistributedTestCase;
+import com.gemstone.gemfire.test.junit.categories.DistributedTest;
+
 import com.gemstone.gemfire.cache.AttributesFactory;
 import com.gemstone.gemfire.cache.CacheException;
 import com.gemstone.gemfire.cache.CacheLoader;
@@ -40,12 +49,13 @@ import com.gemstone.gemfire.test.dunit.Wait;
 public abstract class CacheLoaderTestCase
   extends CacheWriterTestCase {
 
-  public CacheLoaderTestCase(String name) {
-    super(name);
+  public CacheLoaderTestCase() {
+    super();
   }
 
   ///////////////////////  Test Methods  ///////////////////////
 
+  @Test
   public void testCacheLoader() throws CacheException {
     final String name = this.getUniqueName();
     final Object key = this.getUniqueName();
@@ -183,6 +193,7 @@ public abstract class CacheLoaderTestCase
    * Tests what happens when a {@link CacheLoader} returns
    * <code>null</code> from its {@link CacheLoader#load load} method.
    */
+  @Test
   public void testCacheLoaderNull() throws CacheException {
     TestCacheLoader loader = new TestCacheLoader() {
         public Object load2(LoaderHelper helper)
@@ -208,6 +219,7 @@ public abstract class CacheLoaderTestCase
    * Tests that a <code>CacheWriter</code> gets invoked on a
    * <code>load</code>.
    */
+  @Test
   public void testCacheWriterOnLoad() throws CacheException {
     final String name = this.getUniqueName();
     final Object key = this.getUniqueName();
@@ -269,6 +281,7 @@ public abstract class CacheLoaderTestCase
    * Tests that a <code>CacheListener</code> gets invoked on a
    * <code>load</code>.
    */
+  @Test
   public void testCacheListenerOnLoad()
     throws CacheException, InterruptedException {
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/b914df23/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheLogRollDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheLogRollDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheLogRollDUnitTest.java
index 212c5a8..8802328 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheLogRollDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheLogRollDUnitTest.java
@@ -16,30 +16,35 @@
  */
 package com.gemstone.gemfire.cache30;
 
-import com.gemstone.gemfire.distributed.DistributedSystem;
-import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
-import com.gemstone.gemfire.internal.logging.InternalLogWriter;
-import com.gemstone.gemfire.test.junit.categories.FlakyTest;
-import org.junit.experimental.categories.Category;
+import static com.gemstone.gemfire.distributed.DistributedSystemConfigProperties.*;
+import static org.junit.Assert.*;
 
-import java.io.*;
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.FileReader;
+import java.io.FilenameFilter;
+import java.io.IOException;
 import java.util.Properties;
 import java.util.regex.Pattern;
 
-import static com.gemstone.gemfire.distributed.DistributedSystemConfigProperties.*;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
+import com.gemstone.gemfire.distributed.DistributedSystem;
+import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
+import com.gemstone.gemfire.internal.logging.InternalLogWriter;
+import com.gemstone.gemfire.test.dunit.cache.internal.JUnit4CacheTestCase;
+import com.gemstone.gemfire.test.junit.categories.DistributedTest;
+import com.gemstone.gemfire.test.junit.categories.FlakyTest;
 
 /**
  * Test to make sure cache close is working.
  *
  * @since GemFire 6.5
  */
-public class CacheLogRollDUnitTest extends CacheTestCase {
-
-  public CacheLogRollDUnitTest(String name) {
-    super(name);
-  }
-
-  //////////////////////  Test Methods  //////////////////////
+@Category(DistributedTest.class)
+public class CacheLogRollDUnitTest extends JUnit4CacheTestCase {
 
   private void logAndRollAndVerify(String baseLogName,
       DistributedSystem ds,String mainId) throws FileNotFoundException, IOException {
@@ -215,6 +220,7 @@ public class CacheLogRollDUnitTest extends CacheTestCase {
     }
   }
 
+  @Test
   public void testDiskSpace() throws Exception {
     Properties props = new Properties();
     String baseLogName = "diskarito";
@@ -226,14 +232,15 @@ public class CacheLogRollDUnitTest extends CacheTestCase {
     for(int i=0;i<10;i++) {
      ds = this.getSystem(props);
      ds.disconnect();
-     }
+    }
 
-     /*
-      * This was throwing NPEs until my fix...
-      */
+   /*
+    * This was throwing NPEs until my fix...
+    */
   }
 
   @Category(FlakyTest.class) // GEODE-674: possible disk pollution, file size sensitive
+  @Test
   public void testSimpleStartRestartWithRolling() throws Exception {
     Properties props = new Properties();
     String baseLogName = "restarto";
@@ -290,10 +297,10 @@ public class CacheLogRollDUnitTest extends CacheTestCase {
         assertTrue("We are hoping that:"+lfl+" exists",f1l.exists());
         ds.disconnect();
     }
-
   }
 
   @Category(FlakyTest.class) // GEODE-677: possible disk pollution, file size sensitive
+  @Test
   public void testStartWithRollingThenRestartWithRolling() throws Exception {
     Properties props = new Properties();
     String baseLogName = "biscuits";
@@ -370,74 +377,75 @@ public class CacheLogRollDUnitTest extends CacheTestCase {
   }
 
   @Category(FlakyTest.class) // GEODE-676: possible disk pollution, file size sensitive
+  @Test
   public void testLogFileLayoutAndRolling() throws Exception {
     String baseLogName = "tacos";
-      Properties props = new Properties();
-      
-      String logfile = baseLogName+".log";
+    Properties props = new Properties();
+
+    String logfile = baseLogName+".log";
     props.put(LOG_FILE, logfile);
     props.put(LOG_FILE_SIZE_LIMIT, "1");
     props.put(LOG_LEVEL, "config");
       
-      DistributedSystem ds = getSystem(props);
-      InternalDistributedSystem ids = (InternalDistributedSystem) ds;
-      assertEquals(InternalLogWriter.INFO_LEVEL, ((InternalLogWriter)ids.getLogWriter()).getLogWriterLevel());
+    DistributedSystem ds = getSystem(props);
+    InternalDistributedSystem ids = (InternalDistributedSystem) ds;
+    assertEquals(InternalLogWriter.INFO_LEVEL, ((InternalLogWriter)ids.getLogWriter()).getLogWriterLevel());
 
-      // Lets figure out the mainId we start with
-      String mainId;
-      {
-        final Pattern mainIdPattern = Pattern.compile("meta-" + baseLogName + "-\\d+.log");
-        File[] metaLogs = new File(".").listFiles(new FilenameFilter() {
-            public boolean accept(File d, String name) {
-              return mainIdPattern.matcher(name).matches();
-            }
-          });
-        assertEquals(1, metaLogs.length);
-        String f = metaLogs[0].getName();
-        int idx = f.lastIndexOf("-");
-        int idx2 = f.lastIndexOf(".");
-        mainId = f.substring(idx+1, idx2);
-      }
-      ds.getProperties();
-      logAndRollAndVerify(baseLogName, ds, mainId);
-      
+    // Lets figure out the mainId we start with
+    String mainId;
+    {
+      final Pattern mainIdPattern = Pattern.compile("meta-" + baseLogName + "-\\d+.log");
+      File[] metaLogs = new File(".").listFiles(new FilenameFilter() {
+          public boolean accept(File d, String name) {
+            return mainIdPattern.matcher(name).matches();
+          }
+        });
+      assertEquals(1, metaLogs.length);
+      String f = metaLogs[0].getName();
+      int idx = f.lastIndexOf("-");
+      int idx2 = f.lastIndexOf(".");
+      mainId = f.substring(idx+1, idx2);
+    }
+    ds.getProperties();
+    logAndRollAndVerify(baseLogName, ds, mainId);
   }
 
   @Category(FlakyTest.class) // GEODE-675: possible disk pollution, file size sensitive
+  @Test
   public void testSecurityLogFileLayoutAndRolling() throws Exception {
     String baseLogName = "securitytacos";
-      Properties props = new Properties();
-      
-      String logfile = baseLogName+".log";
-      String sec_logfile = "sec_"+baseLogName+".log";
+    Properties props = new Properties();
+
+    String logfile = baseLogName+".log";
+    String sec_logfile = "sec_"+baseLogName+".log";
     props.put(LOG_FILE, logfile);
     props.put(LOG_FILE_SIZE_LIMIT, "1");
     props.put(LOG_LEVEL, "config");
     props.put(SECURITY_LOG_FILE, sec_logfile);
     props.put(SECURITY_LOG_LEVEL, "config");
       
-      DistributedSystem ds = getSystem(props);
-      InternalDistributedSystem ids = (InternalDistributedSystem) ds;
-      assertEquals(InternalLogWriter.INFO_LEVEL, ((InternalLogWriter)ids.getLogWriter()).getLogWriterLevel());
-      assertEquals(InternalLogWriter.INFO_LEVEL, ((InternalLogWriter)ids.getSecurityLogWriter()).getLogWriterLevel());
+    DistributedSystem ds = getSystem(props);
+    InternalDistributedSystem ids = (InternalDistributedSystem) ds;
+    assertEquals(InternalLogWriter.INFO_LEVEL, ((InternalLogWriter)ids.getLogWriter()).getLogWriterLevel());
+    assertEquals(InternalLogWriter.INFO_LEVEL, ((InternalLogWriter)ids.getSecurityLogWriter()).getLogWriterLevel());
 
-      // Lets figure out the mainId we start with
-      String mainId;
-      {
-        final Pattern mainIdPattern = Pattern.compile("meta-" + baseLogName + "-\\d+.log");
-        File[] metaLogs = new File(".").listFiles(new FilenameFilter() {
-            public boolean accept(File d, String name) {
-              return mainIdPattern.matcher(name).matches();
-            }
-          });
-        assertEquals(1, metaLogs.length);
-        String f = metaLogs[0].getName();
-        int idx = f.lastIndexOf("-");
-        int idx2 = f.lastIndexOf(".");
-        mainId = f.substring(idx+1, idx2);
-      }
-      ds.getProperties();
-      SecurityLogAndRollAndVerify(baseLogName, ds, mainId);
+    // Lets figure out the mainId we start with
+    String mainId;
+    {
+      final Pattern mainIdPattern = Pattern.compile("meta-" + baseLogName + "-\\d+.log");
+      File[] metaLogs = new File(".").listFiles(new FilenameFilter() {
+          public boolean accept(File d, String name) {
+            return mainIdPattern.matcher(name).matches();
+          }
+        });
+      assertEquals(1, metaLogs.length);
+      String f = metaLogs[0].getName();
+      int idx = f.lastIndexOf("-");
+      int idx2 = f.lastIndexOf(".");
+      mainId = f.substring(idx+1, idx2);
+    }
+    ds.getProperties();
+    SecurityLogAndRollAndVerify(baseLogName, ds, mainId);
   }
 
   String getLogContents(String logfile) throws FileNotFoundException,IOException {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/b914df23/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheMapTxnDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheMapTxnDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheMapTxnDUnitTest.java
index af604f2..b923ece 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheMapTxnDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheMapTxnDUnitTest.java
@@ -22,15 +22,35 @@
  */
 package com.gemstone.gemfire.cache30;
 
-import com.gemstone.gemfire.cache.*;
-import com.gemstone.gemfire.distributed.DistributedSystem;
-import com.gemstone.gemfire.test.dunit.*;
+import static org.junit.Assert.*;
 
 import java.util.Properties;
 import java.util.Set;
 
-public class CacheMapTxnDUnitTest extends DistributedTestCase{
-    
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
+import com.gemstone.gemfire.cache.AttributesFactory;
+import com.gemstone.gemfire.cache.Cache;
+import com.gemstone.gemfire.cache.CacheFactory;
+import com.gemstone.gemfire.cache.CacheTransactionManager;
+import com.gemstone.gemfire.cache.DataPolicy;
+import com.gemstone.gemfire.cache.Region;
+import com.gemstone.gemfire.cache.RegionAttributes;
+import com.gemstone.gemfire.cache.Scope;
+import com.gemstone.gemfire.cache.UnsupportedOperationInTransactionException;
+import com.gemstone.gemfire.distributed.DistributedSystem;
+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.ThreadUtils;
+import com.gemstone.gemfire.test.dunit.VM;
+import com.gemstone.gemfire.test.dunit.internal.JUnit4DistributedTestCase;
+import com.gemstone.gemfire.test.junit.categories.DistributedTest;
+
+@Category(DistributedTest.class)
+public class CacheMapTxnDUnitTest extends JUnit4DistributedTestCase { // TODO: reformat
+
     protected static Cache cache;
     protected static Properties props = new Properties();
     static DistributedSystem ds = null;
@@ -38,11 +58,6 @@ public class CacheMapTxnDUnitTest extends DistributedTestCase{
     static Region mirroredRegion;
     protected static CacheTransactionManager cacheTxnMgr;
     
-    /** Creates a new instance of CacheMapTxnDUnitTest */
-    public CacheMapTxnDUnitTest(String name) {
-        super(name);
-    }
-    
     @Override
     public final void postSetUp() throws Exception {
       Host host = Host.getHost(0);
@@ -69,7 +84,7 @@ public class CacheMapTxnDUnitTest extends DistributedTestCase{
         try{
             //            props.setProperty(DistributionConfig.SystemConfigurationProperties.MCAST_PORT, "1234");
             //            ds = DistributedSystem.connect(props);
-            ds = (new CacheMapTxnDUnitTest("temp")).getSystem(props);
+            ds = (new CacheMapTxnDUnitTest()).getSystem(props);
             cache = CacheFactory.create(ds);
             AttributesFactory factory  = new AttributesFactory();
             factory.setScope(Scope.DISTRIBUTED_ACK);
@@ -78,7 +93,7 @@ public class CacheMapTxnDUnitTest extends DistributedTestCase{
             region = cache.createRegion("map", attr);
             
         } catch (Exception ex){
-            ex.printStackTrace();
+            throw new AssertionError(ex);
         }
     }
     
@@ -87,25 +102,28 @@ public class CacheMapTxnDUnitTest extends DistributedTestCase{
             cache.close();
             ds.disconnect();            
         } catch (Exception ex){
-            ex.printStackTrace();
+          throw new AssertionError(ex);
         }
     }
     
-    public void testCommitTxn() {
+  @Test
+  public void testCommitTxn() {
         //this is to test single VM region transactions
         Host host = Host.getHost(0);
         VM vm0 = host.getVM(0);
         vm0.invoke(() -> CacheMapTxnDUnitTest.commitTxn());
     }//end of testCommitTxn
     
-    public void testRollbackTxn() {
+  @Test
+  public void testRollbackTxn() {
         //this is to test single VM region transactions
         Host host = Host.getHost(0);
         VM vm0 = host.getVM(0);
         vm0.invoke(() -> CacheMapTxnDUnitTest.rollbackTxn());
     }//end of testRollbackTxn
     
-    public void testRollbackTxnClear() {
+  @Test
+  public void testRollbackTxnClear() {
         //this is to test single VM region transactions
         Host host = Host.getHost(0);
         VM vm0 = host.getVM(0);
@@ -130,7 +148,8 @@ public class CacheMapTxnDUnitTest extends DistributedTestCase{
         }
     }//end of testRollbackTxnClear
     
-    public void testMiscMethods() throws Throwable{
+  @Test
+  public void testMiscMethods() throws Throwable{
         Host host = Host.getHost(0);
         VM vm0 = host.getVM(0);
         VM vm1 = host.getVM(1);
@@ -245,8 +264,7 @@ public class CacheMapTxnDUnitTest extends DistributedTestCase{
             
         }
         catch(Exception ex){
-            ex.printStackTrace();
-            fail("failed in commitTxn");
+          throw new AssertionError(ex);
         }
         finally{
             if(cacheTxnMgr.exists()){
@@ -350,8 +368,7 @@ public class CacheMapTxnDUnitTest extends DistributedTestCase{
             
         }
         catch(Exception ex){
-            ex.printStackTrace();
-            fail("failed in rollbackTxn");
+          throw new AssertionError(ex);
         }
         finally{
             if(cacheTxnMgr.exists()){
@@ -395,8 +412,7 @@ public class CacheMapTxnDUnitTest extends DistributedTestCase{
         }
         catch(Exception ex){
             cacheTxnMgr = null;
-            ex.printStackTrace();
-            fail("failed in rollbackTxnClear");
+          throw new AssertionError(ex);
         }
         
     }//end of rollbackTxnClear
@@ -447,8 +463,7 @@ public class CacheMapTxnDUnitTest extends DistributedTestCase{
             
         }
         catch(Exception ex){
-            ex.printStackTrace();
-            fail("failed in miscMethodsOwner");
+          throw new AssertionError(ex);
         }
         finally{
             if(cacheTxnMgr.exists()){
@@ -488,8 +503,7 @@ public class CacheMapTxnDUnitTest extends DistributedTestCase{
             
         }
         catch(Exception ex){
-            ex.printStackTrace();
-            fail("failed in miscMethodsNotOwner");
+          throw new AssertionError(ex);
         }
     }//end of miscMethodsNotOwner
     
@@ -504,8 +518,7 @@ public class CacheMapTxnDUnitTest extends DistributedTestCase{
                 obj = region.put(ob, str);
             }
         }catch(Exception ex){
-            ex.printStackTrace();
-            fail("Failed while region.put");
+          throw new AssertionError(ex);
         }
         return obj;
     }
@@ -515,7 +528,7 @@ public class CacheMapTxnDUnitTest extends DistributedTestCase{
         try{
             obj = region.get(ob);
         } catch(Exception ex){
-            fail("Failed while region.get");
+          throw new AssertionError(ex);
         }
         return obj;
     }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/b914df23/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheRegionsReliablityStatsCheckDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheRegionsReliablityStatsCheckDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheRegionsReliablityStatsCheckDUnitTest.java
index c133d5c..3e9fffb 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheRegionsReliablityStatsCheckDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheRegionsReliablityStatsCheckDUnitTest.java
@@ -16,28 +16,38 @@
  */
 package com.gemstone.gemfire.cache30;
 
-import com.gemstone.gemfire.cache.*;
+import static com.gemstone.gemfire.distributed.DistributedSystemConfigProperties.*;
+import static com.gemstone.gemfire.test.dunit.Assert.*;
+
+import java.util.Properties;
+
+import org.junit.Test;
+
+import com.gemstone.gemfire.cache.AttributesFactory;
+import com.gemstone.gemfire.cache.Cache;
+import com.gemstone.gemfire.cache.CacheException;
+import com.gemstone.gemfire.cache.DataPolicy;
+import com.gemstone.gemfire.cache.LossAction;
+import com.gemstone.gemfire.cache.MembershipAttributes;
+import com.gemstone.gemfire.cache.RegionAttributes;
+import com.gemstone.gemfire.cache.ResumptionAction;
+import com.gemstone.gemfire.cache.Scope;
 import com.gemstone.gemfire.internal.cache.CachePerfStats;
 import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
 import com.gemstone.gemfire.test.dunit.Host;
 import com.gemstone.gemfire.test.dunit.LogWriterUtils;
 import com.gemstone.gemfire.test.dunit.SerializableRunnable;
 import com.gemstone.gemfire.test.dunit.VM;
+import com.gemstone.gemfire.test.dunit.cache.internal.JUnit4CacheTestCase;
 
-import java.util.Properties;
-
-import static com.gemstone.gemfire.distributed.DistributedSystemConfigProperties.*;
-
-public class CacheRegionsReliablityStatsCheckDUnitTest extends CacheTestCase {
-  public CacheRegionsReliablityStatsCheckDUnitTest(String name) {
-    super(name);
-  }
+public class CacheRegionsReliablityStatsCheckDUnitTest extends JUnit4CacheTestCase {
 
   /**
    * The tests check to see if all the reliablity stats are working
    * fine and asserts their values to constants.
    */
-  public void testRegionsReliablityStats() throws Exception, RegionExistsException {
+	@Test
+  public void testRegionsReliablityStats() throws Exception {
     final String rr1 = "roleA";
     final String regionNoAccess = "regionNoAccess";
     final String regionLimitedAccess = "regionLimitedAccess";

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/b914df23/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheSerializableRunnable.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheSerializableRunnable.java b/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheSerializableRunnable.java
index 4e01601..b43e6de 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheSerializableRunnable.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheSerializableRunnable.java
@@ -22,21 +22,15 @@ import com.gemstone.gemfire.cache.CacheRuntimeException;
 import com.gemstone.gemfire.test.dunit.RepeatableRunnable;
 import com.gemstone.gemfire.test.dunit.SerializableRunnable;
 
-import junit.framework.AssertionFailedError;
-
 /**
  * A helper class that provides the {@link SerializableRunnable}
  * class, but uses a {@link #run2} method instead that throws {@link
  * CacheException}.  This way, we don't need to have a lot of
  * try/catch code in the tests.
  *
- *
  * @since GemFire 3.0
  */
-public abstract class CacheSerializableRunnable
-  extends SerializableRunnable 
-  implements RepeatableRunnable 
-{
+public abstract class CacheSerializableRunnable extends SerializableRunnable implements RepeatableRunnable {
 
   /**
    * Creates a new <code>CacheSerializableRunnable</code> with the
@@ -50,7 +44,7 @@ public abstract class CacheSerializableRunnable
    * Creates a new <code>CacheSerializableRunnable</code> with the
    * given name
    */
-  public CacheSerializableRunnable(String name,Object[] args) {
+  public CacheSerializableRunnable(String name, Object[] args) {
     super(name);
     this.args = args;
   }
@@ -74,21 +68,21 @@ public abstract class CacheSerializableRunnable
   }
   
   /**
-   * Invokes the {@link #run} method.  If AssertionFailedError is thrown,
+   * Invokes the {@link #run} method.  If AssertionError is thrown,
    * and repeatTimeoutMs is >0, then repeat the {@link #run} method until
    * it either succeeds or repeatTimeoutMs milliseconds have passed.  The
-   * AssertionFailedError is only thrown to the caller if the last run
+   * AssertionError is only thrown to the caller if the last run
    * still throws it.
    */
   public final void runRepeatingIfNecessary(long repeatTimeoutMs) {
     long start = System.currentTimeMillis();
-    AssertionFailedError lastErr = null;
+    AssertionError lastErr = null;
     do {
       try {
         lastErr = null;
         this.run();
         CacheFactory.getAnyInstance().getLogger().fine("Completed " + this);
-      } catch (AssertionFailedError err) {
+      } catch (AssertionError err) {
         CacheFactory.getAnyInstance().getLogger().fine("Repeating " + this);
         lastErr = err;
         try {
@@ -109,19 +103,13 @@ public abstract class CacheSerializableRunnable
 
   public void run3() throws CacheException{}
 
-  /////////////////////////  Inner Classes  /////////////////////////
-
   /**
    * An exception that wraps a {@link CacheException}
    */
-  public static class CacheSerializableRunnableException 
-    extends CacheRuntimeException {
+  public static class CacheSerializableRunnableException extends CacheRuntimeException {
 
-    public CacheSerializableRunnableException(String message,
-                                              Throwable cause) {
+    public CacheSerializableRunnableException(String message, Throwable cause) {
       super(message, cause);
     }
-
   }
-
 }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/b914df23/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheStatisticsDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheStatisticsDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheStatisticsDUnitTest.java
index 8fd89ef..5621a3f 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheStatisticsDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheStatisticsDUnitTest.java
@@ -16,6 +16,15 @@
  */
 package com.gemstone.gemfire.cache30;
 
+import org.junit.experimental.categories.Category;
+import org.junit.Test;
+
+import static org.junit.Assert.*;
+
+import com.gemstone.gemfire.test.dunit.cache.internal.JUnit4CacheTestCase;
+import com.gemstone.gemfire.test.dunit.internal.JUnit4DistributedTestCase;
+import com.gemstone.gemfire.test.junit.categories.DistributedTest;
+
 import com.gemstone.gemfire.cache.AttributesFactory;
 import com.gemstone.gemfire.cache.CacheException;
 import com.gemstone.gemfire.cache.CacheStatistics;
@@ -36,10 +45,11 @@ import com.gemstone.gemfire.test.dunit.Wait;
  *
  * @since GemFire 3.0
  */
-public class CacheStatisticsDUnitTest extends CacheTestCase {
+@Category(DistributedTest.class)
+public class CacheStatisticsDUnitTest extends JUnit4CacheTestCase {
 
-  public CacheStatisticsDUnitTest(String name) {
-    super(name);
+  public CacheStatisticsDUnitTest() {
+    super();
   }
 
   ////////  Helper Methods
@@ -71,6 +81,7 @@ public class CacheStatisticsDUnitTest extends CacheTestCase {
    * {@link CacheStatistics#getMissCount miss count} are updated
    * properly for a local region and its entries.
    */
+  @Test
   public void testHitMissCount() throws CacheException {
     String name = this.getUniqueName();
     Object key = "KEY"; // value exists
@@ -182,6 +193,7 @@ public class CacheStatisticsDUnitTest extends CacheTestCase {
    * and its entries.  It also validates that the last modification
    * and last access times are propagated to parent regions.
    */
+  @Test
   public void testTimeStats() throws CacheException, InterruptedException
   {
     final long ESTAT_RES = 100; // the resolution, in ms, of entry stats
@@ -325,6 +337,7 @@ public class CacheStatisticsDUnitTest extends CacheTestCase {
    * time}.  It also validates that distributed operations do not
    * affect the hit and miss counts in remote caches.
    */
+  @Test
   public void testDistributedStats() {
     final String name = this.getUniqueName();
     final Object key = "KEY";
@@ -483,6 +496,7 @@ public class CacheStatisticsDUnitTest extends CacheTestCase {
    * Tests that an attempt to get statistics when they are disabled
    * results in a {@link StatisticsDisabledException}.
    */
+  @Test
   public void testDisabledStatistics() throws CacheException {
     String name = this.getUniqueName();
     Object key = "KEY";

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/b914df23/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheWriterTestCase.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheWriterTestCase.java b/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheWriterTestCase.java
index 1ad1caa..88a8fda 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheWriterTestCase.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheWriterTestCase.java
@@ -16,6 +16,15 @@
  */
 package com.gemstone.gemfire.cache30;
 
+import org.junit.experimental.categories.Category;
+import org.junit.Test;
+
+import static org.junit.Assert.*;
+
+import com.gemstone.gemfire.test.dunit.cache.internal.JUnit4CacheTestCase;
+import com.gemstone.gemfire.test.dunit.internal.JUnit4DistributedTestCase;
+import com.gemstone.gemfire.test.junit.categories.DistributedTest;
+
 import com.gemstone.gemfire.cache.*;
 //import com.gemstone.gemfire.cache.util.*;
 //import java.util.*;
@@ -32,8 +41,8 @@ import com.gemstone.gemfire.cache.*;
 public abstract class CacheWriterTestCase
   extends RegionAttributesTestCase {
 
-  public CacheWriterTestCase(String name) {
-    super(name);
+  public CacheWriterTestCase() {
+    super();
   }
 
   ///////////////////////  Test Methods  ///////////////////////
@@ -42,6 +51,7 @@ public abstract class CacheWriterTestCase
    * Tests that the <code>CacheWriter</code> is called before an entry
    * is {@linkplain CacheWriter#beforeCreate created}.
    */
+  @Test
   public void testCacheWriterBeforeCreate() throws CacheException {
     String name = this.getUniqueName();
     final Object key = this.getUniqueName();
@@ -130,6 +140,7 @@ public abstract class CacheWriterTestCase
    * Tests that the <code>CacheWriter</code> is called before an entry
    * is {@linkplain CacheWriter#beforeUpdate updated}.
    */
+  @Test
   public void testCacheWriterBeforeUpdate() throws CacheException {
     String name = this.getUniqueName();
     final Object key = this.getUniqueName();
@@ -238,6 +249,7 @@ public abstract class CacheWriterTestCase
    * Tests that the <code>CacheWriter</code> is called before an entry
    * is {@linkplain CacheWriter#beforeDestroy destroyed}.
    */
+  @Test
   public void testCacheWriterBeforeDestroy() throws CacheException {
     String name = this.getUniqueName();
     final Object key = this.getUniqueName();
@@ -311,6 +323,7 @@ public abstract class CacheWriterTestCase
    * @see CacheWriter#beforeRegionDestroy
    * @see CacheWriter#close
    */
+  @Test
   public void testCacheWriterBeforeRegionDestroy()
     throws CacheException {
 
@@ -392,6 +405,7 @@ public abstract class CacheWriterTestCase
    * Tests that a <code>CacheWriter</code> is <I>not</I> invoked on a
    * {@linkplain Region#localDestroyRegion local destroy}.
    */
+  @Test
   public void testCacheWriterLocalDestroy() throws CacheException {
     final String name = this.getUniqueName();
 
@@ -410,6 +424,7 @@ public abstract class CacheWriterTestCase
    * Tests that a {@link CacheWriter} throwing a {@link
    * CacheWriterException} aborts the operation.
    */
+  @Test
   public void testCacheWriterExceptionAborts() throws CacheException {
     final String name = this.getUniqueName();
     final String exception = "EXCEPTION";