geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hiteshkhame...@apache.org
Subject [24/97] [abbrv] [partial] incubator-geode git commit: GEODE-837: update tests from JUnit3 to JUnit4
Date Wed, 15 Jun 2016 16:42:05 GMT
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/b914df23/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRClientServerRegionFunctionExecutionNoSingleHopDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRClientServerRegionFunctionExecutionNoSingleHopDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRClientServerRegionFunctionExecutionNoSingleHopDUnitTest.java
index e70d260..c0bbe9a 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRClientServerRegionFunctionExecutionNoSingleHopDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRClientServerRegionFunctionExecutionNoSingleHopDUnitTest.java
@@ -16,6 +16,15 @@
  */
 package com.gemstone.gemfire.internal.cache.execute;
 
+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.EOFException;
 import java.io.IOException;
 import java.io.Serializable;
@@ -58,6 +67,7 @@ import com.gemstone.gemfire.test.dunit.Wait;
 import com.gemstone.gemfire.test.dunit.WaitCriterion;
 import com.gemstone.gemfire.test.junit.categories.FlakyTest;
 
+@Category(DistributedTest.class)
 public class PRClientServerRegionFunctionExecutionNoSingleHopDUnitTest extends PRClientServerTestBase {
   private static final String TEST_FUNCTION7 = TestFunction.TEST_FUNCTION7;
 
@@ -67,13 +77,14 @@ public class PRClientServerRegionFunctionExecutionNoSingleHopDUnitTest extends P
 
   private static int retryCount = 0;
 
-  public PRClientServerRegionFunctionExecutionNoSingleHopDUnitTest(String name) {
-    super(name);
+  public PRClientServerRegionFunctionExecutionNoSingleHopDUnitTest() {
+    super();
   }
 
   /*
    * Execution of the function on server with
    */
+  @Test
   public void testServerAllKeyExecution_byInstance() {
     createScenario();
     Function function = new TestFunction(true, TEST_FUNCTION2);
@@ -85,6 +96,7 @@ public class PRClientServerRegionFunctionExecutionNoSingleHopDUnitTest extends P
   /*
    * Execution of the function on server with
    */
+  @Test
   public void testServerGetAllFunction() {
     createScenario();
     client.invoke(() -> PRClientServerRegionFunctionExecutionNoSingleHopDUnitTest.getAll());
@@ -93,6 +105,7 @@ public class PRClientServerRegionFunctionExecutionNoSingleHopDUnitTest extends P
   /*
    * Execution of the function on server with
    */
+  @Test
   public void testServerPutAllFunction() {
     createScenario();
     client.invoke(() -> PRClientServerRegionFunctionExecutionNoSingleHopDUnitTest.putAll());
@@ -102,6 +115,7 @@ public class PRClientServerRegionFunctionExecutionNoSingleHopDUnitTest extends P
    * Execution of the function on server with single key as the routing object
    * and using the name of the function
    */
+  @Test
   public void testServerSingleKeyExecution_byName() {
     createScenario();
     Function function = new TestFunction(true, TEST_FUNCTION2);
@@ -116,6 +130,7 @@ public class PRClientServerRegionFunctionExecutionNoSingleHopDUnitTest extends P
    * of HA then system should retry the function execution. After 5th attempt
    * function will send Boolean as last result.
    */
+  @Test
   public void testserverSingleKeyExecution_FunctionInvocationTargetException() {
     createScenario();
     client.invoke(() -> PRClientServerRegionFunctionExecutionNoSingleHopDUnitTest.serverSingleKeyExecution_FunctionInvocationTargetException());
@@ -124,6 +139,7 @@ public class PRClientServerRegionFunctionExecutionNoSingleHopDUnitTest extends P
   /*
    * Execution of the function on server with bucket as filter
    */
+  @Test
   public void testBucketFilter(){
     createScenarioForBucketFilter();
     Function function = new TestFunction(true,TestFunction.TEST_FUNCTION_BUCKET_FILTER);
@@ -140,6 +156,7 @@ public class PRClientServerRegionFunctionExecutionNoSingleHopDUnitTest extends P
     client.invoke(() -> PRClientServerTestBase.serverBucketFilterExecution(bucketFilterSet));
   }
   
+  @Test
   public void testBucketFilterOverride(){
     createScenarioForBucketFilter();
     Function function = new TestFunction(true,TestFunction.TEST_FUNCTION_BUCKET_FILTER);
@@ -158,6 +175,7 @@ public class PRClientServerRegionFunctionExecutionNoSingleHopDUnitTest extends P
     
   }
 
+  @Test
   public void testServerSingleKeyExecution_SocketTimeOut() {
     createScenario();
     Function function = new TestFunction(true,
@@ -171,6 +189,7 @@ public class PRClientServerRegionFunctionExecutionNoSingleHopDUnitTest extends P
    * Execution of the function on server with single key as the routing object
    * and using the instance of the function
    */
+  @Test
   public void testServerSingleKeyExecution_byInstance() {
     createScenario();
     Function function = new TestFunction(true, TEST_FUNCTION2);
@@ -183,6 +202,7 @@ public class PRClientServerRegionFunctionExecutionNoSingleHopDUnitTest extends P
    * Execution of the inline function on server with single key as the routing
    * object
    */
+  @Test
   public void testServerSingleKeyExecution_byInlineFunction() {
     createScenario();
     client.invoke(() -> PRClientServerRegionFunctionExecutionNoSingleHopDUnitTest.serverSingleKeyExecution_Inline());
@@ -192,6 +212,7 @@ public class PRClientServerRegionFunctionExecutionNoSingleHopDUnitTest extends P
    * Execution of the function on server with set multiple keys as the routing
    * object and using the name of the function
    */
+  @Test
   public void testserverMultiKeyExecution_byName() {
     createScenario();
     Function function = new TestFunction(true, TEST_FUNCTION2);
@@ -203,6 +224,7 @@ public class PRClientServerRegionFunctionExecutionNoSingleHopDUnitTest extends P
     server3.invoke(() -> PRClientServerRegionFunctionExecutionNoSingleHopDUnitTest.checkBucketsOnServer());
   }
 
+  @Test
   public void testserverMultiKeyExecution_SocektTimeOut() {
     createScenario();
     Function function = new TestFunction(true,
@@ -216,6 +238,7 @@ public class PRClientServerRegionFunctionExecutionNoSingleHopDUnitTest extends P
    * Execution of the inline function on server with set multiple keys as the
    * routing object
    */
+  @Test
   public void testserverMultiKeyExecution_byInlineFunction() {
     createScenario();
     client.invoke(() -> PRClientServerRegionFunctionExecutionNoSingleHopDUnitTest.serverMultiKeyExecution_Inline());
@@ -228,6 +251,7 @@ public class PRClientServerRegionFunctionExecutionNoSingleHopDUnitTest extends P
    * After 5th attempt function will send Boolean as last result.
    */
   @Category(FlakyTest.class) // GEODE-600: network sensitive, random ports, configs lots of PoolFactory network attributes
+  @Test
   public void testserverMultiKeyExecution_FunctionInvocationTargetException() {
     createScenario();
     client.invoke(() -> PRClientServerRegionFunctionExecutionNoSingleHopDUnitTest.serverMultiKeyExecution_FunctionInvocationTargetException());
@@ -237,6 +261,7 @@ public class PRClientServerRegionFunctionExecutionNoSingleHopDUnitTest extends P
    * Execution of the function on server with set multiple keys as the routing
    * object and using the name of the function
    */
+  @Test
   public void testserverMultiKeyExecutionNoResult_byName() {
     createScenario();
     Function function = new TestFunction(false, TEST_FUNCTION7);
@@ -249,6 +274,7 @@ public class PRClientServerRegionFunctionExecutionNoSingleHopDUnitTest extends P
    * Execution of the function on server with set multiple keys as the routing
    * object and using the instance of the function
    */
+  @Test
   public void testserverMultiKeyExecution_byInstance() {
     createScenario();
     Function function = new TestFunction(true, TEST_FUNCTION2);
@@ -262,6 +288,7 @@ public class PRClientServerRegionFunctionExecutionNoSingleHopDUnitTest extends P
    * that the routing logic works correctly such that there is not extra
    * execution
    */
+  @Test
   public void testserverMultiKeyExecutionOnASingleBucket_byName() {
     createScenario();
     Function function = new TestFunction(true, TEST_FUNCTION2);
@@ -275,6 +302,7 @@ public class PRClientServerRegionFunctionExecutionNoSingleHopDUnitTest extends P
    * that the routing logic works correctly such that there is not extra
    * execution
    */
+  @Test
   public void testserverMultiKeyExecutionOnASingleBucket_byInstance() {
     createScenario();
     Function function = new TestFunction(true, TEST_FUNCTION2);
@@ -287,6 +315,7 @@ public class PRClientServerRegionFunctionExecutionNoSingleHopDUnitTest extends P
    * Ensure that the while executing the function if the servers is down then
    * the execution is failover to other available server
    */
+  @Test
   public void testServerFailoverWithTwoServerAliveHA()
       throws InterruptedException {
     IgnoredException.addIgnoredException("FunctionInvocationTargetException");
@@ -320,6 +349,7 @@ public class PRClientServerRegionFunctionExecutionNoSingleHopDUnitTest extends P
    * Ensure that the while executing the function if the servers is down then
    * the execution is failover to other available server
    */
+  @Test
   public void testServerCacheClosedFailoverWithTwoServerAliveHA()
       throws InterruptedException {
     IgnoredException.addIgnoredException("FunctionInvocationTargetException");
@@ -347,6 +377,7 @@ public class PRClientServerRegionFunctionExecutionNoSingleHopDUnitTest extends P
     assertEquals(2, l.size());
   }
 
+  @Test
   public void testBug40714() {
     createScenario();
     server1.invoke(() -> PRClientServerRegionFunctionExecutionNoSingleHopDUnitTest.registerFunction());

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/b914df23/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRClientServerRegionFunctionExecutionSelectorNoSingleHopDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRClientServerRegionFunctionExecutionSelectorNoSingleHopDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRClientServerRegionFunctionExecutionSelectorNoSingleHopDUnitTest.java
index 1a83608..1a78dd3 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRClientServerRegionFunctionExecutionSelectorNoSingleHopDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRClientServerRegionFunctionExecutionSelectorNoSingleHopDUnitTest.java
@@ -16,6 +16,15 @@
  */
 package com.gemstone.gemfire.internal.cache.execute;
 
+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.EOFException;
 import java.io.IOException;
 import java.io.Serializable;
@@ -55,6 +64,7 @@ import com.gemstone.gemfire.test.dunit.ThreadUtils;
 import com.gemstone.gemfire.test.dunit.Wait;
 import com.gemstone.gemfire.test.dunit.WaitCriterion;
 
+@Category(DistributedTest.class)
 public class PRClientServerRegionFunctionExecutionSelectorNoSingleHopDUnitTest extends
     PRClientServerTestBase {
   private static final String TEST_FUNCTION7 = TestFunction.TEST_FUNCTION7;
@@ -65,13 +75,14 @@ public class PRClientServerRegionFunctionExecutionSelectorNoSingleHopDUnitTest e
 
   private static int retryCount = 0;
 
-  public PRClientServerRegionFunctionExecutionSelectorNoSingleHopDUnitTest(String name) {
-    super(name);
+  public PRClientServerRegionFunctionExecutionSelectorNoSingleHopDUnitTest() {
+    super();
   }
 
   /*
    * Execution of the function on server with
    */
+  @Test
   public void testServerAllKeyExecution_byInstance() {
     createScenario();
     Function function = new TestFunction(true, TEST_FUNCTION2);
@@ -83,6 +94,7 @@ public class PRClientServerRegionFunctionExecutionSelectorNoSingleHopDUnitTest e
   /*
    * Execution of the function on server with
    */
+  @Test
   public void testServerGetAllFunction() {
     createScenario();
     client.invoke(() -> PRClientServerRegionFunctionExecutionSelectorNoSingleHopDUnitTest.getAll());
@@ -91,6 +103,7 @@ public class PRClientServerRegionFunctionExecutionSelectorNoSingleHopDUnitTest e
   /*
    * Execution of the function on server with
    */
+  @Test
   public void testServerPutAllFunction() {
     createScenario();
     client.invoke(() -> PRClientServerRegionFunctionExecutionSelectorNoSingleHopDUnitTest.putAll());
@@ -100,6 +113,7 @@ public class PRClientServerRegionFunctionExecutionSelectorNoSingleHopDUnitTest e
    * Execution of the function on server with single key as the routing object
    * and using the name of the function
    */
+  @Test
   public void testServerSingleKeyExecution_byName() {
     createScenario();
     Function function = new TestFunction(true, TEST_FUNCTION2);
@@ -114,11 +128,13 @@ public class PRClientServerRegionFunctionExecutionSelectorNoSingleHopDUnitTest e
    * of HA then system should retry the function execution. After 5th attempt
    * function will send Boolean as last result.
    */
+  @Test
   public void testserverSingleKeyExecution_FunctionInvocationTargetException() {
     createScenario();
     client.invoke(() -> PRClientServerRegionFunctionExecutionSelectorNoSingleHopDUnitTest.serverSingleKeyExecution_FunctionInvocationTargetException());
   }
 
+  @Test
   public void testServerSingleKeyExecution_SocketTimeOut() {
     createScenario();
     Function function = new TestFunction(true,
@@ -132,6 +148,7 @@ public class PRClientServerRegionFunctionExecutionSelectorNoSingleHopDUnitTest e
    * Execution of the function on server with single key as the routing object
    * and using the instance of the function
    */
+  @Test
   public void testServerSingleKeyExecution_byInstance() {
     createScenario();
     Function function = new TestFunction(true, TEST_FUNCTION2);
@@ -144,6 +161,7 @@ public class PRClientServerRegionFunctionExecutionSelectorNoSingleHopDUnitTest e
    * Execution of the inline function on server with single key as the routing
    * object
    */
+  @Test
   public void testServerSingleKeyExecution_byInlineFunction() {
     createScenario();
     client.invoke(() -> PRClientServerRegionFunctionExecutionSelectorNoSingleHopDUnitTest.serverSingleKeyExecution_Inline());
@@ -153,6 +171,7 @@ public class PRClientServerRegionFunctionExecutionSelectorNoSingleHopDUnitTest e
    * Execution of the function on server with set multiple keys as the routing
    * object and using the name of the function
    */
+  @Test
   public void testserverMultiKeyExecution_byName() {
     createScenario();
     Function function = new TestFunction(true, TEST_FUNCTION2);
@@ -164,6 +183,7 @@ public class PRClientServerRegionFunctionExecutionSelectorNoSingleHopDUnitTest e
     server3.invoke(() -> PRClientServerRegionFunctionExecutionSelectorNoSingleHopDUnitTest.checkBucketsOnServer());
   }
 
+  @Test
   public void testserverMultiKeyExecution_SocektTimeOut() {
     createScenario();
     Function function = new TestFunction(true,
@@ -177,6 +197,7 @@ public class PRClientServerRegionFunctionExecutionSelectorNoSingleHopDUnitTest e
    * Execution of the inline function on server with set multiple keys as the
    * routing object
    */
+  @Test
   public void testserverMultiKeyExecution_byInlineFunction() {
     createScenario();
     client.invoke(() -> PRClientServerRegionFunctionExecutionSelectorNoSingleHopDUnitTest.serverMultiKeyExecution_Inline());
@@ -188,6 +209,7 @@ public class PRClientServerRegionFunctionExecutionSelectorNoSingleHopDUnitTest e
    * this is the case of HA then system should retry the function execution.
    * After 5th attempt function will send Boolean as last result.
    */
+  @Test
   public void testserverMultiKeyExecution_FunctionInvocationTargetException() {
     createScenario();
     client.invoke(() -> PRClientServerRegionFunctionExecutionSelectorNoSingleHopDUnitTest.serverMultiKeyExecution_FunctionInvocationTargetException());
@@ -197,6 +219,7 @@ public class PRClientServerRegionFunctionExecutionSelectorNoSingleHopDUnitTest e
    * Execution of the function on server with set multiple keys as the routing
    * object and using the name of the function
    */
+  @Test
   public void testserverMultiKeyExecutionNoResult_byName() {
     createScenario();
     Function function = new TestFunction(false, TEST_FUNCTION7);
@@ -209,6 +232,7 @@ public class PRClientServerRegionFunctionExecutionSelectorNoSingleHopDUnitTest e
    * Execution of the function on server with set multiple keys as the routing
    * object and using the instance of the function
    */
+  @Test
   public void testserverMultiKeyExecution_byInstance() {
     createScenario();
     Function function = new TestFunction(true, TEST_FUNCTION2);
@@ -222,6 +246,7 @@ public class PRClientServerRegionFunctionExecutionSelectorNoSingleHopDUnitTest e
    * that the routing logic works correctly such that there is not extra
    * execution
    */
+  @Test
   public void testserverMultiKeyExecutionOnASingleBucket_byName() {
     createScenario();
     Function function = new TestFunction(true, TEST_FUNCTION2);
@@ -235,6 +260,7 @@ public class PRClientServerRegionFunctionExecutionSelectorNoSingleHopDUnitTest e
    * that the routing logic works correctly such that there is not extra
    * execution
    */
+  @Test
   public void testserverMultiKeyExecutionOnASingleBucket_byInstance() {
     createScenario();
     Function function = new TestFunction(true, TEST_FUNCTION2);
@@ -247,6 +273,7 @@ public class PRClientServerRegionFunctionExecutionSelectorNoSingleHopDUnitTest e
    * Ensure that the while executing the function if the servers is down then
    * the execution is failover to other available server
    */
+  @Test
   public void testServerFailoverWithTwoServerAliveHA()
       throws InterruptedException {
     IgnoredException.addIgnoredException("FunctionInvocationTargetException");
@@ -284,6 +311,7 @@ public class PRClientServerRegionFunctionExecutionSelectorNoSingleHopDUnitTest e
    * Ensure that the while executing the function if the servers is down then
    * the execution is failover to other available server
    */
+  @Test
   public void testServerCacheClosedFailoverWithTwoServerAliveHA()
       throws InterruptedException {
     IgnoredException.addIgnoredException("FunctionInvocationTargetException");
@@ -315,6 +343,7 @@ public class PRClientServerRegionFunctionExecutionSelectorNoSingleHopDUnitTest e
     assertEquals(2, l.size());
   }
 
+  @Test
   public void testBug40714() {
     createScenario();
     server1.invoke(() -> PRClientServerRegionFunctionExecutionSelectorNoSingleHopDUnitTest.registerFunction());

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/b914df23/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRClientServerRegionFunctionExecutionSingleHopDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRClientServerRegionFunctionExecutionSingleHopDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRClientServerRegionFunctionExecutionSingleHopDUnitTest.java
index bedead7..b011e0e 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRClientServerRegionFunctionExecutionSingleHopDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRClientServerRegionFunctionExecutionSingleHopDUnitTest.java
@@ -16,6 +16,15 @@
  */
 package com.gemstone.gemfire.internal.cache.execute;
 
+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.EOFException;
 import java.io.IOException;
 import java.io.Serializable;
@@ -62,8 +71,8 @@ import com.gemstone.gemfire.test.dunit.WaitCriterion;
     
     private static int retryCount = 0;
     
-    public PRClientServerRegionFunctionExecutionSingleHopDUnitTest(String name) {
-      super(name);
+    public PRClientServerRegionFunctionExecutionSingleHopDUnitTest() {
+      super();
     }
 
     @Override
@@ -76,7 +85,8 @@ import com.gemstone.gemfire.test.dunit.WaitCriterion;
     /*
      * Execution of the function on server with 
      */
-    public void testServerAllKeyExecution_byInstance(){
+  @Test
+  public void testServerAllKeyExecution_byInstance(){
       createScenario();
       Function function = new TestFunction(true,TEST_FUNCTION2);
       registerFunctionAtServer(function);
@@ -88,7 +98,8 @@ import com.gemstone.gemfire.test.dunit.WaitCriterion;
     /*
      * Execution of the function on server with 
      */
-    public void testServerGetAllFunction(){
+  @Test
+  public void testServerGetAllFunction(){
       createScenario();
       client.invoke(() -> PRClientServerRegionFunctionExecutionSingleHopDUnitTest.getAll());
     }
@@ -96,7 +107,8 @@ import com.gemstone.gemfire.test.dunit.WaitCriterion;
     /*
      * Execution of the function on server with 
      */
-    public void testServerPutAllFunction(){
+  @Test
+  public void testServerPutAllFunction(){
       createScenario();
       client.invoke(() -> PRClientServerRegionFunctionExecutionSingleHopDUnitTest.putAll());
     }    
@@ -104,7 +116,8 @@ import com.gemstone.gemfire.test.dunit.WaitCriterion;
      * Execution of the function on server with single key as the routing
      * object and using the name of the function
      */   
-    public void testServerSingleKeyExecution_byName() {
+  @Test
+  public void testServerSingleKeyExecution_byName() {
       createScenario();
       Function function = new TestFunction(true,TEST_FUNCTION2);
       registerFunctionAtServer(function);
@@ -118,12 +131,14 @@ import com.gemstone.gemfire.test.dunit.WaitCriterion;
      * of HA then system should retry the function execution. After 5th attempt
      * function will send Boolean as last result.
      */
-    public void testserverSingleKeyExecution_FunctionInvocationTargetException() {
+  @Test
+  public void testserverSingleKeyExecution_FunctionInvocationTargetException() {
       createScenario();
       client.invoke(() -> PRClientServerRegionFunctionExecutionSingleHopDUnitTest.serverSingleKeyExecution_FunctionInvocationTargetException());
     }
 
-    public void testServerSingleKeyExecution_SocketTimeOut() {
+  @Test
+  public void testServerSingleKeyExecution_SocketTimeOut() {
       createScenario();
       Function function = new TestFunction(true,
           TestFunction.TEST_FUNCTION_SOCKET_TIMEOUT);
@@ -143,7 +158,8 @@ import com.gemstone.gemfire.test.dunit.WaitCriterion;
      * Execution of the function on server with single key as the routing
      * object and using the instance of the function
      */
-    public void testServerSingleKeyExecution_byInstance() {
+  @Test
+  public void testServerSingleKeyExecution_byInstance() {
       createScenario();
       Function function = new TestFunction(true,TEST_FUNCTION2);
       registerFunctionAtServer(function);
@@ -155,7 +171,8 @@ import com.gemstone.gemfire.test.dunit.WaitCriterion;
      * Execution of the inline function on server with single key as the routing
      * object
      */   
-    public void testServerSingleKeyExecution_byInlineFunction() {
+  @Test
+  public void testServerSingleKeyExecution_byInlineFunction() {
       createScenario();
       client.invoke(() -> PRClientServerRegionFunctionExecutionSingleHopDUnitTest.serverSingleKeyExecution_Inline());
     }
@@ -164,7 +181,8 @@ import com.gemstone.gemfire.test.dunit.WaitCriterion;
      * Execution of the function on server with set multiple keys as the routing
      * object and using the name of the function
      */
-    public void testserverMultiKeyExecution_byName(){
+  @Test
+  public void testserverMultiKeyExecution_byName(){
       createScenario();
       Function function = new TestFunction(true,TEST_FUNCTION2);
       registerFunctionAtServer(function);
@@ -178,7 +196,8 @@ import com.gemstone.gemfire.test.dunit.WaitCriterion;
     /*
      * Execution of the function on server with bucket as filter
      */
-    public void testBucketFilter(){
+  @Test
+  public void testBucketFilter(){
       createScenarioForBucketFilter();
       Function function = new TestFunction(true,TestFunction.TEST_FUNCTION_BUCKET_FILTER);
       registerFunctionAtServer(function);
@@ -193,7 +212,8 @@ import com.gemstone.gemfire.test.dunit.WaitCriterion;
       client.invoke(() -> PRClientServerTestBase.serverBucketFilterExecution(bucketFilterSet));      
     }
     
-    public void testBucketFilterOverride(){
+  @Test
+  public void testBucketFilterOverride(){
       createScenarioForBucketFilter();
       Function function = new TestFunction(true,TestFunction.TEST_FUNCTION_BUCKET_FILTER);
       registerFunctionAtServer(function);
@@ -211,7 +231,8 @@ import com.gemstone.gemfire.test.dunit.WaitCriterion;
       
     }
     
-    public void testserverMultiKeyExecution_SocektTimeOut(){
+  @Test
+  public void testserverMultiKeyExecution_SocektTimeOut(){
       createScenario();
       Function function = new TestFunction(true,TestFunction.TEST_FUNCTION_SOCKET_TIMEOUT);
       registerFunctionAtServer(function);
@@ -223,7 +244,8 @@ import com.gemstone.gemfire.test.dunit.WaitCriterion;
      * Execution of the inline function on server with set multiple keys as the routing
      * object
      */
-    public void testserverMultiKeyExecution_byInlineFunction(){
+  @Test
+  public void testserverMultiKeyExecution_byInlineFunction(){
       createScenario();
       client.invoke(() -> PRClientServerRegionFunctionExecutionSingleHopDUnitTest.serverMultiKeyExecution_Inline());
     }
@@ -234,7 +256,8 @@ import com.gemstone.gemfire.test.dunit.WaitCriterion;
      * this is the case of HA then system should retry the function execution.
      * After 5th attempt function will send Boolean as last result.
      */
-    public void testserverMultiKeyExecution_FunctionInvocationTargetException() {
+  @Test
+  public void testserverMultiKeyExecution_FunctionInvocationTargetException() {
       IgnoredException.addIgnoredException("FunctionException: IOException while sending");
       IgnoredException.addIgnoredException("java.net.SocketException: Software caused connection abort");
       createScenario();
@@ -245,7 +268,8 @@ import com.gemstone.gemfire.test.dunit.WaitCriterion;
      * Execution of the function on server with set multiple keys as the routing
      * object and using the name of the function
      */
-    public void testserverMultiKeyExecutionNoResult_byName(){
+  @Test
+  public void testserverMultiKeyExecutionNoResult_byName(){
       IgnoredException.addIgnoredException("Cannot send result");
       createScenario();
       Function function = new TestFunction(false,TEST_FUNCTION7);
@@ -258,7 +282,8 @@ import com.gemstone.gemfire.test.dunit.WaitCriterion;
      * Execution of the function on server with set multiple keys as the routing
      * object and using the instance of the function
      */
-    public void testserverMultiKeyExecution_byInstance(){
+  @Test
+  public void testserverMultiKeyExecution_byInstance(){
       createScenario();
       Function function = new TestFunction(true,TEST_FUNCTION2);
       registerFunctionAtServer(function);
@@ -271,7 +296,8 @@ import com.gemstone.gemfire.test.dunit.WaitCriterion;
      * that the routing logic works correctly such that there is not extra
      * execution
      */
-    public void testserverMultiKeyExecutionOnASingleBucket_byName(){
+  @Test
+  public void testserverMultiKeyExecutionOnASingleBucket_byName(){
       createScenario();
       Function function = new TestFunction(true,TEST_FUNCTION2);
       registerFunctionAtServer(function);
@@ -284,7 +310,8 @@ import com.gemstone.gemfire.test.dunit.WaitCriterion;
      * that the routing logic works correctly such that there is not extra
      * execution
      */
-    public void testserverMultiKeyExecutionOnASingleBucket_byInstance(){
+  @Test
+  public void testserverMultiKeyExecutionOnASingleBucket_byInstance(){
       createScenario();
       Function function = new TestFunction(true,TEST_FUNCTION2);
       registerFunctionAtServer(function);
@@ -296,7 +323,8 @@ import com.gemstone.gemfire.test.dunit.WaitCriterion;
      * Ensure that the while executing the function if the servers is down then 
      * the execution is failover to other available server
      */
-    public void testServerFailoverWithTwoServerAliveHA()
+  @Test
+  public void testServerFailoverWithTwoServerAliveHA()
         throws InterruptedException {
       ArrayList commonAttributes = createCommonServerAttributes(
           "TestPartitionedRegion", null, 1, 13, null);
@@ -328,7 +356,8 @@ import com.gemstone.gemfire.test.dunit.WaitCriterion;
      * Ensure that the while executing the function if the servers is down then 
      * the execution is failover to other available server
      */
-    public void testServerCacheClosedFailoverWithTwoServerAliveHA() throws InterruptedException{
+  @Test
+  public void testServerCacheClosedFailoverWithTwoServerAliveHA() throws InterruptedException{
       ArrayList commonAttributes = createCommonServerAttributes("TestPartitionedRegion",
           null, 1, 13, null);
       createClientServerScenarion(commonAttributes,20, 20, 20);
@@ -352,7 +381,8 @@ import com.gemstone.gemfire.test.dunit.WaitCriterion;
       assertEquals(2, l.size());
     }
 
-    public void testBug40714() {
+  @Test
+  public void testBug40714() {
       createScenario();
       server1.invoke(() -> PRClientServerRegionFunctionExecutionSingleHopDUnitTest.registerFunction());
       server1.invoke(() -> PRClientServerRegionFunctionExecutionSingleHopDUnitTest.registerFunction());

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/b914df23/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRClientServerTestBase.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRClientServerTestBase.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRClientServerTestBase.java
index c6164de..ce7ab16 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRClientServerTestBase.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRClientServerTestBase.java
@@ -16,7 +16,30 @@
  */
 package com.gemstone.gemfire.internal.cache.execute;
 
-import com.gemstone.gemfire.cache.*;
+import static com.gemstone.gemfire.distributed.DistributedSystemConfigProperties.*;
+import static org.junit.Assert.*;
+
+import java.io.IOException;
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Properties;
+import java.util.Set;
+
+import com.gemstone.gemfire.cache.AttributesFactory;
+import com.gemstone.gemfire.cache.Cache;
+import com.gemstone.gemfire.cache.CacheFactory;
+import com.gemstone.gemfire.cache.DataPolicy;
+import com.gemstone.gemfire.cache.EntryOperation;
+import com.gemstone.gemfire.cache.PartitionAttributes;
+import com.gemstone.gemfire.cache.PartitionAttributesFactory;
+import com.gemstone.gemfire.cache.PartitionResolver;
+import com.gemstone.gemfire.cache.Region;
+import com.gemstone.gemfire.cache.RegionAttributes;
+import com.gemstone.gemfire.cache.Scope;
 import com.gemstone.gemfire.cache.client.Pool;
 import com.gemstone.gemfire.cache.client.PoolManager;
 import com.gemstone.gemfire.cache.client.internal.PoolImpl;
@@ -24,21 +47,21 @@ import com.gemstone.gemfire.cache.execute.Function;
 import com.gemstone.gemfire.cache.execute.FunctionService;
 import com.gemstone.gemfire.cache.execute.ResultCollector;
 import com.gemstone.gemfire.cache.server.CacheServer;
-import com.gemstone.gemfire.cache30.CacheTestCase;
 import com.gemstone.gemfire.distributed.DistributedSystem;
 import com.gemstone.gemfire.internal.AvailablePort;
 import com.gemstone.gemfire.internal.cache.functions.TestFunction;
 import com.gemstone.gemfire.internal.cache.tier.sockets.CacheServerTestUtil;
-import com.gemstone.gemfire.test.dunit.*;
-
-import java.io.IOException;
-import java.io.Serializable;
-import java.util.*;
-
-import static com.gemstone.gemfire.distributed.DistributedSystemConfigProperties.LOCATORS;
-import static com.gemstone.gemfire.distributed.DistributedSystemConfigProperties.MCAST_PORT;
-
-public class PRClientServerTestBase extends CacheTestCase {
+import com.gemstone.gemfire.test.dunit.Assert;
+import com.gemstone.gemfire.test.dunit.Host;
+import com.gemstone.gemfire.test.dunit.LogWriterUtils;
+import com.gemstone.gemfire.test.dunit.NetworkUtils;
+import com.gemstone.gemfire.test.dunit.SerializableRunnable;
+import com.gemstone.gemfire.test.dunit.VM;
+import com.gemstone.gemfire.test.dunit.Wait;
+import com.gemstone.gemfire.test.dunit.WaitCriterion;
+import com.gemstone.gemfire.test.dunit.cache.internal.JUnit4CacheTestCase;
+
+public class PRClientServerTestBase extends JUnit4CacheTestCase {
 
   protected VM server1 = null;
 
@@ -79,13 +102,13 @@ public class PRClientServerTestBase extends CacheTestCase {
   private boolean isSelector = false;
   
   public PRClientServerTestBase(String name, boolean isSingleHop, boolean isSelector) {
-    super(name);
+    super();
     this.isSingleHop = isSingleHop;
     this.isSelector = isSelector;
   }
 
-  public PRClientServerTestBase(String name) {
-    super(name);
+  public PRClientServerTestBase() {
+    super();
   }
 
   @Override
@@ -575,7 +598,7 @@ public class PRClientServerTestBase extends CacheTestCase {
   }
   
   public static void createCacheInVm(Properties props) {
-    new PRClientServerTestBase("temp").createCache(props);
+    new PRClientServerTestBase().createCache(props);
   }
 
   private void createCache(Properties props) {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/b914df23/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRColocationDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRColocationDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRColocationDUnitTest.java
index 17f33f0..952395c 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRColocationDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRColocationDUnitTest.java
@@ -16,6 +16,15 @@
  */
 package com.gemstone.gemfire.internal.cache.execute;
 
+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;
@@ -76,7 +85,8 @@ import com.gemstone.gemfire.test.dunit.Wait;
  * 
  */
 @SuppressWarnings("synthetic-access")
-public class PRColocationDUnitTest extends CacheTestCase {
+@Category(DistributedTest.class)
+public class PRColocationDUnitTest extends JUnit4CacheTestCase {
 
   VM accessor = null;
 
@@ -112,8 +122,8 @@ public class PRColocationDUnitTest extends CacheTestCase {
 
   Object[] attributeObjects = null;
 
-  public PRColocationDUnitTest(String name) {
-    super(name);
+  public PRColocationDUnitTest() {
+    super();
   }
 
   @Override
@@ -129,6 +139,7 @@ public class PRColocationDUnitTest extends CacheTestCase {
    /*
    * Test for bug 41820 
    */
+  @Test
   public void testDestroyColocatedPartitionedRegion() throws Throwable {
     createCacheInAllVms();
     redundancy = new Integer(0);
@@ -163,6 +174,7 @@ public class PRColocationDUnitTest extends CacheTestCase {
   /*
    * Test for checking the colocation of the regions which forms the tree
    */
+  @Test
   public void testColocatedPartitionedRegion() throws Throwable {
     createCacheInAllVms();
     redundancy = new Integer(0);
@@ -286,6 +298,7 @@ public class PRColocationDUnitTest extends CacheTestCase {
   /*
    * Test for checking the colocation of the regions which forms the tree
    */
+  @Test
   public void testColocatedPartitionedRegion_NoFullPath() throws Throwable {
     createCacheInAllVms();
     redundancy = new Integer(0);
@@ -406,6 +419,7 @@ public class PRColocationDUnitTest extends CacheTestCase {
     
     accessor.invoke(() -> PRColocationDUnitTest.validateColocatedRegions( "K" ));
   }
+  @Test
   public void testColocatedSubPartitionedRegion() throws Throwable {
     createCacheInAllVms();
     redundancy = new Integer(1);
@@ -527,6 +541,7 @@ public class PRColocationDUnitTest extends CacheTestCase {
     accessor.invoke(() -> PRColocationDUnitTest.validateColocatedRegions( "rootK/K" ));
   }
   
+  @Test
   public void testColocatedSubPartitionedRegion_NoFullPath() throws Throwable {
     createCacheInAllVms();
     redundancy = new Integer(1);
@@ -648,6 +663,7 @@ public class PRColocationDUnitTest extends CacheTestCase {
     accessor.invoke(() -> PRColocationDUnitTest.validateColocatedRegions( "rootK/K" ));
   }
   
+  @Test
   public void testColocatedPRWithAccessorOnDifferentNode1() throws Throwable {
 
     createCacheInAllVms();
@@ -721,6 +737,7 @@ public class PRColocationDUnitTest extends CacheTestCase {
     ex.remove();
   }
 
+  @Test
   public void testColocatedPRWithAccessorOnDifferentNode2() throws Throwable {
 
     createCacheInAllVms();
@@ -792,6 +809,7 @@ public class PRColocationDUnitTest extends CacheTestCase {
     ex.remove();
   }
   
+  @Test
   public void testColocatedPRWithPROnDifferentNode1() throws Throwable {
 
     createCacheInAllVms();
@@ -929,6 +947,7 @@ public class PRColocationDUnitTest extends CacheTestCase {
     });
   }
 
+  @Test
   public void testColocatedPRWithLocalDestroy() throws Throwable {
     createCacheInAllVms();
     redundancy = new Integer(0);
@@ -999,6 +1018,7 @@ public class PRColocationDUnitTest extends CacheTestCase {
     ex.remove();
   }
   
+  @Test
   public void testColocatedPRWithDestroy() throws Throwable {
     createCacheInAllVms();
     redundancy = new Integer(0);
@@ -1090,6 +1110,7 @@ public class PRColocationDUnitTest extends CacheTestCase {
     });
   }
   
+  @Test
   public void testColocatedPRWithClose() throws Throwable {
     createCacheInAllVms();
     redundancy = new Integer(0);
@@ -1135,6 +1156,7 @@ public class PRColocationDUnitTest extends CacheTestCase {
   /*
    * Test For partition Region with Key Based Routing Resolver
    */
+  @Test
   public void testPartitionResolverPartitionedRegion() throws Throwable {
     createCacheInAllVms();
     redundancy = new Integer(0);
@@ -1192,6 +1214,7 @@ public class PRColocationDUnitTest extends CacheTestCase {
    * Test added to check the colocation of regions
    * Also checks for the colocation of the buckets  
    */ 
+  @Test
   public void testColocationPartitionedRegion() throws Throwable {
     // Create Cache in all VMs VM0,VM1,VM2,VM3 
     
@@ -1278,6 +1301,7 @@ public class PRColocationDUnitTest extends CacheTestCase {
    * 
    * @throws Throwable
    */
+  @Test
   public void testColocationPartitionedRegionWithNullColocationSpecifiedOnOneNode()
       throws Throwable {
     try {
@@ -1328,6 +1352,7 @@ public class PRColocationDUnitTest extends CacheTestCase {
    * Test added to check the colocation of regions
    * Also checks for the colocation of the buckets with redundancy specified 
    */ 
+  @Test
   public void testColocationPartitionedRegionWithRedundancy() throws Throwable {
 
     // Create Cache in all VMs VM0,VM1,VM2,VM3
@@ -1425,6 +1450,7 @@ public class PRColocationDUnitTest extends CacheTestCase {
    * Confirm that the redundancy must be the same for colocated partitioned regions
    * @throws Exception
    */
+  @Test
   public void testRedundancyRestriction() throws Exception {
     final String rName = getUniqueName();
     final Integer red0 = Integer.valueOf(0);
@@ -1454,6 +1480,7 @@ public class PRColocationDUnitTest extends CacheTestCase {
    * created.
    * @throws Throwable
    */
+  @Test
   public void testColocatedPRRedundancyRecovery() throws Throwable {
     createCacheInAllVms();
     redundancy = new Integer(1);
@@ -1552,6 +1579,7 @@ public class PRColocationDUnitTest extends CacheTestCase {
     });
   }
   
+  @Test
   public void testColocationPartitionedRegionWithKeyPartitionResolver()
       throws Throwable {
     // Create Cache in all VMs VM0,VM1,VM2,VM3
@@ -1595,6 +1623,7 @@ public class PRColocationDUnitTest extends CacheTestCase {
     accessor.invoke(() -> PRColocationDUnitTest.executeFunction());
   }
 
+  @Test
   public void testColocatedPRRedundancyRecovery2() throws Throwable {
     createCacheInAllVms();
     
@@ -1741,6 +1770,7 @@ public class PRColocationDUnitTest extends CacheTestCase {
    * 
    * @throws Throwable
    */
+  @Test
   public void testSimulaneousChildRegionCreation() throws Throwable {
     createCacheInAllVms();
     
@@ -2550,7 +2580,7 @@ public class PRColocationDUnitTest extends CacheTestCase {
   }
   
   public static void createCacheInVm() {
-    new PRColocationDUnitTest("temp").getCache();
+    new PRColocationDUnitTest().getCache();
   }
 
   @Override

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/b914df23/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRCustomPartitioningDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRCustomPartitioningDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRCustomPartitioningDUnitTest.java
index 3e83159..d776e01 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRCustomPartitioningDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRCustomPartitioningDUnitTest.java
@@ -16,6 +16,15 @@
  */
 package com.gemstone.gemfire.internal.cache.execute;
 
+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 is a dunit test for PartitionedRegion creation and Region API's
  * for put and get functionality in case of Custom Partitioning.
@@ -39,11 +48,12 @@ import java.io.IOException;
 import java.io.Serializable;
 import java.util.*;
 
+@Category(DistributedTest.class)
 public class PRCustomPartitioningDUnitTest extends
     PartitionedRegionDUnitTestCase {
 
-  public PRCustomPartitioningDUnitTest(String name) {
-    super(name);
+  public PRCustomPartitioningDUnitTest() {
+    super();
   }
 
   protected static Cache cache = null;
@@ -70,7 +80,7 @@ public class PRCustomPartitioningDUnitTest extends
     Properties props = new Properties();
     //props.setProperty(DistributionConfig.SystemConfigurationProperties.MCAST_PORT, "0");
     //props.setProperty(DistributionConfig.LOCATORS_NAME, "");
-    new PRCustomPartitioningDUnitTest("temp").createCache(props);
+    new PRCustomPartitioningDUnitTest().createCache(props);
   }
   
   private void createCache(Properties props) throws Exception
@@ -413,6 +423,7 @@ public class PRCustomPartitioningDUnitTest extends
    * This is a PartitionedRegion test for Custom Partitioning . 4 VMs are used to create the PR with
    * and without(Only Accessor) the DataStore.
    */
+  @Test
   public void testPartitionedRegionOperationsCustomPartitioning()
       throws Exception {
     Host host = Host.getHost(0);

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/b914df23/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRFunctionExecutionDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRFunctionExecutionDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRFunctionExecutionDUnitTest.java
index 00f66f4..1223690 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRFunctionExecutionDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRFunctionExecutionDUnitTest.java
@@ -16,46 +16,94 @@
  */
 package com.gemstone.gemfire.internal.cache.execute;
 
-import com.gemstone.gemfire.cache.*;
+import static com.gemstone.gemfire.distributed.DistributedSystemConfigProperties.*;
+import static org.junit.Assert.*;
+
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Properties;
+import java.util.Set;
+import java.util.concurrent.TimeUnit;
+
+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.DataPolicy;
+import com.gemstone.gemfire.cache.EntryOperation;
+import com.gemstone.gemfire.cache.PartitionAttributes;
+import com.gemstone.gemfire.cache.PartitionAttributesFactory;
+import com.gemstone.gemfire.cache.PartitionResolver;
+import com.gemstone.gemfire.cache.Region;
 import com.gemstone.gemfire.cache.Region.Entry;
-import com.gemstone.gemfire.cache.execute.*;
+import com.gemstone.gemfire.cache.RegionAttributes;
+import com.gemstone.gemfire.cache.execute.Execution;
+import com.gemstone.gemfire.cache.execute.Function;
+import com.gemstone.gemfire.cache.execute.FunctionAdapter;
+import com.gemstone.gemfire.cache.execute.FunctionContext;
+import com.gemstone.gemfire.cache.execute.FunctionException;
+import com.gemstone.gemfire.cache.execute.FunctionService;
+import com.gemstone.gemfire.cache.execute.RegionFunctionContext;
+import com.gemstone.gemfire.cache.execute.ResultCollector;
 import com.gemstone.gemfire.cache.partition.PartitionRegionHelper;
 import com.gemstone.gemfire.distributed.DistributedSystem;
 import com.gemstone.gemfire.distributed.internal.DM;
 import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
 import com.gemstone.gemfire.distributed.internal.LonerDistributionManager;
-import com.gemstone.gemfire.internal.cache.*;
+import com.gemstone.gemfire.internal.cache.EntrySnapshot;
+import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
+import com.gemstone.gemfire.internal.cache.LocalDataSet;
+import com.gemstone.gemfire.internal.cache.PartitionAttributesImpl;
+import com.gemstone.gemfire.internal.cache.PartitionedRegion;
+import com.gemstone.gemfire.internal.cache.PartitionedRegionDUnitTestCase;
+import com.gemstone.gemfire.internal.cache.PartitionedRegionTestHelper;
 import com.gemstone.gemfire.internal.cache.execute.data.CustId;
 import com.gemstone.gemfire.internal.cache.execute.data.Customer;
 import com.gemstone.gemfire.internal.cache.execute.data.Order;
 import com.gemstone.gemfire.internal.cache.execute.data.OrderId;
 import com.gemstone.gemfire.internal.cache.functions.TestFunction;
 import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
-import com.gemstone.gemfire.test.dunit.*;
-
-import java.io.Serializable;
-import java.util.*;
-import java.util.concurrent.TimeUnit;
+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.IgnoredException;
+import com.gemstone.gemfire.test.dunit.LogWriterUtils;
+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.junit.categories.DistributedTest;
+
+@Category(DistributedTest.class)
+public class PRFunctionExecutionDUnitTest extends PartitionedRegionDUnitTestCase {
 
-import static com.gemstone.gemfire.distributed.DistributedSystemConfigProperties.LOCATORS;
-import static com.gemstone.gemfire.distributed.DistributedSystemConfigProperties.MCAST_PORT;
-
-public class PRFunctionExecutionDUnitTest extends
-    PartitionedRegionDUnitTestCase {
   private static final String TEST_FUNCTION7 = TestFunction.TEST_FUNCTION7;
   private static final String TEST_FUNCTION2 = TestFunction.TEST_FUNCTION2;
+
   static Cache cache = null;
   static String regionName = null;
-  private static final long serialVersionUID = 1L;
 
-  public PRFunctionExecutionDUnitTest(String name) {
-    super(name);
+  @Override
+  public final void postTearDown() throws Exception {
+    cache = null;
+    regionName = null;
   }
 
   /**
    * Test to validate that the function execution is successful on PR with Loner Distributed System
-   * @throws Exception
    */
+  @Test
   public void testFunctionExecution() throws Exception {
     final String rName = getUniqueName();
     Host host = Host.getHost(0);
@@ -103,6 +151,7 @@ public class PRFunctionExecutionDUnitTest extends
         });
   }
 
+  @Test
   public void testHAFunctionExecution() throws Exception {
     final String rName = getUniqueName();
     Host host = Host.getHost(0);
@@ -156,9 +205,8 @@ public class PRFunctionExecutionDUnitTest extends
   /**
    * Test remote execution by a pure accessor which doesn't have the function
    * factory present.
-   *
-   * @throws Exception
    */
+  @Test
   public void testRemoteSingleKeyExecution_byName() throws Exception {
     final String rName = getUniqueName();
     Host host = Host.getHost(0);
@@ -244,11 +292,9 @@ public class PRFunctionExecutionDUnitTest extends
    * FunctionInvocationTargetException. As this is the case of HA then system
    * should retry the function execution. After 5th attempt function will send
    * Boolean as last result. factory present.
-   *
-   * @throws Exception
    */
-  public void testLocalSingleKeyExecution_byName_FunctionInvocationTargetException()
-      throws Exception {
+  @Test
+  public void testLocalSingleKeyExecution_byName_FunctionInvocationTargetException() throws Exception {
     final String rName = getUniqueName();
     Host host = Host.getHost(0);
     final VM datastore = host.getVM(3);
@@ -289,18 +335,15 @@ public class PRFunctionExecutionDUnitTest extends
           }
         });
   }
- 
- 
+
   /**
    * Test remote execution by a pure accessor which doesn't have the function
    * factory present.Function throws the FunctionInvocationTargetException. As
    * this is the case of HA then system should retry the function execution.
    * After 5th attempt function will send Boolean as last result.
-   *
-   * @throws Exception
    */
-  public void testRemoteSingleKeyExecution_byName_FunctionInvocationTargetException()
-      throws Exception {
+  @Test
+  public void testRemoteSingleKeyExecution_byName_FunctionInvocationTargetException() throws Exception {
     final String rName = getUniqueName();
     Host host = Host.getHost(0);
     final VM accessor = host.getVM(2);
@@ -367,9 +410,8 @@ public class PRFunctionExecutionDUnitTest extends
   /**
    * Test remote execution by a pure accessor which doesn't have the function
    * factory present.
-   *
-   * @throws Exception
    */
+  @Test
   public void testRemoteSingleKeyExecution_byInstance() throws Exception {
     final String rName = getUniqueName();
     Host host = Host.getHost(0);
@@ -454,9 +496,8 @@ public class PRFunctionExecutionDUnitTest extends
 
   /**
    * Test remote execution of inline function by a pure accessor
-   *
-   * @throws Exception
    */
+  @Test
   public void testRemoteSingleKeyExecution_byInlineFunction() throws Exception {
     final String rName = getUniqueName();
     Host host = Host.getHost(0);
@@ -534,9 +575,8 @@ public class PRFunctionExecutionDUnitTest extends
    * function factory present.
    * ResultCollector = DefaultResultCollector
    * haveResults = true;
-   *
-   * @throws Exception
    */
+  @Test
   public void testRemoteMultiKeyExecution_byName() throws Exception {
     final String rName = getUniqueName();
     Host host = Host.getHost(0);
@@ -633,7 +673,7 @@ public class PRFunctionExecutionDUnitTest extends
     assertEquals(Boolean.TRUE, o);
   }
 
-  
+  @Test
   public void testRemoteMultiKeyExecution_BucketMoved() throws Exception {
     final String rName = getUniqueName();
     Host host = Host.getHost(0);
@@ -716,6 +756,7 @@ public class PRFunctionExecutionDUnitTest extends
     
   }
   
+  @Test
   public void testLocalMultiKeyExecution_BucketMoved() throws Exception {
     IgnoredException.addIgnoredException("BucketMovedException");
     final String rName = getUniqueName();
@@ -781,19 +822,15 @@ public class PRFunctionExecutionDUnitTest extends
     assertEquals(2, l.size());
     
   }
-  
-  
-  
+
   /**
    * Test remote execution by a pure accessor which doesn't have the function
    * factory present.Function throws the FunctionInvocationTargetException. As
    * this is the case of HA then system should retry the function execution.
    * After 5th attempt function will send Boolean as last result.
-   *
-   * @throws Exception
    */
-  public void testRemoteMultipleKeyExecution_byName_FunctionInvocationTargetException()
-      throws Exception {
+  @Test
+  public void testRemoteMultipleKeyExecution_byName_FunctionInvocationTargetException() throws Exception {
     final String rName = getUniqueName();
     Host host = Host.getHost(0);
     final VM accessor = host.getVM(3);
@@ -868,6 +905,7 @@ public class PRFunctionExecutionDUnitTest extends
     assertEquals(Boolean.TRUE, o);
   }
  
+  @Test
   public void testRemoteMultiKeyExecutionHA_CacheClose() throws Exception {
     final String rName = getUniqueName();
     Host host = Host.getHost(0);
@@ -965,6 +1003,7 @@ public class PRFunctionExecutionDUnitTest extends
     assertEquals(2, l.size());
   }
  
+  @Test
   public void testRemoteMultiKeyExecutionHA_Disconnect() throws Exception {
     final String rName = getUniqueName();
     Host host = Host.getHost(0);
@@ -1081,9 +1120,8 @@ public class PRFunctionExecutionDUnitTest extends
    * Test multi-key remote execution of inline function by a pure accessor
    * ResultCollector = DefaultResultCollector
    * haveResults = true;
-   *
-   * @throws Exception
    */
+  @Test
   public void testRemoteMultiKeyExecution_byInlineFunction() throws Exception {
     final String rName = getUniqueName();
     Host host = Host.getHost(0);
@@ -1168,14 +1206,14 @@ public class PRFunctionExecutionDUnitTest extends
     });
     assertEquals(Boolean.TRUE, o);
   }
+
   /**
    * Test multi-key remote execution by a pure accessor which doesn't have the
    * function factory present.
    * ResultCollector = CustomResultCollector
    * haveResults = true;
-   *
-   * @throws Exception
    */
+  @Test
   public void testRemoteMultiKeyExecutionWithCollector_byName() throws Exception {
     final String rName = getUniqueName();
     Host host = Host.getHost(0);
@@ -1250,8 +1288,8 @@ public class PRFunctionExecutionDUnitTest extends
    * function factory present.
    * ResultCollector = DefaultResultCollector
    * haveResults = false;
-   * @throws Exception
    */
+  @Test
   public void testRemoteMultiKeyExecutionNoResult_byName() throws Exception {
     final String rName = getUniqueName();
     Host host = Host.getHost(0);
@@ -1333,8 +1371,8 @@ public class PRFunctionExecutionDUnitTest extends
    * haveResults = true;
    * result Timeout = 10 milliseconds
    * expected result to be 0.(as the execution gets the timeout)
-   * @throws Exception
    */
+  @Test
   public void testRemoteMultiKeyExecution_timeout() throws Exception {
     final String rName = getUniqueName();
     Host host = Host.getHost(0);
@@ -1412,8 +1450,8 @@ public class PRFunctionExecutionDUnitTest extends
    * function factory present.
    * ResultCollector = CustomResultCollector
    * haveResults = false;
-   * @throws Exception
    */
+  @Test
   public void testRemoteMultiKeyExecutionWithCollectorNoResult_byName() throws Exception {
     final String rName = getUniqueName();
     Host host = Host.getHost(0);
@@ -1487,12 +1525,12 @@ public class PRFunctionExecutionDUnitTest extends
     });
     assertEquals(Boolean.TRUE, o);
   }
+
   /**
    * Test multi-key remote execution by a pure accessor which doesn't have the
    * function factory present.
-   *
-   * @throws Exception
    */
+  @Test
   public void testRemoteMultiKeyExecution_byInstance() throws Exception {
     final String rName = getUniqueName();
     Host host = Host.getHost(0);
@@ -1596,12 +1634,10 @@ public class PRFunctionExecutionDUnitTest extends
     assertEquals(Boolean.TRUE, o);
   }
 
-  
   /**
    * Test bucketFilter functionality
-   *
-   * @throws Exception
    */
+  @Test
   public void testBucketFilter_1() throws Exception {
     final String rName = getUniqueName();
     Host host = Host.getHost(0);
@@ -1731,6 +1767,7 @@ public class PRFunctionExecutionDUnitTest extends
     
   }
   
+  @Test
   public void testBucketFilterOverride() throws Exception {
     final String rName = getUniqueName();
     Host host = Host.getHost(0);
@@ -1813,14 +1850,13 @@ public class PRFunctionExecutionDUnitTest extends
    
     
   }
-  
-  
+
   /**
    * Test ability to execute a multi-key function by a local data store
    * ResultCollector = DefaultResultCollector
    * haveResult = true
-   * @throws Exception
    */
+  @Test
   public void testLocalMultiKeyExecution_byName() throws Exception {
     final String rName = getUniqueName();
     Host host = Host.getHost(0);
@@ -1899,9 +1935,8 @@ public class PRFunctionExecutionDUnitTest extends
 
   /**
    * Test ability to execute a multi-key function by a local data store
-   *
-   * @throws Exception
    */
+  @Test
   public void testLocalMultiKeyExecution_byInstance() throws Exception {
     final String rName = getUniqueName();
     Host host = Host.getHost(0);
@@ -1983,9 +2018,8 @@ public class PRFunctionExecutionDUnitTest extends
    * Ensure that the execution is limited to a single bucket put another way,
    * that the routing logic works correctly such that there is not extra
    * execution
-   *
-   * @throws Exception
    */
+  @Test
   public void testMultiKeyExecutionOnASingleBucket_byName() throws Exception {
     final String rName = getUniqueName();
     Host host = Host.getHost(0);
@@ -2066,11 +2100,9 @@ public class PRFunctionExecutionDUnitTest extends
    * Ensure that the execution is limited to a single bucket put another way,
    * that the routing logic works correctly such that there is not extra
    * execution
-   *
-   * @throws Exception
    */
-  public void testMultiKeyExecutionOnASingleBucket_byInstance()
-      throws Exception {
+  @Test
+  public void testMultiKeyExecutionOnASingleBucket_byInstance() throws Exception {
     final String rName = getUniqueName();
     Host host = Host.getHost(0);
     final VM datastore0 = host.getVM(0);
@@ -2148,11 +2180,9 @@ public class PRFunctionExecutionDUnitTest extends
 
   /**
    * Ensure that the execution is happening all the PR as a whole
-   *
-   * @throws Exception
    */
-  public void testExecutionOnAllNodes_byName()
-      throws Exception {
+  @Test
+  public void testExecutionOnAllNodes_byName() throws Exception {
     final String rName = getUniqueName();
     Host host = Host.getHost(0);
     final VM datastore0 = host.getVM(0);
@@ -2216,13 +2246,6 @@ public class PRFunctionExecutionDUnitTest extends
           assertEquals(Boolean.TRUE, l.iterator().next());
         }
         return Boolean.TRUE;
-//        for (int i=0; i<4; i++) {
-//          List l = ((List)rc1.getResult());
-//          assertIndexDetailsEquals(4, l.size());
-//          assertIndexDetailsEquals(Boolean.TRUE, l.iterator().next());
-//        }
-//
-//        return Boolean.TRUE;
       }
     });
     assertEquals(Boolean.TRUE, o);
@@ -2230,11 +2253,9 @@ public class PRFunctionExecutionDUnitTest extends
  
   /**
    * Ensure that the execution is happening all the PR as a whole
-   *
-   * @throws Exception
    */
-  public void testExecutionOnAllNodes_byInstance()
-      throws Exception {
+  @Test
+  public void testExecutionOnAllNodes_byInstance() throws Exception {
     final String rName = getUniqueName();
     Host host = Host.getHost(0);
     final VM datastore0 = host.getVM(0);
@@ -2319,11 +2340,9 @@ public class PRFunctionExecutionDUnitTest extends
  
   /**
    * Ensure that the execution of inline function is happening all the PR as a whole
-   *
-   * @throws Exception
    */
-  public void testExecutionOnAllNodes_byInlineFunction()
-      throws Exception {
+  @Test
+  public void testExecutionOnAllNodes_byInlineFunction() throws Exception {
     final String rName = getUniqueName();
     Host host = Host.getHost(0);
     final VM datastore0 = host.getVM(0);
@@ -2406,6 +2425,7 @@ public class PRFunctionExecutionDUnitTest extends
     assertEquals(Boolean.TRUE, o);
   }
    
+  @Test
   public void testBug40714() throws Exception {
     final String rName = getUniqueName();
     Host host = Host.getHost(0);
@@ -2514,11 +2534,9 @@ public class PRFunctionExecutionDUnitTest extends
   /**
    * Ensure that the execution is happening on all the PR as a whole
    * with LocalReadPR as LocalDataSet
-   *
-   * @throws Exception
    */
-  public void testExecutionOnAllNodes_LocalReadPR()
-      throws Exception {
+  @Test
+  public void testExecutionOnAllNodes_LocalReadPR() throws Exception {
     final String rName = getUniqueName();
     Host host = Host.getHost(0);
     final VM datastore0 = host.getVM(0);
@@ -2598,11 +2616,9 @@ public class PRFunctionExecutionDUnitTest extends
   /**
    * Ensure that the execution is happening on all the PR as a whole
    * with LocalReadPR as LocalDataSet
-   *
-   * @throws Exception
    */
-  public void testExecutionOnMultiNodes_LocalReadPR()
-      throws Exception {
+  @Test
+  public void testExecutionOnMultiNodes_LocalReadPR() throws Exception {
     //final String rName = getUniqueName();
     final String rName1 = "CustomerPartitionedRegionName";
     final String rName2 = "OrderPartitionedRegionName";
@@ -2731,8 +2747,8 @@ public class PRFunctionExecutionDUnitTest extends
   /**
    * Assert the {@link RegionFunctionContext} yields the proper objects.
    */
-  public void testLocalDataContext() throws Exception
-  {
+  @Test
+  public void testLocalDataContext() throws Exception {
     final String rName = getUniqueName();
     Host host = Host.getHost(0);
     final VM accessor = host.getVM(1);
@@ -2806,8 +2822,8 @@ public class PRFunctionExecutionDUnitTest extends
   /**
    * Assert the {@link RegionFunctionContext} yields the proper objects.
    */
-  public void testLocalDataContextWithColocation() throws Exception
-  {
+  @Test
+  public void testLocalDataContextWithColocation() throws Exception {
     String rName = getUniqueName();
     Host host = Host.getHost(0);
     final VM accessor = host.getVM(1);
@@ -2950,7 +2966,7 @@ public class PRFunctionExecutionDUnitTest extends
    * This tests make sure that, in case of LonerDistributedSystem we dont get ClassCast Exception.
    * Just making sure that the function executed on lonerDistribuedSystem
    */
- 
+  @Test
   public void testBug41118() {
     Host host = Host.getHost(0);
     final VM lonerVM = host.getVM(1);
@@ -2958,7 +2974,7 @@ public class PRFunctionExecutionDUnitTest extends
   }
  
   public static void bug41118(){
-    InternalDistributedSystem ds = new PRFunctionExecutionDUnitTest("temp").getSystem();
+    InternalDistributedSystem ds = new PRFunctionExecutionDUnitTest().getSystem();
     assertNotNull(ds);
     ds.disconnect();
     Properties props = new Properties();
@@ -3056,6 +3072,7 @@ public class PRFunctionExecutionDUnitTest extends
     }
   }
 
+  @Test
   public void testFunctionExecutionException_41779() throws Exception {
     final String rName = getUniqueName();
     Host host = Host.getHost(0);

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/b914df23/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRFunctionExecutionTimeOutDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRFunctionExecutionTimeOutDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRFunctionExecutionTimeOutDUnitTest.java
index fa4fd62..c0e6bcc 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRFunctionExecutionTimeOutDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRFunctionExecutionTimeOutDUnitTest.java
@@ -16,6 +16,15 @@
  */
 package com.gemstone.gemfire.internal.cache.execute;
 
+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.HashMap;
 import java.util.HashSet;
@@ -48,6 +57,7 @@ import com.gemstone.gemfire.test.dunit.SerializableCallable;
 import com.gemstone.gemfire.test.dunit.VM;
 import com.gemstone.gemfire.test.junit.categories.FlakyTest;
 
+@Category(DistributedTest.class)
 public class PRFunctionExecutionTimeOutDUnitTest extends PartitionedRegionDUnitTestCase {
 
   private static final String TEST_FUNCTION_TIMEOUT = TestFunction.TEST_FUNCTION_TIMEOUT;
@@ -55,14 +65,15 @@ public class PRFunctionExecutionTimeOutDUnitTest extends PartitionedRegionDUnitT
   
   private static final long serialVersionUID = 1L;
 
-  public PRFunctionExecutionTimeOutDUnitTest(String name) {
-    super(name);
+  public PRFunctionExecutionTimeOutDUnitTest() {
+    super();
   }
   
   /**
    * Test remote execution by a pure accessor. Then test it using timeout and multiple getResult.
    * @throws Exception
    */
+  @Test
   public void testRemoteSingleKeyExecution_byName() throws Exception {
     final String rName = getUniqueName();
     Host host = Host.getHost(0);
@@ -238,6 +249,7 @@ public class PRFunctionExecutionTimeOutDUnitTest extends PartitionedRegionDUnitT
    * 
    * @throws Exception
    */
+  @Test
   public void testRemoteMultiKeyExecution_byName() throws Exception {
     final String rName = getUniqueName();
     Host host = Host.getHost(0);
@@ -405,6 +417,7 @@ public class PRFunctionExecutionTimeOutDUnitTest extends PartitionedRegionDUnitT
    * 
    * @throws Exception
    */
+  @Test
   public void testRemoteMultiKeyExecutionWithCollector_byName() throws Exception {
     final String rName = getUniqueName();
     Host host = Host.getHost(0);
@@ -500,6 +513,7 @@ public class PRFunctionExecutionTimeOutDUnitTest extends PartitionedRegionDUnitT
    * Then test it using timeout.
    * @throws Exception
    */
+  @Test
   public void testRemoteMultiKeyExecutionNoResult_byName() throws Exception {
     final String rName = getUniqueName();
     Host host = Host.getHost(0);
@@ -578,6 +592,7 @@ public class PRFunctionExecutionTimeOutDUnitTest extends PartitionedRegionDUnitT
    * Test multi-key remote execution by a pure accessor.
    * @throws Exception
    */
+  @Test
   public void testRemoteMultiKeyExecution_timeout() throws Exception {
     final String rName = getUniqueName();
     Host host = Host.getHost(0);
@@ -670,6 +685,7 @@ public class PRFunctionExecutionTimeOutDUnitTest extends PartitionedRegionDUnitT
    * @throws Exception
    */
   @Category(FlakyTest.class) // GEODE-1020: suspect string: BucketMovedException, missing fail in expected exception, eats exceptions
+  @Test
   public void testLocalMultiKeyExecution_byName() throws Exception {
     IgnoredException.addIgnoredException("BucketMovedException");
     final String rName = getUniqueName();
@@ -795,6 +811,7 @@ public class PRFunctionExecutionTimeOutDUnitTest extends PartitionedRegionDUnitT
    * Then test it using timeout and multiple getResult.
    * @throws Exception
    */
+  @Test
   public void testExecutionOnAllNodes_byName()
       throws Exception {
     final String rName = getUniqueName();

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/b914df23/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRFunctionExecutionWithResultSenderDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRFunctionExecutionWithResultSenderDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRFunctionExecutionWithResultSenderDUnitTest.java
index 458ac5d..3fc5f61 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRFunctionExecutionWithResultSenderDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRFunctionExecutionWithResultSenderDUnitTest.java
@@ -16,6 +16,15 @@
  */
 package com.gemstone.gemfire.internal.cache.execute;
 
+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.Serializable;
 import java.util.ArrayList;
 import java.util.HashMap;
@@ -52,6 +61,7 @@ import com.gemstone.gemfire.test.dunit.LogWriterUtils;
 import com.gemstone.gemfire.test.dunit.SerializableCallable;
 import com.gemstone.gemfire.test.dunit.VM;
 
+@Category(DistributedTest.class)
 public class PRFunctionExecutionWithResultSenderDUnitTest extends
     PartitionedRegionDUnitTestCase {
   private static final String TEST_FUNCTION7 = TestFunction.TEST_FUNCTION7;
@@ -60,8 +70,8 @@ public class PRFunctionExecutionWithResultSenderDUnitTest extends
   
   private static final long serialVersionUID = 1L;
 
-  public PRFunctionExecutionWithResultSenderDUnitTest(String name) {
-    super(name);
+  public PRFunctionExecutionWithResultSenderDUnitTest() {
+    super();
   }
 
   /**
@@ -70,6 +80,7 @@ public class PRFunctionExecutionWithResultSenderDUnitTest extends
    * 
    * @throws Exception
    */
+  @Test
   public void testRemoteSingleKeyExecution_byName() throws Exception {
     final String rName = getUniqueName();
     Host host = Host.getHost(0);
@@ -161,6 +172,7 @@ public class PRFunctionExecutionWithResultSenderDUnitTest extends
    * 
    * @throws Exception
    */
+  @Test
   public void testRemoteExecution_NoLastResult() throws Exception {
     final String rName = getUniqueName();
     Host host = Host.getHost(0);
@@ -240,6 +252,7 @@ public class PRFunctionExecutionWithResultSenderDUnitTest extends
    * 
    * @throws Exception
    */
+  @Test
   public void testRemoteMultiKeyExecution_byName() throws Exception {
     final String rName = getUniqueName();
     Host host = Host.getHost(0);
@@ -336,6 +349,7 @@ public class PRFunctionExecutionWithResultSenderDUnitTest extends
    * haveResult = true
    * @throws Exception
    */
+  @Test
   public void testLocalMultiKeyExecution_byName() throws Exception {
     final String rName = getUniqueName();
     Host host = Host.getHost(0);
@@ -406,6 +420,7 @@ public class PRFunctionExecutionWithResultSenderDUnitTest extends
    * 
    * @throws Exception
    */
+  @Test
   public void testLocalExecution_NoLastResult() throws Exception {
     final String rName = getUniqueName();
     Host host = Host.getHost(0);
@@ -464,6 +479,7 @@ public class PRFunctionExecutionWithResultSenderDUnitTest extends
    * 
    * @throws Exception
    */
+  @Test
   public void testExecutionOnAllNodes_NoLastResult()
       throws Exception {
     final String rName = getUniqueName();
@@ -532,6 +548,7 @@ public class PRFunctionExecutionWithResultSenderDUnitTest extends
     assertEquals(Boolean.TRUE, o);
   }
   
+  @Test
   public void testExecutionOnAllNodes_byName() throws Exception {
     final String rName = getUniqueName();
     Host host = Host.getHost(0);
@@ -630,6 +647,7 @@ public class PRFunctionExecutionWithResultSenderDUnitTest extends
     return attr.create();
   }
 
+  @Test
   public void testlonerSystem_Bug41832() throws Exception {
     final String rName = getUniqueName();
     Host host = Host.getHost(0);

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/b914df23/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRPerformanceTestDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRPerformanceTestDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRPerformanceTestDUnitTest.java
index 6f34acd..b5fab1e 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRPerformanceTestDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRPerformanceTestDUnitTest.java
@@ -16,6 +16,15 @@
  */
 package com.gemstone.gemfire.internal.cache.execute;
 
+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 is a dunit test for PartitionedRegion creation and Region API's
  * for put and get functionality in case of Custom Partitioning.
@@ -58,11 +67,12 @@ import com.gemstone.gemfire.test.dunit.LogWriterUtils;
 import com.gemstone.gemfire.test.dunit.SerializableRunnable;
 import com.gemstone.gemfire.test.dunit.VM;
 
+@Category(DistributedTest.class)
 public class PRPerformanceTestDUnitTest extends
     PartitionedRegionDUnitTestCase {
 
-  public PRPerformanceTestDUnitTest(String name) {
-    super(name);
+  public PRPerformanceTestDUnitTest() {
+    super();
   }
 
   protected static Cache cache = null;
@@ -85,7 +95,7 @@ public class PRPerformanceTestDUnitTest extends
   
   public static void createCacheInVm() throws Exception{
     Properties props = new Properties();
-    new PRPerformanceTestDUnitTest("temp").createCache(props);
+    new PRPerformanceTestDUnitTest().createCache(props);
   }
   
   private void createCache(Properties props) throws Exception
@@ -317,6 +327,7 @@ public class PRPerformanceTestDUnitTest extends
    * This is a PartitionedRegion test for Custom Prtitioning . 4 VMs are used to create the PR with
    * and without(Only Accessor) the DataStore.
    */
+  @Test
   public void testPartitionedRegionOperationsCustomPartitioning()
       throws Exception {
     Host host = Host.getHost(0);

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/b914df23/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRTransactionDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRTransactionDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRTransactionDUnitTest.java
index c0b04a6..b06887f 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRTransactionDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRTransactionDUnitTest.java
@@ -16,6 +16,15 @@
  */
 package com.gemstone.gemfire.internal.cache.execute;
 
+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.HashSet;
 import java.util.Iterator;
@@ -54,6 +63,7 @@ import com.gemstone.gemfire.test.dunit.SerializableCallable;
  * execute transactions.  
  *
  */
+@Category(DistributedTest.class)
 public class PRTransactionDUnitTest extends PRColocationDUnitTest {
 
   public static final int VERIFY_TX = 0;
@@ -78,30 +88,36 @@ public class PRTransactionDUnitTest extends PRColocationDUnitTest {
 
   final int perfOrderShipmentPairs = 1;
 
-  public PRTransactionDUnitTest(String name) {
-    super(name);
+  public PRTransactionDUnitTest() {
+    super();
   }
 
+  @Test
   public void testBasicPRTransactionRedundancy0() {
     basicPRTXInFunction(0, true);
   }
 
+  @Test
   public void testBasicPRTransactionRedundancy1() {
     basicPRTXInFunction(1, true);
   }
 
+  @Test
   public void testBasicPRTransactionRedundancy2() {
     basicPRTXInFunction(2, true);
   }
 
+  @Test
   public void testBasicPRTransactionNoDataRedundancy0() {
     basicPRTXInFunction(0, false);
   }
 
+  @Test
   public void testBasicPRTransactionNoDataRedundancy1() {
     basicPRTXInFunction(1, false);
   }
 
+  @Test
   public void testBasicPRTransactionNoDataRedundancy2() {
     basicPRTXInFunction(2, false);
   }
@@ -311,14 +327,17 @@ public class PRTransactionDUnitTest extends PRColocationDUnitTest {
     return false;
   }
   
+  @Test
   public void testPRTXInCacheListenerRedundancy0() {
     basicPRTXInCacheListener(0);
   }
 
+  @Test
   public void testPRTXInCacheListenerRedundancy1() {
     basicPRTXInCacheListener(1);
   }
 
+  @Test
   public void testPRTXInCacheListenerRedundancy2() {
     basicPRTXInCacheListener(2);
   }
@@ -466,6 +485,7 @@ public class PRTransactionDUnitTest extends PRColocationDUnitTest {
 
   }
   
+  @Test
   public void testRepeatableRead() throws Exception {
     createColocatedPRs(1);
     SerializableCallable registerFunction = new SerializableCallable(
@@ -514,6 +534,7 @@ public class PRTransactionDUnitTest extends PRColocationDUnitTest {
 
   }
 
+  @Test
   public void testPRTXPerformance() throws Exception {
     defaultStringSize = 1024;
 
@@ -630,36 +651,47 @@ public class PRTransactionDUnitTest extends PRColocationDUnitTest {
   }
 
   // Don't want to run the test twice
+  @Test
   public void testColocatedPartitionedRegion() throws Throwable {
   }
 
+  @Test
   public void testColocationPartitionedRegion() throws Throwable {
   }
 
+  @Test
   public void testColocationPartitionedRegionWithRedundancy() throws Throwable {
   }
 
+  @Test
   public void testPartitionResolverPartitionedRegion() throws Throwable {
   }
 
+  @Test
   public void testColocationPartitionedRegionWithNullColocationSpecifiedOnOneNode() {
   }
   @Override
+  @Test
   public void testColocatedPRRedundancyRecovery() throws Throwable {
   }
   @Override
+  @Test
   public void testColocatedPRWithAccessorOnDifferentNode1() throws Throwable {
   }
   @Override
+  @Test
   public void testColocatedPRWithAccessorOnDifferentNode2() throws Throwable {
   }
   @Override
+  @Test
   public void testColocatedPRWithDestroy() throws Throwable {
   }
   @Override
+  @Test
   public void testColocatedPRWithLocalDestroy() throws Throwable {
   }
   @Override
+  @Test
   public void testColocatedPRWithPROnDifferentNode1() throws Throwable {
   }
   

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/b914df23/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRTransactionWithVersionsDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRTransactionWithVersionsDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRTransactionWithVersionsDUnitTest.java
index 085f4a9..0b8588d 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRTransactionWithVersionsDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRTransactionWithVersionsDUnitTest.java
@@ -16,10 +16,20 @@
  */
 package com.gemstone.gemfire.internal.cache.execute;
 
+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;
+
+@Category(DistributedTest.class)
 public class PRTransactionWithVersionsDUnitTest extends PRTransactionDUnitTest {
 
-  public PRTransactionWithVersionsDUnitTest(String name) {
-    super(name);
+  public PRTransactionWithVersionsDUnitTest() {
+    super();
   }
 
   @Override

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/b914df23/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PerformanceTestFunction.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PerformanceTestFunction.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PerformanceTestFunction.java
index eecaa65..08e0f33 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PerformanceTestFunction.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PerformanceTestFunction.java
@@ -16,12 +16,12 @@
  */
 package com.gemstone.gemfire.internal.cache.execute;
 
+import static org.junit.Assert.*;
+
 import java.util.ArrayList;
 import java.util.Iterator;
 import java.util.Set;
 
-import junit.framework.Assert;
-
 import com.gemstone.gemfire.cache.Region;
 import com.gemstone.gemfire.cache.execute.FunctionAdapter;
 import com.gemstone.gemfire.cache.execute.FunctionContext;
@@ -46,7 +46,7 @@ public class PerformanceTestFunction extends FunctionAdapter {
       Region fcd = PartitionRegionHelper.getLocalDataForContext(prContext);
       for (Iterator i = allKeysSet.iterator(); i.hasNext();) {
         Object val = fcd.get(i.next());
-        Assert.assertNotNull(val);
+        assertNotNull(val);
         vals.add(val);
       }
       context.getResultSender().lastResult(vals);

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/b914df23/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/SingleHopGetAllPutAllDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/SingleHopGetAllPutAllDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/SingleHopGetAllPutAllDUnitTest.java
index f2ab3e2..d5e07f0 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/SingleHopGetAllPutAllDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/SingleHopGetAllPutAllDUnitTest.java
@@ -16,6 +16,15 @@
  */
 package com.gemstone.gemfire.internal.cache.execute;
 
+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.HashMap;
 import java.util.Iterator;
@@ -35,13 +44,14 @@ import com.gemstone.gemfire.test.dunit.Assert;
 import com.gemstone.gemfire.test.dunit.Wait;
 import com.gemstone.gemfire.test.dunit.WaitCriterion;
 
+@Category(DistributedTest.class)
 public class SingleHopGetAllPutAllDUnitTest extends PRClientServerTestBase{
 
 
   private static final long serialVersionUID = 3873751456134028508L;
   
-  public SingleHopGetAllPutAllDUnitTest(String name) {
-    super(name);
+  public SingleHopGetAllPutAllDUnitTest() {
+    super();
     
   }
   
@@ -51,6 +61,7 @@ public class SingleHopGetAllPutAllDUnitTest extends PRClientServerTestBase{
    * hosting the data. 
    */
   @Ignore("Disabled due to bug #50618")
+  @Test
   public void testServerGetAllFunction(){
     createScenario();
     client.invoke(() -> SingleHopGetAllPutAllDUnitTest.getAll());
@@ -140,6 +151,7 @@ public class SingleHopGetAllPutAllDUnitTest extends PRClientServerTestBase{
    * Will also have to see if the function was routed from client to all the servers
    * hosting the data. 
    */
+  @Test
   public void testServerPutAllFunction(){
     createScenario();
     client.invoke(() -> SingleHopGetAllPutAllDUnitTest.putAll());


Mime
View raw message