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:41:50 UTC

[09/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/management/ClientHealthStatsDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/ClientHealthStatsDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/ClientHealthStatsDUnitTest.java
index 1d7a5a0..9c805f2 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/ClientHealthStatsDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/ClientHealthStatsDUnitTest.java
@@ -16,7 +16,21 @@
  */
 package com.gemstone.gemfire.management;
 
-import com.gemstone.gemfire.cache.*;
+import static com.gemstone.gemfire.distributed.DistributedSystemConfigProperties.*;
+import static com.gemstone.gemfire.test.dunit.Assert.*;
+
+import java.util.Collection;
+import java.util.Iterator;
+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.EntryEvent;
+import com.gemstone.gemfire.cache.Region;
+import com.gemstone.gemfire.cache.RegionFactory;
+import com.gemstone.gemfire.cache.RegionShortcut;
 import com.gemstone.gemfire.cache.client.ClientCacheFactory;
 import com.gemstone.gemfire.cache.client.ClientRegionFactory;
 import com.gemstone.gemfire.cache.client.ClientRegionShortcut;
@@ -27,41 +41,34 @@ import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
 import com.gemstone.gemfire.internal.cache.tier.sockets.CacheClientNotifier;
 import com.gemstone.gemfire.internal.cache.tier.sockets.CacheClientProxy;
 import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
-import com.gemstone.gemfire.test.dunit.*;
-
-import java.util.Collection;
-import java.util.Iterator;
-import java.util.Properties;
-
-import static com.gemstone.gemfire.distributed.DistributedSystemConfigProperties.*;
+import com.gemstone.gemfire.test.dunit.Host;
+import com.gemstone.gemfire.test.dunit.IgnoredException;
+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.internal.JUnit4DistributedTestCase;
+import com.gemstone.gemfire.test.junit.categories.DistributedTest;
 
 /**
  * Client health stats check
- * 
- * 
  */
-public class ClientHealthStatsDUnitTest extends DistributedTestCase {
+@Category(DistributedTest.class)
+@SuppressWarnings("serial")
+public class ClientHealthStatsDUnitTest extends JUnit4DistributedTestCase {
 
   private static final String k1 = "k1";
-
   private static final String k2 = "k2";
-
   private static final String client_k1 = "client-k1";
-
   private static final String client_k2 = "client-k2";
 
   /** name of the test region */
   private static final String REGION_NAME = "ClientHealthStatsDUnitTest_Region";
 
-  private VM server = null;
-
   private static VM client = null;
-  
   private static VM client2 = null;
-
   private static VM managingNode = null;
 
-  private static ManagementTestBase helper = new ManagementTestBase("ClientHealthStatsDUnitTest_Helper");
+  private static ManagementTestBase helper = new ManagementTestBase(){};
   
   private static int numOfCreates = 0;
   private static int numOfUpdates = 0;
@@ -70,9 +77,7 @@ public class ClientHealthStatsDUnitTest extends DistributedTestCase {
   
   private static GemFireCacheImpl cache = null;
 
-  public ClientHealthStatsDUnitTest(String name) {
-    super(name);
-  }
+  private VM server = null;
 
   @Override
   public final void postSetUp() throws Exception {
@@ -83,6 +88,7 @@ public class ClientHealthStatsDUnitTest extends DistributedTestCase {
     server = host.getVM(1);
     client = host.getVM(2);
     client2 = host.getVM(3);
+
     IgnoredException.addIgnoredException("Connection reset");
   }
 
@@ -96,18 +102,16 @@ public class ClientHealthStatsDUnitTest extends DistributedTestCase {
 
     disconnectAllFromDS();
   }
-  
-  public static void reset() throws Exception {
+
+  private static void reset() throws Exception {
     lastKeyReceived = false;
     numOfCreates = 0;
     numOfUpdates = 0;
     numOfInvalidates = 0;
   }
 
-  private static final long serialVersionUID = 1L;
-
+  @Test
   public void testClientHealthStats_SubscriptionEnabled() throws Exception {
-
     helper.createManagementCache(managingNode);
     helper.startManagingNode(managingNode);
 
@@ -126,8 +130,8 @@ public class ClientHealthStatsDUnitTest extends DistributedTestCase {
     helper.stopManagingNode(managingNode);
   }
   
+  @Test
   public void testClientHealthStats_SubscriptionDisabled() throws Exception {
-
     helper.createManagementCache(managingNode);
     helper.startManagingNode(managingNode);
 
@@ -146,8 +150,8 @@ public class ClientHealthStatsDUnitTest extends DistributedTestCase {
     helper.stopManagingNode(managingNode);
   }
   
+  @Test
   public void testClientHealthStats_DurableClient() throws Exception {
-
     helper.createManagementCache(managingNode);
     helper.startManagingNode(managingNode);
 
@@ -170,6 +174,7 @@ public class ClientHealthStatsDUnitTest extends DistributedTestCase {
     helper.stopManagingNode(managingNode);
   }
   
+  @Test
   public void testStatsMatchWithSize() throws Exception {
     // start a server
     int port = (Integer) server.invoke(() -> ClientHealthStatsDUnitTest.createServerCache());
@@ -213,15 +218,14 @@ public class ClientHealthStatsDUnitTest extends DistributedTestCase {
       
       @Override
       public String description() {
-        // TODO Auto-generated method stub
         return "Proxy has not paused yet";
       }
     };
     
     Wait.waitForCriterion(criterion, 15 * 1000, 200, true);	  
   }
-  
-  public static int createServerCache() throws Exception {
+
+  private static int createServerCache() throws Exception {
     Cache cache = helper.createCache(false);
 
     RegionFactory<String, String> rf = cache.createRegionFactory(RegionShortcut.REPLICATE);
@@ -234,22 +238,16 @@ public class ClientHealthStatsDUnitTest extends DistributedTestCase {
     return server1.getPort();
   }
 
-  
-  
-  public static void closeClientCache() throws Exception {
+  private static void closeClientCache() throws Exception {
     cache.close(true);
   }
 
-  public static void createClientCache(Host host, Integer port, int clientNum, boolean subscriptionEnabled, boolean durable) throws Exception {
-
+  private static void createClientCache(Host host, Integer port, int clientNum, boolean subscriptionEnabled, boolean durable) throws Exception {
     Properties props = new Properties();
     props.setProperty(DURABLE_CLIENT_ID, "durable-"+clientNum);
     props.setProperty(DURABLE_CLIENT_TIMEOUT, "300000");
-
-//    props.setProperty("log-file", getTestMethodName()+"_client_" + clientNum + ".log");
     props.setProperty(LOG_LEVEL, "info");
-    props.setProperty(STATISTIC_ARCHIVE_FILE, getTestMethodName() + "_client_" + clientNum
-        + ".gfs");
+    props.setProperty(STATISTIC_ARCHIVE_FILE, getTestMethodName() + "_client_" + clientNum + ".gfs");
     props.setProperty(STATISTIC_SAMPLING_ENABLED, "true");
 
     ClientCacheFactory ccf = new ClientCacheFactory(props);
@@ -296,10 +294,9 @@ public class ClientHealthStatsDUnitTest extends DistributedTestCase {
       r.registerInterest("ALL_KEYS", true);
       cache.readyForEvents();
     }
-
   }
 
-  public static void doPuts() throws Exception {
+  private static void doPuts() throws Exception {
     Cache cache = GemFireCacheImpl.getInstance();
     final Region<String, String> r = cache.getRegion(Region.SEPARATOR + REGION_NAME);
     Thread t1 = new Thread(new Runnable() {
@@ -332,8 +329,8 @@ public class ClientHealthStatsDUnitTest extends DistributedTestCase {
     t2.join();
     t3.join();
   }
-  
-  public static void resumePuts() {
+
+  private static void resumePuts() {
     Cache cache = GemFireCacheImpl.getInstance();
     Region<String, String> r = cache.getRegion(Region.SEPARATOR + REGION_NAME);
     for (int i = 0; i < 100; i++) {
@@ -342,7 +339,7 @@ public class ClientHealthStatsDUnitTest extends DistributedTestCase {
     r.put("last_key", "last_value");
   }
 
-  public static void waitForLastKey() {
+  private static void waitForLastKey() {
     WaitCriterion wc = new WaitCriterion() {
       @Override
       public boolean done() {
@@ -356,14 +353,12 @@ public class ClientHealthStatsDUnitTest extends DistributedTestCase {
     Wait.waitForCriterion(wc, 60*1000, 500, true);
   }
 
-
-  @SuppressWarnings("serial")
-  protected static DistributedMember getMember() throws Exception {
+  private static DistributedMember getMember() throws Exception {
     GemFireCacheImpl cache = GemFireCacheImpl.getInstance();
     return cache.getDistributedSystem().getDistributedMember();
   }
 
-  protected static void verifyClientStats(DistributedMember serverMember, int serverPort, int numSubscriptions) {
+  private static void verifyClientStats(DistributedMember serverMember, int serverPort, int numSubscriptions) {
     GemFireCacheImpl cache = GemFireCacheImpl.getInstance();
     try {
       ManagementService service = ManagementService.getExistingManagementService(cache);
@@ -376,8 +371,6 @@ public class ClientHealthStatsDUnitTest extends DistributedTestCase {
       
       ClientHealthStatus[] clientStatuses = bean.showAllClientStats();
 
- 
-      
       ClientHealthStatus clientStatus1 = bean.showClientStats(clientIds[0]);
       ClientHealthStatus clientStatus2 = bean.showClientStats(clientIds[1]);
       assertNotNull(clientStatus1);
@@ -391,22 +384,18 @@ public class ClientHealthStatsDUnitTest extends DistributedTestCase {
       assertTrue(clientStatuses.length == 2);
       for (ClientHealthStatus status : clientStatuses) {
         System.out.println("<ExpectedString> ClientStats of the Server is  " + status + "</ExpectedString> ");
-
       }
 
-
       DistributedSystemMXBean dsBean = service.getDistributedSystemMXBean();
       assertEquals(2, dsBean.getNumClients());
       assertEquals(numSubscriptions, dsBean.getNumSubscriptions());
 
     } catch (Exception e) {
-      e.printStackTrace();
-      fail("Error while verifying cache server from remote member " + e);
+      fail("Error while verifying cache server from remote member", e);
     }
-
   }
 
-  protected static void put() {
+  private static void put() {
     Cache cache = GemFireCacheImpl.getInstance();
     Region r1 = cache.getRegion(Region.SEPARATOR + REGION_NAME);
     assertNotNull(r1);
@@ -432,11 +421,9 @@ public class ClientHealthStatsDUnitTest extends DistributedTestCase {
     } catch (Exception e) {
       // sleep
     }
-
   }
 
-
-  public static void verifyStats(int serverPort) throws Exception {
+  private static void verifyStats(int serverPort) throws Exception {
     Cache cache = GemFireCacheImpl.getInstance();
     ManagementService service = ManagementService.getExistingManagementService(cache);
     CacheServerMXBean serverBean = service.getLocalCacheServerMXBean(serverPort);
@@ -452,5 +439,4 @@ public class ClientHealthStatsDUnitTest extends DistributedTestCase {
     ClientQueueDetail queueDetails = serverBean.showClientQueueDetails()[0];
     assertEquals(queueDetails.getQueueSize(), ccp.getQueueSizeStat());
   }
-
 }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/b914df23/geode-core/src/test/java/com/gemstone/gemfire/management/CompositeTypeTestDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/CompositeTypeTestDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/CompositeTypeTestDUnitTest.java
index 565de1b..5e655fa 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/CompositeTypeTestDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/CompositeTypeTestDUnitTest.java
@@ -16,6 +16,15 @@
  */
 package com.gemstone.gemfire.management;
 
+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 javax.management.MalformedObjectNameException;
 import javax.management.ObjectName;
@@ -29,10 +38,11 @@ import com.gemstone.gemfire.test.dunit.VM;
 import com.gemstone.gemfire.test.dunit.Wait;
 import com.gemstone.gemfire.test.dunit.WaitCriterion;
 
+@Category(DistributedTest.class)
 public class CompositeTypeTestDUnitTest extends ManagementTestBase {
 
-  public CompositeTypeTestDUnitTest(String name) {
-    super(name);
+  public CompositeTypeTestDUnitTest() {
+    super();
     // TODO Auto-generated constructor stub
   }
 
@@ -43,6 +53,7 @@ public class CompositeTypeTestDUnitTest extends ManagementTestBase {
   
   private static ObjectName objectName;
 
+  @Test
   public void testCompositeTypeGetters() throws Exception{
     
     initManagement(false);

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/b914df23/geode-core/src/test/java/com/gemstone/gemfire/management/DLockManagementDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/DLockManagementDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/DLockManagementDUnitTest.java
index 29a3a85..38e5fc0 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/DLockManagementDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/DLockManagementDUnitTest.java
@@ -16,6 +16,15 @@
  */
 package com.gemstone.gemfire.management;
 
+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.Map;
 import java.util.Set;
 
@@ -39,6 +48,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 DLockManagementDUnitTest extends ManagementTestBase {
 
   private static final long serialVersionUID = 1L;
@@ -50,8 +60,8 @@ public class DLockManagementDUnitTest extends ManagementTestBase {
   // 60 seconds.
   private static final int MAX_WAIT = 70 * 1000;
 
-  public DLockManagementDUnitTest(String name) {
-    super(name);
+  public DLockManagementDUnitTest() {
+    super();
 
   }
 
@@ -61,6 +71,7 @@ public class DLockManagementDUnitTest extends ManagementTestBase {
    * @throws Exception
    */
   @Category(FlakyTest.class) // GEODE-173: eats exceptions, HeadlessGFSH, time sensitive, waitForCriterions
+  @Test
   public void testDLockMBean() throws Throwable {
     
     initManagement(false);
@@ -93,6 +104,7 @@ public class DLockManagementDUnitTest extends ManagementTestBase {
    * @throws Exception
    */
   @Category(FlakyTest.class) // GEODE-553: waitForCriterion, eats exceptions, HeadlessGFSH
+  @Test
   public void testDLockAggregate() throws Throwable {
     initManagement(false);
     VM[] managedNodes = new VM[getManagedNodeList()

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/b914df23/geode-core/src/test/java/com/gemstone/gemfire/management/DiskManagementDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/DiskManagementDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/DiskManagementDUnitTest.java
index e2acc24..cc69361 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/DiskManagementDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/DiskManagementDUnitTest.java
@@ -16,6 +16,15 @@
  */
 package com.gemstone.gemfire.management;
 
+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.util.Arrays;
 import java.util.List;
@@ -54,6 +63,7 @@ import com.gemstone.gemfire.test.dunit.WaitCriterion;
  * 
  * 
  */
+@Category(DistributedTest.class)
 public class DiskManagementDUnitTest extends ManagementTestBase {
 
   /**
@@ -75,8 +85,8 @@ public class DiskManagementDUnitTest extends ManagementTestBase {
 
   protected static LogWriter logWriter;
 
-  public DiskManagementDUnitTest(String name) throws Exception {
-    super(name);
+  public DiskManagementDUnitTest() throws Exception {
+    super();
   
     diskDir = new File("diskDir-" + getName()).getAbsoluteFile();
     com.gemstone.gemfire.internal.FileUtil.delete(diskDir);
@@ -102,6 +112,7 @@ public class DiskManagementDUnitTest extends ManagementTestBase {
    * @throws Exception
    */
 
+  @Test
   public void testDiskCompact() throws Throwable {
     initManagement(false);
     for (VM vm : getManagedNodeList()) {
@@ -122,6 +133,7 @@ public class DiskManagementDUnitTest extends ManagementTestBase {
    * @throws Exception
    */
 
+  @Test
   public void testDiskCompactRemote() throws Throwable {
 
     initManagement(false);
@@ -139,6 +151,7 @@ public class DiskManagementDUnitTest extends ManagementTestBase {
    * @throws Exception
    */
 
+  @Test
   public void testDiskOps() throws Throwable {
 
     initManagement(false);
@@ -152,6 +165,7 @@ public class DiskManagementDUnitTest extends ManagementTestBase {
 
   }
 
+  @Test
   public void testDiskBackupAllMembers() throws Throwable {
     initManagement(false);
     for (VM vm : getManagedNodeList()) {
@@ -169,6 +183,7 @@ public class DiskManagementDUnitTest extends ManagementTestBase {
    * @throws Throwable
    */
   @SuppressWarnings("serial")
+  @Test
   public void testMissingMembers() throws Throwable {
 
     initManagement(false);

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/b914df23/geode-core/src/test/java/com/gemstone/gemfire/management/DistributedSystemDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/DistributedSystemDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/DistributedSystemDUnitTest.java
index bda9470..fca0a68 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/DistributedSystemDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/DistributedSystemDUnitTest.java
@@ -16,6 +16,15 @@
  */
 package com.gemstone.gemfire.management;
 
+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;
@@ -85,6 +94,7 @@ import com.gemstone.gemfire.test.dunit.WaitCriterion;
  * 
  * 
  */
+@Category(DistributedTest.class)
 public class DistributedSystemDUnitTest extends ManagementTestBase {
 
   private static final Logger logger = LogService.getLogger();
@@ -105,8 +115,8 @@ public class DistributedSystemDUnitTest extends ManagementTestBase {
   static final String SEVERE_LEVEL_MESSAGE =  "Severelevel Alert Message";
 
   
-  public DistributedSystemDUnitTest(String name) {
-    super(name);
+  public DistributedSystemDUnitTest() {
+    super();
   }
 
   /**
@@ -114,6 +124,7 @@ public class DistributedSystemDUnitTest extends ManagementTestBase {
    * 
    * @throws Exception
    */
+  @Test
   public void testDistributedSystemAggregate() throws Exception {
     VM managingNode = getManagingNode();
     createManagementCache(managingNode);
@@ -138,6 +149,7 @@ public class DistributedSystemDUnitTest extends ManagementTestBase {
    * 
    * @throws Exception
    */
+  @Test
   public void testAlertManagedNodeFirst() throws Exception {
 
     for (VM vm : getManagedNodeList()) {
@@ -224,6 +236,7 @@ public class DistributedSystemDUnitTest extends ManagementTestBase {
    * 
    * @throws Exception
    */
+  @Test
   public void testShutdownAll() throws Exception {
     final Host host = Host.getHost(0);
     VM managedNode1 = host.getVM(0);
@@ -243,6 +256,7 @@ public class DistributedSystemDUnitTest extends ManagementTestBase {
     closeCache(managingNode);
   }
   
+  @Test
   public void testNavigationAPIS() throws Exception{
     
     final Host host = Host.getHost(0); 
@@ -257,6 +271,7 @@ public class DistributedSystemDUnitTest extends ManagementTestBase {
     checkNavigationAPIs(managingNode);    
   }
   
+  @Test
   public void testNotificationHub() throws Exception {
     this.initManagement(false);
 
@@ -485,6 +500,7 @@ public class DistributedSystemDUnitTest extends ManagementTestBase {
    * 
    * @throws Exception
    */
+  @Test
   public void testAlert() throws Exception {
     VM managingNode = getManagingNode();
    

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/b914df23/geode-core/src/test/java/com/gemstone/gemfire/management/LocatorManagementDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/LocatorManagementDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/LocatorManagementDUnitTest.java
index 6230119..ac608a6 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/LocatorManagementDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/LocatorManagementDUnitTest.java
@@ -16,14 +16,8 @@
  */
 package com.gemstone.gemfire.management;
 
-import com.gemstone.gemfire.distributed.DistributedMember;
-import com.gemstone.gemfire.distributed.Locator;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
-import com.gemstone.gemfire.distributed.internal.InternalLocator;
-import com.gemstone.gemfire.internal.AvailablePortHelper;
-import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
-import com.gemstone.gemfire.management.internal.ManagementConstants;
-import com.gemstone.gemfire.test.dunit.*;
+import static com.gemstone.gemfire.distributed.DistributedSystemConfigProperties.*;
+import static org.junit.Assert.*;
 
 import java.io.File;
 import java.io.IOException;
@@ -31,35 +25,36 @@ import java.net.InetAddress;
 import java.net.UnknownHostException;
 import java.util.Properties;
 
-import static com.gemstone.gemfire.distributed.DistributedSystemConfigProperties.*;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
 
+import com.gemstone.gemfire.distributed.DistributedMember;
+import com.gemstone.gemfire.distributed.Locator;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
+import com.gemstone.gemfire.distributed.internal.InternalLocator;
+import com.gemstone.gemfire.internal.AvailablePortHelper;
+import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
+import com.gemstone.gemfire.management.internal.ManagementConstants;
+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.SerializableCallable;
+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;
 
 /**
  * Test cases
  * 
  * DistributedSystem Cache Locator no no yes yes no yes yes yes yes
- * 
- * 
- * 
  */
-
+@Category(DistributedTest.class)
 public class LocatorManagementDUnitTest extends ManagementTestBase {
 
-  /** Default file name for locator log: <code>"locator.log"</code> */
-  public static final String DEFAULT_LOG_FILE = "locator.log";
-
   private static final int MAX_WAIT = 8 * ManagementConstants.REFRESH_TIME;
 
-  private static Properties props = new Properties();
-
   private VM locator;
-  
-
-  public LocatorManagementDUnitTest(String name) {
-    super(name);
-  }
-
-  private static final long serialVersionUID = 1L;
 
   @Override
   protected final void postSetUpManagementTestBase() throws Exception {
@@ -74,9 +69,8 @@ public class LocatorManagementDUnitTest extends ManagementTestBase {
   /**
    * When plan is to start Distributed System later so that the system can use
    * this locator
-   * 
-   * @throws Exception
    */
+  @Test
   public void testPeerLocation() throws Exception {
     int locPort = AvailablePortHelper.getRandomAvailableTCPPort();
     startLocator(locator, true, locPort);
@@ -99,6 +93,7 @@ public class LocatorManagementDUnitTest extends ManagementTestBase {
 
   }
 
+  @Test
   public void testPeerLocationWithPortZero() throws Exception {
     // Start the locator with port=0
     int locPort = startLocator(locator, true, 0);
@@ -123,9 +118,8 @@ public class LocatorManagementDUnitTest extends ManagementTestBase {
 
   /**
    * Tests a locator which is co-located with already existing cache
-   * 
-   * @throws Exception
    */
+  @Test
   public void testColocatedLocator() throws Exception {
     initManagement(false);
     int locPort = AvailablePortHelper.getRandomAvailableTCPPort();
@@ -134,6 +128,7 @@ public class LocatorManagementDUnitTest extends ManagementTestBase {
 
   }
 
+  @Test
   public void testColocatedLocatorWithPortZero() throws Exception {
     initManagement(false);
     int locPort = startLocator(locator, false, 0);
@@ -141,6 +136,7 @@ public class LocatorManagementDUnitTest extends ManagementTestBase {
 
   }
 
+  @Test
   public void testListManagers() throws Exception {
     initManagement(false);
     int locPort = AvailablePortHelper.getRandomAvailableTCPPort();
@@ -148,12 +144,14 @@ public class LocatorManagementDUnitTest extends ManagementTestBase {
     listManagers(locator, locPort, false);
   }
 
+  @Test
   public void testListManagersWithPortZero() throws Exception {
     initManagement(false);
     int locPort = startLocator(locator, false, 0);
     listManagers(locator, locPort, false);
   }
 
+  @Test
   public void testWillingManagers() throws Exception {
     int locPort = AvailablePortHelper.getRandomAvailableTCPPort();
     startLocator(locator, true, locPort);
@@ -173,6 +171,7 @@ public class LocatorManagementDUnitTest extends ManagementTestBase {
     listWillingManagers(locator, locPort, false);
   }
 
+  @Test
   public void testWillingManagersWithPortZero() throws Exception {
     int locPort = startLocator(locator, true, 0);
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/b914df23/geode-core/src/test/java/com/gemstone/gemfire/management/MBeanUtil.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/MBeanUtil.java b/geode-core/src/test/java/com/gemstone/gemfire/management/MBeanUtil.java
index 1c2c3fd..a1bb2d2 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/MBeanUtil.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/MBeanUtil.java
@@ -16,8 +16,7 @@
  */
 package com.gemstone.gemfire.management;
 
-import java.util.Map;
-import java.util.Set;
+import static org.junit.Assert.*;
 
 import javax.management.InstanceNotFoundException;
 import javax.management.IntrospectionException;
@@ -27,27 +26,20 @@ import javax.management.MBeanServer;
 import javax.management.ObjectName;
 import javax.management.ReflectionException;
 
-import com.gemstone.gemfire.cache.Cache;
 import com.gemstone.gemfire.distributed.DistributedMember;
 import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
 import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
-import com.gemstone.gemfire.internal.cache.persistence.PersistentMemberID;
-import com.gemstone.gemfire.internal.cache.persistence.PersistentMemberManager;
 import com.gemstone.gemfire.management.internal.MBeanJMXAdapter;
 import com.gemstone.gemfire.management.internal.ManagementConstants;
 import com.gemstone.gemfire.management.internal.SystemManagementService;
-import com.gemstone.gemfire.test.dunit.DistributedTestCase;
 import com.gemstone.gemfire.test.dunit.LogWriterUtils;
 import com.gemstone.gemfire.test.dunit.Wait;
 import com.gemstone.gemfire.test.dunit.WaitCriterion;
 
 /**
  * Utility test class to get various proxies
- * 
- * 
  */
 public class MBeanUtil {
-  
 
   private static final int MAX_WAIT = 8 * ManagementConstants.REFRESH_TIME;
   
@@ -522,11 +514,11 @@ public class MBeanUtil {
     try {
       info = mbeanServer.getMBeanInfo(objName);
     } catch (IntrospectionException e1) {
-      DistributedTestCase.fail("Could not obtain Sender Proxy Details");
+      fail("Could not obtain Sender Proxy Details");
     } catch (InstanceNotFoundException e1) {
-      DistributedTestCase.fail("Could not obtain Sender Proxy Details");
+      fail("Could not obtain Sender Proxy Details");
     } catch (ReflectionException e1) {
-      DistributedTestCase.fail("Could not obtain Sender Proxy Details");
+      fail("Could not obtain Sender Proxy Details");
     }
     attributeInfos = info.getAttributes();
     for (MBeanAttributeInfo attributeInfo : attributeInfos) {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/b914df23/geode-core/src/test/java/com/gemstone/gemfire/management/ManagementTestBase.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/ManagementTestBase.java b/geode-core/src/test/java/com/gemstone/gemfire/management/ManagementTestBase.java
index 08167ab..2915f06 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/ManagementTestBase.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/ManagementTestBase.java
@@ -17,31 +17,48 @@
 package com.gemstone.gemfire.management;
 
 import static com.gemstone.gemfire.distributed.DistributedSystemConfigProperties.*;
+import static org.junit.Assert.*;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Properties;
+import java.util.Set;
+import javax.management.MBeanServer;
+import javax.management.ObjectName;
 
 import com.gemstone.gemfire.LogWriter;
-import com.gemstone.gemfire.cache.*;
+import com.gemstone.gemfire.cache.Cache;
+import com.gemstone.gemfire.cache.CacheFactory;
+import com.gemstone.gemfire.cache.Region;
+import com.gemstone.gemfire.cache.RegionFactory;
+import com.gemstone.gemfire.cache.RegionShortcut;
 import com.gemstone.gemfire.distributed.DistributedMember;
 import com.gemstone.gemfire.distributed.DistributedSystem;
 import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
 import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
 import com.gemstone.gemfire.internal.statistics.SampleCollector;
-import com.gemstone.gemfire.management.internal.*;
-import com.gemstone.gemfire.test.dunit.*;
-
-import javax.management.MBeanServer;
-import javax.management.ObjectName;
-import java.util.*;
-
-public class ManagementTestBase extends DistributedTestCase {
-
-  public ManagementTestBase(String name) {
-    super(name);
-
-  }
+import com.gemstone.gemfire.management.internal.FederatingManager;
+import com.gemstone.gemfire.management.internal.LocalManager;
+import com.gemstone.gemfire.management.internal.MBeanJMXAdapter;
+import com.gemstone.gemfire.management.internal.ManagementStrings;
+import com.gemstone.gemfire.management.internal.SystemManagementService;
+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.Invoke;
+import com.gemstone.gemfire.test.dunit.SerializableCallable;
+import com.gemstone.gemfire.test.dunit.SerializableRunnable;
+import com.gemstone.gemfire.test.dunit.VM;
+import com.gemstone.gemfire.test.dunit.Wait;
+import com.gemstone.gemfire.test.dunit.WaitCriterion;
+import com.gemstone.gemfire.test.dunit.internal.JUnit4DistributedTestCase;
+
+@SuppressWarnings("serial")
+public abstract class ManagementTestBase extends JUnit4DistributedTestCase {
 
   private static final int MAX_WAIT = 70 * 1000;
 
-  private static final long serialVersionUID = 1L;
   /**
    * log writer instance
    */
@@ -181,7 +198,6 @@ public class ManagementTestBase extends DistributedTestCase {
     }
   }
 
-  @SuppressWarnings("serial")
   public void createCache(VM vm1) throws Exception {
     vm1.invoke(new SerializableRunnable("Create Cache") {
       public void run() {
@@ -191,7 +207,6 @@ public class ManagementTestBase extends DistributedTestCase {
 
   }
 
-  @SuppressWarnings("serial")
   public void createCache(VM vm1, final Properties props) throws Exception {
     vm1.invoke(new SerializableRunnable("Create Cache") {
       public void run() {
@@ -204,7 +219,7 @@ public class ManagementTestBase extends DistributedTestCase {
   public Cache createCache(Properties props) {
     System.setProperty("dunitLogPerTest", "true");
     props.setProperty(LOG_FILE, getTestMethodName() + "-.log");
-    ds = (new ManagementTestBase("temp")).getSystem(props);
+    ds = getSystem(props);
     cache = CacheFactory.create(ds);
     managementService = ManagementService.getManagementService(cache);
     logWriter = ds.getLogWriter();
@@ -228,7 +243,7 @@ public class ManagementTestBase extends DistributedTestCase {
     props.setProperty(ENABLE_TIME_STATISTICS, "true");
     props.setProperty(STATISTIC_SAMPLING_ENABLED, "true");
     props.setProperty(LOG_FILE, getTestMethodName() + "-.log");
-    ds = (new ManagementTestBase("temp")).getSystem(props);
+    ds = getSystem(props);
     cache = CacheFactory.create(ds);
     managementService = ManagementService.getManagementService(cache);
     logWriter = ds.getLogWriter();
@@ -237,7 +252,6 @@ public class ManagementTestBase extends DistributedTestCase {
     return cache;
   }
 
-  @SuppressWarnings("serial")
   public void createManagementCache(VM vm1) throws Exception {
     vm1.invoke(new SerializableRunnable("Create Management Cache") {
       public void run() {
@@ -246,7 +260,6 @@ public class ManagementTestBase extends DistributedTestCase {
     });
   }
 
-  @SuppressWarnings("serial")
   public void closeCache(VM vm1) throws Exception {
     vm1.invoke(new SerializableRunnable("Close Cache") {
       public void run() {
@@ -317,7 +330,6 @@ public class ManagementTestBase extends DistributedTestCase {
    *
    * @throws Exception
    */
-  @SuppressWarnings("serial")
   public void startManagingNode(VM vm1) throws Exception {
     vm1.invoke(new SerializableRunnable("Start Being Managing Node") {
       public void run() {
@@ -342,7 +354,6 @@ public class ManagementTestBase extends DistributedTestCase {
    *
    * @throws Exception
    */
-  @SuppressWarnings("serial")
   public void startManagingNodeAsync(VM vm1) throws Exception {
     vm1.invokeAsync(new SerializableRunnable("Start Being Managing Node") {
 
@@ -364,7 +375,6 @@ public class ManagementTestBase extends DistributedTestCase {
    *
    * @throws Exception
    */
-  @SuppressWarnings("serial")
   public void stopManagingNode(VM vm1) throws Exception {
     vm1.invoke(new SerializableRunnable("Stop Being Managing Node") {
       public void run() {
@@ -386,7 +396,6 @@ public class ManagementTestBase extends DistributedTestCase {
    * remove all the artifacts of management namely a) Notification region b)
    * Monitoring Region c) Management task should stop
    */
-  @SuppressWarnings("serial")
   public void checkManagedNodeCleanup(VM vm) throws Exception {
     vm.invoke(new SerializableRunnable("Managing Node Clean up") {
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/b914df23/geode-core/src/test/java/com/gemstone/gemfire/management/MemberMBeanAttributesDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/MemberMBeanAttributesDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/MemberMBeanAttributesDUnitTest.java
index f6bb6c0..b376c4e 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/MemberMBeanAttributesDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/MemberMBeanAttributesDUnitTest.java
@@ -16,6 +16,15 @@
  */
 package com.gemstone.gemfire.management;
 
+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.lang.management.ManagementFactory;
 
 import com.gemstone.gemfire.cache.Region;
@@ -34,6 +43,7 @@ import com.gemstone.gemfire.test.dunit.VM;
  * This test class checks around 89 attributes of Member MBeans
  *
  */
+@Category(DistributedTest.class)
 public class MemberMBeanAttributesDUnitTest extends ManagementTestBase {
   
 
@@ -53,8 +63,8 @@ public class MemberMBeanAttributesDUnitTest extends ManagementTestBase {
 
 
 
-  public MemberMBeanAttributesDUnitTest(String name) {
-    super(name);
+  public MemberMBeanAttributesDUnitTest() {
+    super();
   }
 
   protected void sample(VM vm1) {
@@ -69,6 +79,7 @@ public class MemberMBeanAttributesDUnitTest extends ManagementTestBase {
  
 
   
+  @Test
   public void testReplRegionAttributes() throws Exception{
     initManagement(false);    
     setupForReplicateRegonAttributes(managedNodeList.get(0), 1);
@@ -79,6 +90,7 @@ public class MemberMBeanAttributesDUnitTest extends ManagementTestBase {
   }
   
   
+  @Test
   public void testPRRegionAttributes() throws Exception{
     initManagement(false);    
     setupForPartitionedRegonAttributes(managedNodeList.get(0), 1);    
@@ -87,11 +99,13 @@ public class MemberMBeanAttributesDUnitTest extends ManagementTestBase {
     
   }
   
+  @Test
   public void testOSAttributes() throws Exception{
     initManagement(false);
     isOSRelatedAttrsOK(managedNodeList.get(0));
   }
   
+  @Test
   public void testConfigAttributes() throws Exception {
     initManagement(false);
     isConfigRelatedAttrsOK(managedNodeList.get(0));

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/b914df23/geode-core/src/test/java/com/gemstone/gemfire/management/OffHeapManagementDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/OffHeapManagementDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/OffHeapManagementDUnitTest.java
index d8f0476..b42930a 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/OffHeapManagementDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/OffHeapManagementDUnitTest.java
@@ -16,11 +16,27 @@
  */
 package com.gemstone.gemfire.management;
 
+import static com.gemstone.gemfire.distributed.DistributedSystemConfigProperties.*;
+import static org.junit.Assert.*;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+import java.util.Properties;
+import javax.management.Attribute;
+import javax.management.AttributeList;
+import javax.management.MBeanServer;
+import javax.management.Notification;
+import javax.management.NotificationListener;
+import javax.management.ObjectName;
+
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
 import com.gemstone.gemfire.OutOfOffHeapMemoryException;
 import com.gemstone.gemfire.cache.Cache;
 import com.gemstone.gemfire.cache.DataPolicy;
 import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache30.CacheTestCase;
 import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
 import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
 import com.gemstone.gemfire.internal.offheap.OffHeapMemoryStats;
@@ -28,21 +44,21 @@ import com.gemstone.gemfire.internal.offheap.OffHeapStorage;
 import com.gemstone.gemfire.internal.offheap.OffHeapStoredObject;
 import com.gemstone.gemfire.management.internal.MBeanJMXAdapter;
 import com.gemstone.gemfire.management.internal.beans.MemberMBean;
-import com.gemstone.gemfire.test.dunit.*;
-
-import javax.management.*;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
-import java.util.Properties;
-
-import static com.gemstone.gemfire.distributed.DistributedSystemConfigProperties.*;
+import com.gemstone.gemfire.test.dunit.Host;
+import com.gemstone.gemfire.test.dunit.SerializableCallable;
+import com.gemstone.gemfire.test.dunit.SerializableRunnable;
+import com.gemstone.gemfire.test.dunit.VM;
+import com.gemstone.gemfire.test.dunit.Wait;
+import com.gemstone.gemfire.test.dunit.WaitCriterion;
+import com.gemstone.gemfire.test.dunit.cache.internal.JUnit4CacheTestCase;
+import com.gemstone.gemfire.test.junit.categories.DistributedTest;
 
 /**
  * Tests the off-heap additions to the RegionMXBean and MemberMXBean JMX interfaces.
  */
 @SuppressWarnings("serial")
-public class OffHeapManagementDUnitTest extends CacheTestCase {
+@Category(DistributedTest.class)
+public class OffHeapManagementDUnitTest extends JUnit4CacheTestCase {
   /**
    * Specified assertion operations.
    */
@@ -123,14 +139,6 @@ public class OffHeapManagementDUnitTest extends CacheTestCase {
    */
   private static MBeanServer mbeanServer = MBeanJMXAdapter.mbeanServer;
 
-  /**
-   * Creates a new OffHeapManagementDUnitTest.
-   * @param name the test name.
-   */
-  public OffHeapManagementDUnitTest(String name) {
-    super(name);
-  }
-  
   @Override
   public final void postSetUp() throws Exception {
     Host.getHost(0).getVM(0).invoke(new SerializableRunnable() {
@@ -155,6 +163,7 @@ public class OffHeapManagementDUnitTest extends CacheTestCase {
    * Tests off-heap additions to the RegionMXBean and MemberMXBean interfaces.
    * @throws Exception
    */
+  @Test
   public void testOffHeapMBeanAttributesAndStats() throws Exception {
     final VM vm = Host.getHost(0).getVM(0);    
 
@@ -203,6 +212,7 @@ public class OffHeapManagementDUnitTest extends CacheTestCase {
    * Tests the fragmentation statistic for off-heap memory.
    * @throws Exception
    */
+  @Test
   public void testFragmentationStat() throws Exception {
     final VM vm = Host.getHost(0).getVM(0);    
 
@@ -293,6 +303,7 @@ public class OffHeapManagementDUnitTest extends CacheTestCase {
    * Tests the compation time statistic for off-heap memory.
    * @throws Exception
    */
+  @Test
   public void testCompactionTimeStat() throws Exception {
     final VM vm = Host.getHost(0).getVM(0);    
 
@@ -351,6 +362,7 @@ public class OffHeapManagementDUnitTest extends CacheTestCase {
   /**
    *  Asserts that a monitor assigned to the OffHeapObjects attribute is triggered.
    */
+  @Test
   public void testOffHeapObjectsMonitoring()  throws Exception {
     final VM vm = Host.getHost(0).getVM(0);    
 
@@ -388,6 +400,7 @@ public class OffHeapManagementDUnitTest extends CacheTestCase {
   /**
    * Asserts that a monitor assigned to the OffHeapFreeSize attribute is triggered.
    */
+  @Test
   public void testOffHeapFreeSizeMonitoring()  throws Exception {
     final VM vm = Host.getHost(0).getVM(0);    
 
@@ -425,6 +438,7 @@ public class OffHeapManagementDUnitTest extends CacheTestCase {
   /**
    * Asserts that a monitor assigned to the OffHeapAllocatedSize attribute is triggered.
    */
+  @Test
   public void testOffHeapAllocatedSizeMonitoring()  throws Exception {
     final VM vm = Host.getHost(0).getVM(0);    
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/b914df23/geode-core/src/test/java/com/gemstone/gemfire/management/QueryDataDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/QueryDataDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/QueryDataDUnitTest.java
index ad26a05..c11dd0b 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/QueryDataDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/QueryDataDUnitTest.java
@@ -16,6 +16,15 @@
  */
 package com.gemstone.gemfire.management;
 
+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.createPortfoliosAndPositions;
 
 import java.io.IOException;
@@ -84,6 +93,7 @@ import org.json.JSONObject;
 // ORDER by orders
 // Test all attributes are covered in an complex type
 
+@Category(DistributedTest.class)
 public class QueryDataDUnitTest extends ManagementTestBase {
 
   private static final long serialVersionUID = 1L;
@@ -137,8 +147,8 @@ public class QueryDataDUnitTest extends ManagementTestBase {
   public static String[] queriesForLimit = new String[] { "select * from /" + repRegionName4 };
 
 
-  public QueryDataDUnitTest(String name) {
-    super(name);
+  public QueryDataDUnitTest() {
+    super();
   }
 
   @Override
@@ -315,6 +325,7 @@ public class QueryDataDUnitTest extends ManagementTestBase {
   }
 
   // disabled for bug 49698, serialization problems introduced by r44615
+  @Test
   public void testQueryOnPartitionedRegion() throws Exception {
 
     final DistributedMember member1 = getMember(managedNode1);
@@ -369,6 +380,7 @@ public class QueryDataDUnitTest extends ManagementTestBase {
     });
   }
 
+  @Test
   public void testQueryOnReplicatedRegion() throws Exception {
 
     
@@ -416,6 +428,7 @@ public class QueryDataDUnitTest extends ManagementTestBase {
     });
   }
   
+  @Test
   public void testMemberWise() throws Exception {
 
     final DistributedMember member1 = getMember(managedNode1);
@@ -454,6 +467,7 @@ public class QueryDataDUnitTest extends ManagementTestBase {
 
   
  
+  @Test
   public void testLimitForQuery() throws Exception {
     
     initCommonRegions();
@@ -529,6 +543,7 @@ public class QueryDataDUnitTest extends ManagementTestBase {
     });
   }
 
+  @Test
   public void testErrors() throws Exception{
     
     final DistributedMember member1 = getMember(managedNode1);
@@ -607,7 +622,8 @@ public class QueryDataDUnitTest extends ManagementTestBase {
     });
   }
   
- public void testNormalRegions() throws Exception{
+  @Test
+  public void testNormalRegions() throws Exception{
     
     final DistributedMember member1 = getMember(managedNode1);
     final DistributedMember member2 = getMember(managedNode2);
@@ -659,6 +675,7 @@ public class QueryDataDUnitTest extends ManagementTestBase {
     });
   }
  
+  @Test
   public void testRegionsLocalDataSet() throws Exception {
 
     final DistributedMember member1 = getMember(managedNode1);

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/b914df23/geode-core/src/test/java/com/gemstone/gemfire/management/RegionManagementDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/RegionManagementDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/RegionManagementDUnitTest.java
index b613c0e..9b72ff7 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/RegionManagementDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/RegionManagementDUnitTest.java
@@ -16,6 +16,15 @@
  */
 package com.gemstone.gemfire.management;
 
+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.Arrays;
 import java.util.List;
@@ -65,6 +74,7 @@ import com.gemstone.gemfire.test.dunit.WaitCriterion;
  * 
  * 
  */
+@Category(DistributedTest.class)
 public class RegionManagementDUnitTest extends ManagementTestBase {
 
   private static final long serialVersionUID = 1L;
@@ -100,8 +110,8 @@ public class RegionManagementDUnitTest extends ManagementTestBase {
   private static Region fixedPrRegion;
 
 
-  public RegionManagementDUnitTest(String name) {
-    super(name);
+  public RegionManagementDUnitTest() {
+    super();
 
   }
 
@@ -116,6 +126,7 @@ public class RegionManagementDUnitTest extends ManagementTestBase {
    * @throws Exception
    */
 
+  @Test
   public void testDistributedRegion() throws Exception {
 
     initManagement(false);
@@ -157,6 +168,7 @@ public class RegionManagementDUnitTest extends ManagementTestBase {
    * 
    * @throws Exception
    */
+  @Test
   public void testPartitionedRegion() throws Exception {
     initManagement(false);
 
@@ -196,6 +208,7 @@ public class RegionManagementDUnitTest extends ManagementTestBase {
    * 
    * @throws Exception
    */
+  @Test
   public void testFixedPRRegionMBean() throws Exception {
 
     initManagement(false);
@@ -233,6 +246,7 @@ public class RegionManagementDUnitTest extends ManagementTestBase {
    * while region is created in a member node asynchronously.
    * @throws Exception
    */
+  @Test
   public void testRegionAggregate() throws Exception{
     initManagement(true);
 
@@ -279,6 +293,7 @@ public class RegionManagementDUnitTest extends ManagementTestBase {
 
   }
   
+  @Test
   public void testNavigationAPIS() throws Exception {
     initManagement(true);
     for(VM vm : managedNodeList){
@@ -306,6 +321,7 @@ public class RegionManagementDUnitTest extends ManagementTestBase {
 
  
   
+  @Test
   public void testSubRegions() throws Exception{
     initManagement(false);
     for (VM vm : managedNodeList) {
@@ -327,6 +343,7 @@ public class RegionManagementDUnitTest extends ManagementTestBase {
   
   
   
+  @Test
   public void testSpecialRegions() throws Exception{
     initManagement(false);
     createSpecialRegion(managedNodeList.get(0));
@@ -387,6 +404,7 @@ public class RegionManagementDUnitTest extends ManagementTestBase {
 
   }
   
+  @Test
   public void testLruStats() throws Exception{
     initManagement(false);
     for (VM vm : managedNodeList) {
@@ -1346,7 +1364,7 @@ public class RegionManagementDUnitTest extends ManagementTestBase {
     int initialCapacity = regAttrs.getInitialCapacity();
     assertEquals(initialCapacity, data.getInitialCapacity());
     float loadFactor = regAttrs.getLoadFactor();
-    assertEquals(loadFactor, data.getLoadFactor());
+    assertEquals(loadFactor, data.getLoadFactor(),0);
 
     boolean lockGrantor = regAttrs.isLockGrantor();
     assertEquals(lockGrantor, data.isLockGrantor());