geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kl...@apache.org
Subject [6/8] incubator-geode git commit: Add SecurityTest and FlakyTest. Convert CLI tests to JUnit 4.
Date Tue, 05 Apr 2016 17:38:21 GMT
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/69fd61f0/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ListIndexCommandDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ListIndexCommandDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ListIndexCommandDUnitTest.java
index caa33fb..deb8860 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ListIndexCommandDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ListIndexCommandDUnitTest.java
@@ -16,6 +16,9 @@
  */
 package com.gemstone.gemfire.management.internal.cli.commands;
 
+import static com.gemstone.gemfire.test.dunit.Assert.*;
+import static com.gemstone.gemfire.test.dunit.LogWriterUtils.*;
+
 import java.io.Serializable;
 import java.util.ArrayList;
 import java.util.Arrays;
@@ -28,6 +31,9 @@ import java.util.Random;
 import java.util.Set;
 import java.util.concurrent.atomic.AtomicLong;
 
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
 import com.gemstone.gemfire.cache.Cache;
 import com.gemstone.gemfire.cache.DataPolicy;
 import com.gemstone.gemfire.cache.Region;
@@ -45,10 +51,10 @@ import com.gemstone.gemfire.management.cli.Result;
 import com.gemstone.gemfire.management.internal.cli.domain.IndexDetails;
 import com.gemstone.gemfire.management.internal.cli.i18n.CliStrings;
 import com.gemstone.gemfire.test.dunit.Host;
-import com.gemstone.gemfire.test.dunit.LogWriterUtils;
 import com.gemstone.gemfire.test.dunit.SerializableRunnable;
 import com.gemstone.gemfire.test.dunit.SerializableRunnableIF;
 import com.gemstone.gemfire.test.dunit.VM;
+import com.gemstone.gemfire.test.junit.categories.DistributedTest;
 
 /**
  * The ListIndexCommandDUnitTest class is distributed test suite of test cases for testing the index-based GemFire shell
@@ -59,6 +65,7 @@ import com.gemstone.gemfire.test.dunit.VM;
  * @since 7.0
  */
 @SuppressWarnings("unused")
+@Category(DistributedTest.class)
 public class ListIndexCommandDUnitTest extends CliCommandTestBase {
 
   protected static final int DEFAULT_REGION_INITIAL_CAPACITY = 10000;
@@ -78,11 +85,6 @@ public class ListIndexCommandDUnitTest extends CliCommandTestBase {
     return buffer.toString();
   }
 
-
-  public ListIndexCommandDUnitTest(final String testName) {
-    super(testName);
-  }
-
   @Override
   public final void postSetUp() throws Exception {
     createDefaultSetup(null);
@@ -136,7 +138,7 @@ public class ListIndexCommandDUnitTest extends CliCommandTestBase {
   protected Properties createDistributedSystemProperties(final String gemfireName) {
     final Properties distributedSystemProperties = new Properties();
 
-    distributedSystemProperties.setProperty(DistributionConfig.LOG_LEVEL_NAME, LogWriterUtils.getDUnitLogLevel());
+    distributedSystemProperties.setProperty(DistributionConfig.LOG_LEVEL_NAME, getDUnitLogLevel());
     distributedSystemProperties.setProperty(DistributionConfig.NAME_NAME, gemfireName);
 
     return distributedSystemProperties;
@@ -174,7 +176,7 @@ public class ListIndexCommandDUnitTest extends CliCommandTestBase {
               }
             }
           } catch (Exception e) {
-            LogWriterUtils.getLogWriter().error(
+            getLogWriter().error(
                 String.format("Error occurred creating Index (%1$s) on Region (%2$s) - (%3$s)", indexName,
                     region.getFullPath(), e.getMessage()));
           }
@@ -276,11 +278,11 @@ public class ListIndexCommandDUnitTest extends CliCommandTestBase {
   @SuppressWarnings("unchecked")
   protected <T extends Comparable<T>, B extends AbstractBean<T>> B query(final Cache cache, final String queryString) {
     try {
-      LogWriterUtils.getLogWriter().info(String.format("Running Query (%1$s) in GemFire...", queryString));
+      getLogWriter().info(String.format("Running Query (%1$s) in GemFire...", queryString));
 
       final SelectResults<B> results = (SelectResults<B>) cache.getQueryService().newQuery(queryString).execute();
 
-      LogWriterUtils.getLogWriter().info(
+      getLogWriter().info(
           String.format("Running Query (%1$s) in GemFire returned (%2$d) result(s).", queryString, results.size()));
 
       return (results.iterator().hasNext() ? results.iterator().next() : null);
@@ -292,12 +294,12 @@ public class ListIndexCommandDUnitTest extends CliCommandTestBase {
   protected <T extends Comparable<T>, B extends AbstractBean<T>> B query(final Region<T, B> region,
       final String queryPredicate) {
     try {
-      LogWriterUtils.getLogWriter().info(
+      getLogWriter().info(
           String.format("Running Query (%1$s) on Region (%2$s)...", queryPredicate, region.getFullPath()));
 
       final SelectResults<B> results = region.query(queryPredicate);
 
-      LogWriterUtils.getLogWriter().info(
+      getLogWriter().info(
           String.format("Running Query (%1$s) on Region (%2$s) returned (%3$d) result(s).", queryPredicate,
               region.getFullPath(), results.size()));
 
@@ -309,11 +311,12 @@ public class ListIndexCommandDUnitTest extends CliCommandTestBase {
     }
   }
 
+  @Test
   public void testListIndex() throws Exception {
     final Result result = executeCommand(CliStrings.LIST_INDEX + " --" + CliStrings.LIST_INDEX__STATS);
 
     assertNotNull(result);
-    LogWriterUtils.getLogWriter().info(toString(result));
+    getLogWriter().info(toString(result));
     assertEquals(Result.Status.OK, result.getStatus());
   }
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/69fd61f0/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/MemberCommandsDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/MemberCommandsDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/MemberCommandsDUnitTest.java
index 44cead8..d2bdcba 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/MemberCommandsDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/MemberCommandsDUnitTest.java
@@ -16,6 +16,21 @@
  */
 package com.gemstone.gemfire.management.internal.cli.commands;
 
+import static com.gemstone.gemfire.test.dunit.Assert.*;
+import static com.gemstone.gemfire.test.dunit.LogWriterUtils.*;
+import static com.gemstone.gemfire.test.dunit.NetworkUtils.*;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.Map;
+import java.util.Properties;
+import java.util.Set;
+
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
 import com.gemstone.gemfire.cache.Cache;
 import com.gemstone.gemfire.cache.CacheFactory;
 import com.gemstone.gemfire.cache.EvictionAction;
@@ -26,7 +41,6 @@ import com.gemstone.gemfire.cache.PartitionAttributesFactory;
 import com.gemstone.gemfire.cache.Region;
 import com.gemstone.gemfire.cache.RegionFactory;
 import com.gemstone.gemfire.cache.RegionShortcut;
-import com.gemstone.gemfire.cache30.CacheTestCase;
 import com.gemstone.gemfire.distributed.DistributedMember;
 import com.gemstone.gemfire.distributed.Locator;
 import com.gemstone.gemfire.distributed.internal.DistributionConfig;
@@ -39,24 +53,16 @@ import com.gemstone.gemfire.management.internal.cli.i18n.CliStrings;
 import com.gemstone.gemfire.management.internal.cli.remote.CommandProcessor;
 import com.gemstone.gemfire.management.internal.cli.util.CommandStringBuilder;
 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.cache.internal.JUnit4CacheTestCase;
+import com.gemstone.gemfire.test.junit.categories.DistributedTest;
 
-import java.io.File;
-import java.io.IOException;
-import java.util.Collections;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.Properties;
-import java.util.Set;
-
-/****
- */
+@Category(DistributedTest.class)
+public class MemberCommandsDUnitTest extends JUnit4CacheTestCase {
 
-public class MemberCommandsDUnitTest extends CacheTestCase {
   private static final long serialVersionUID = 1L;
+
   private static final Map<String, String> EMPTY_ENV = Collections.emptyMap();
   private static final String REGION1 = "region1";
   private static final String REGION2 = "region2";
@@ -67,10 +73,6 @@ public class MemberCommandsDUnitTest extends CacheTestCase {
   private static final String PR1 = "PartitionedRegion1";
   private static final String PR2 = "ParitionedRegion2";
 
-  public MemberCommandsDUnitTest(String name) {
-    super(name);
-  }
-
   @Override
   public final void postSetUp() throws Exception {
     // This test does not require an actual Gfsh connection to work, however when run as part of a suite, prior tests
@@ -179,7 +181,7 @@ public class MemberCommandsDUnitTest extends CacheTestCase {
     Properties props = new Properties();
 
     props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
-    props.setProperty(DistributionConfig.LOCATORS_NAME, NetworkUtils.getServerHostName(host) + "[" + locatorPort + "]");
+    props.setProperty(DistributionConfig.LOCATORS_NAME, getServerHostName(host) + "[" + locatorPort + "]");
     props.setProperty(DistributionConfig.LOG_LEVEL_NAME, "info");
     props.setProperty(DistributionConfig.STATISTIC_SAMPLING_ENABLED_NAME, "true");
     props.setProperty(DistributionConfig.ENABLE_TIME_STATISTICS_NAME, "true");
@@ -196,26 +198,28 @@ public class MemberCommandsDUnitTest extends CacheTestCase {
     final Cache cache = getCache();
   }
 
-  /***
+  /**
    * Tests the execution of "list member" command which should list out all the members in the DS
    *
    * @throws IOException
    * @throws ClassNotFoundException
    */
+  @Test
   public void testListMemberAll() throws IOException, ClassNotFoundException {
     setupSystem();
     CommandProcessor commandProcessor = new CommandProcessor();
     Result result = commandProcessor.createCommandStatement(CliStrings.LIST_MEMBER, EMPTY_ENV).process();
-    LogWriterUtils.getLogWriter().info("#SB" + getResultAsString(result));
+    getLogWriter().info("#SB" + getResultAsString(result));
     assertEquals(true, result.getStatus().equals(Status.OK));
   }
 
-  /****
+  /**
    * Tests the execution of "list member" command, when no cache is created
    *
    * @throws IOException
    * @throws ClassNotFoundException
    */
+  @Test
   public void testListMemberWithNoCache() throws IOException, ClassNotFoundException {
     final Host host = Host.getHost(0);
     final VM[] servers = {host.getVM(0), host.getVM(1)};
@@ -229,35 +233,37 @@ public class MemberCommandsDUnitTest extends CacheTestCase {
       CommandProcessor commandProcessor = new CommandProcessor();
       Result result = commandProcessor.createCommandStatement(CliStrings.LIST_MEMBER, EMPTY_ENV).process();
 
-      LogWriterUtils.getLogWriter().info("#SB" + getResultAsString(result));
+      getLogWriter().info("#SB" + getResultAsString(result));
       assertEquals(true, result.getStatus().equals(Status.ERROR));
     } finally {
       locator.stop(); // fix for bug 46562
     }
   }
 
-  /***
+  /**
    * Tests list member --group=G1
    *
    * @throws IOException
    * @throws ClassNotFoundException
    */
+  @Test
   public void testListMemberWithGroups() throws IOException, ClassNotFoundException {
     setupSystem();
     CommandProcessor commandProcessor = new CommandProcessor();
     CommandStringBuilder csb = new CommandStringBuilder(CliStrings.LIST_MEMBER);
     csb.addOption(CliStrings.LIST_MEMBER__GROUP, "G1");
     Result result = commandProcessor.createCommandStatement(csb.toString(), EMPTY_ENV).process();
-    LogWriterUtils.getLogWriter().info("#SB" + getResultAsString(result));
+    getLogWriter().info("#SB" + getResultAsString(result));
     assertEquals(true, result.getStatus().equals(Status.OK));
   }
 
-  /***
+  /**
    * Tests the "describe member" command for all the members in the DS
    *
    * @throws IOException
    * @throws ClassNotFoundException
    */
+  @Test
   public void testDescribeMember() throws IOException, ClassNotFoundException {
     setupSystem();
     CommandProcessor commandProcessor = new CommandProcessor();
@@ -271,7 +277,7 @@ public class MemberCommandsDUnitTest extends CacheTestCase {
       Result result = commandProcessor.createCommandStatement("describe member --name=" + member.getId(),
           EMPTY_ENV).process();
       assertEquals(true, result.getStatus().equals(Status.OK));
-      LogWriterUtils.getLogWriter().info("#SB" + getResultAsString(result));
+      getLogWriter().info("#SB" + getResultAsString(result));
       //assertEquals(true, result.getStatus().equals(Status.OK));
     }
   }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/69fd61f0/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/MiscellaneousCommandsDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/MiscellaneousCommandsDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/MiscellaneousCommandsDUnitTest.java
index d44a479..1c6f141 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/MiscellaneousCommandsDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/MiscellaneousCommandsDUnitTest.java
@@ -16,6 +16,20 @@
  */
 package com.gemstone.gemfire.management.internal.cli.commands;
 
+import static com.gemstone.gemfire.test.dunit.Assert.*;
+import static com.gemstone.gemfire.test.dunit.IgnoredException.*;
+import static com.gemstone.gemfire.test.dunit.Invoke.*;
+import static com.gemstone.gemfire.test.dunit.LogWriterUtils.*;
+import static com.gemstone.gemfire.test.dunit.Wait.*;
+
+import java.io.IOException;
+import java.util.List;
+import java.util.Properties;
+
+import org.junit.Ignore;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
 import com.gemstone.gemfire.cache.Cache;
 import com.gemstone.gemfire.cache.CacheClosedException;
 import com.gemstone.gemfire.cache.CacheFactory;
@@ -32,41 +46,29 @@ import com.gemstone.gemfire.management.internal.cli.i18n.CliStrings;
 import com.gemstone.gemfire.management.internal.cli.result.CommandResult;
 import com.gemstone.gemfire.management.internal.cli.result.CompositeResultData;
 import com.gemstone.gemfire.management.internal.cli.result.CompositeResultData.SectionResultData;
+import com.gemstone.gemfire.management.internal.cli.result.ResultBuilder;
+import com.gemstone.gemfire.management.internal.cli.result.ResultData;
+import com.gemstone.gemfire.management.internal.cli.result.TabularResultData;
 import com.gemstone.gemfire.test.dunit.Host;
-import com.gemstone.gemfire.test.dunit.IgnoredException;
-import com.gemstone.gemfire.test.dunit.Invoke;
-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.VM;
-import com.gemstone.gemfire.test.dunit.Wait;
 import com.gemstone.gemfire.test.dunit.WaitCriterion;
-import com.gemstone.gemfire.management.internal.cli.result.ResultBuilder;
-import com.gemstone.gemfire.management.internal.cli.result.ResultData;
-import com.gemstone.gemfire.management.internal.cli.result.TabularResultData;
-
-import org.junit.Ignore;
-
-import java.io.IOException;
-import java.util.List;
-import java.util.Properties;
+import com.gemstone.gemfire.test.junit.categories.DistributedTest;
+import com.gemstone.gemfire.test.junit.categories.FlakyTest;
 
 /**
  * Dunit class for testing gemfire function commands : GC, Shutdown
- *
  */
+@Category({ DistributedTest.class, FlakyTest.class }) // see GEODE-1034
 public class MiscellaneousCommandsDUnitTest extends CliCommandTestBase {
 
   private static final long serialVersionUID = 1L;
   private static String cachedLogLevel;
 
-  public MiscellaneousCommandsDUnitTest(String name) {
-    super(name);
-  }
-
   @Override
   protected final void preTearDownCliCommandTestBase() throws Exception {
-    Invoke.invokeInEveryVM(new SerializableRunnable("reset log level") {
+    invokeInEveryVM(new SerializableRunnable("reset log level") {
       public void run() {
         if (cachedLogLevel != null) {
           System.setProperty("gemfire.log-level", cachedLogLevel);
@@ -76,6 +78,7 @@ public class MiscellaneousCommandsDUnitTest extends CliCommandTestBase {
     });
   }
 
+  @Test
   public void testGCForGroup() {
     Properties localProps = new Properties();
     localProps.setProperty(DistributionConfig.NAME_NAME, "Manager");
@@ -86,7 +89,7 @@ public class MiscellaneousCommandsDUnitTest extends CliCommandTestBase {
     cmdResult.resetToFirstLine();
     if (cmdResult != null) {
       String cmdResultStr = commandResultToString(cmdResult);
-      LogWriterUtils.getLogWriter().info("testGCForGroup cmdResultStr=" + cmdResultStr + "; cmdResult=" + cmdResult);
+      getLogWriter().info("testGCForGroup cmdResultStr=" + cmdResultStr + "; cmdResult=" + cmdResult);
       assertEquals(Result.Status.OK, cmdResult.getStatus());
       if (cmdResult.getType().equals(ResultData.TYPE_TABULAR)) {
         TabularResultData table = (TabularResultData) cmdResult.getResultData();
@@ -101,10 +104,11 @@ public class MiscellaneousCommandsDUnitTest extends CliCommandTestBase {
   }
 
   public static String getMemberId() {
-    Cache cache = new GemfireDataCommandsDUnitTest("test").getCache();
+    Cache cache = new GemfireDataCommandsDUnitTest().getCache();
     return cache.getDistributedSystem().getDistributedMember().getId();
   }
 
+  @Test
   public void testGCForMemberID() {
     createDefaultSetup(null);
     final VM vm1 = Host.getHost(0).getVM(1);
@@ -114,7 +118,7 @@ public class MiscellaneousCommandsDUnitTest extends CliCommandTestBase {
     cmdResult.resetToFirstLine();
     if (cmdResult != null) {
       String cmdResultStr = commandResultToString(cmdResult);
-      LogWriterUtils.getLogWriter().info("testGCForMemberID cmdResultStr=" + cmdResultStr);
+      getLogWriter().info("testGCForMemberID cmdResultStr=" + cmdResultStr);
       assertEquals(Result.Status.OK, cmdResult.getStatus());
       if (cmdResult.getType().equals(ResultData.TYPE_TABULAR)) {
         TabularResultData table = (TabularResultData) cmdResult.getResultData();
@@ -128,6 +132,7 @@ public class MiscellaneousCommandsDUnitTest extends CliCommandTestBase {
     }
   }
 
+  @Test
   public void testShowLogDefault() throws IOException {
     Properties props = new Properties();
     try {
@@ -140,7 +145,7 @@ public class MiscellaneousCommandsDUnitTest extends CliCommandTestBase {
       if (cmdResult != null) {
         String log = commandResultToString(cmdResult);
         assertNotNull(log);
-        LogWriterUtils.getLogWriter().info("Show Log is" + log);
+        getLogWriter().info("Show Log is" + log);
         assertEquals(Result.Status.OK, cmdResult.getStatus());
       } else {
         fail("testShowLog failed as did not get CommandResult");
@@ -150,6 +155,7 @@ public class MiscellaneousCommandsDUnitTest extends CliCommandTestBase {
     }
   }
 
+  @Test
   public void testShowLogNumLines() {
     Properties props = new Properties();
     props.setProperty("log-file", "testShowLogNumLines.log");
@@ -162,7 +168,7 @@ public class MiscellaneousCommandsDUnitTest extends CliCommandTestBase {
       if (cmdResult != null) {
         String log = commandResultToString(cmdResult);
         assertNotNull(log);
-        LogWriterUtils.getLogWriter().info("Show Log is" + log);
+        getLogWriter().info("Show Log is" + log);
         assertEquals(Result.Status.OK, cmdResult.getStatus());
       } else {
         fail("testShowLog failed as did not get CommandResult");
@@ -172,6 +178,7 @@ public class MiscellaneousCommandsDUnitTest extends CliCommandTestBase {
     }
   }
 
+  @Test
   public void testGCForEntireCluster() {
     setupForGC();
     String command = "gc";
@@ -179,7 +186,7 @@ public class MiscellaneousCommandsDUnitTest extends CliCommandTestBase {
     cmdResult.resetToFirstLine();
     if (cmdResult != null) {
       String cmdResultStr = commandResultToString(cmdResult);
-      LogWriterUtils.getLogWriter().info("testGCForEntireCluster cmdResultStr=" + cmdResultStr + "; cmdResult=" + cmdResult);
+      getLogWriter().info("testGCForEntireCluster cmdResultStr=" + cmdResultStr + "; cmdResult=" + cmdResult);
       assertEquals(Result.Status.OK, cmdResult.getStatus());
       if (cmdResult.getType().equals(ResultData.TYPE_TABULAR)) {
         TabularResultData table = (TabularResultData) cmdResult.getResultData();
@@ -224,9 +231,10 @@ public class MiscellaneousCommandsDUnitTest extends CliCommandTestBase {
     });
   }
 
+  @Test
   public void testShutDownWithoutTimeout() {
 
-    IgnoredException.addIgnoredException("EntryDestroyedException");
+    addIgnoredException("EntryDestroyedException");
 
     setupForShutDown();
     ThreadUtils.sleep(2500);
@@ -236,7 +244,7 @@ public class MiscellaneousCommandsDUnitTest extends CliCommandTestBase {
 
     if (cmdResult != null) {
       String cmdResultStr = commandResultToString(cmdResult);
-      LogWriterUtils.getLogWriter().info("testShutDownWithoutTimeout cmdResultStr=" + cmdResultStr);
+      getLogWriter().info("testShutDownWithoutTimeout cmdResultStr=" + cmdResultStr);
     }
 
     verifyShutDown();
@@ -245,7 +253,7 @@ public class MiscellaneousCommandsDUnitTest extends CliCommandTestBase {
 
     // Need for the Gfsh HTTP enablement during shutdown to properly assess the
     // state of the connection.
-    Wait.waitForCriterion(new WaitCriterion() {
+    waitForCriterion(new WaitCriterion() {
       public boolean done() {
         return !defaultShell.isConnectedAndReady();
       }
@@ -259,18 +267,19 @@ public class MiscellaneousCommandsDUnitTest extends CliCommandTestBase {
   }
 
   @Ignore("Disabled for 52350")
-  public void DISABLED_testShutDownWithTimeout() {
+  @Test
+  public void testShutDownWithTimeout() {
     setupForShutDown();
     ThreadUtils.sleep(2500);
 
-    IgnoredException.addIgnoredException("EntryDestroyedException");
+    addIgnoredException("EntryDestroyedException");
 
     String command = "shutdown --time-out=15";
     CommandResult cmdResult = executeCommand(command);
 
     if (cmdResult != null) {
       String cmdResultStr = commandResultToString(cmdResult);
-      LogWriterUtils.getLogWriter().info("testShutDownWithTIMEOUT cmdResultStr=" + cmdResultStr);
+      getLogWriter().info("testShutDownWithTIMEOUT cmdResultStr=" + cmdResultStr);
     }
 
     verifyShutDown();
@@ -278,7 +287,7 @@ public class MiscellaneousCommandsDUnitTest extends CliCommandTestBase {
     final HeadlessGfsh defaultShell = getDefaultShell();
 
     // Need for the Gfsh HTTP enablement during shutdown to properly assess the state of the connection.
-    Wait.waitForCriterion(new WaitCriterion() {
+    waitForCriterion(new WaitCriterion() {
       public boolean done() {
         return !defaultShell.isConnectedAndReady();
       }
@@ -291,6 +300,7 @@ public class MiscellaneousCommandsDUnitTest extends CliCommandTestBase {
     assertFalse(defaultShell.isConnectedAndReady());
   }
 
+  @Test
   public void testShutDownForTIMEOUT() {
     setupForShutDown();
     ThreadUtils.sleep(2500);
@@ -307,7 +317,7 @@ public class MiscellaneousCommandsDUnitTest extends CliCommandTestBase {
 
     if (cmdResult != null) {
       String cmdResultStr = commandResultToString(cmdResult);
-      LogWriterUtils.getLogWriter().info("testShutDownForTIMEOUT cmdResultStr = " + cmdResultStr);
+      getLogWriter().info("testShutDownForTIMEOUT cmdResultStr = " + cmdResultStr);
       CommandResult result = (CommandResult) ResultBuilder.createInfoResult(CliStrings.SHUTDOWN_TIMEDOUT);
       String expectedResult = commandResultToString(result);
       assertEquals(expectedResult, cmdResultStr);
@@ -387,12 +397,13 @@ public class MiscellaneousCommandsDUnitTest extends CliCommandTestBase {
         return "Wait for gfsh to get disconnected from Manager.";
       }
     };
-    Wait.waitForCriterion(waitCriterion, 5000, 200, true);
+    waitForCriterion(waitCriterion, 5000, 200, true);
 
     assertTrue(Boolean.FALSE.equals(vm1.invoke(connectedChecker)));
     assertTrue(Boolean.FALSE.equals(vm0.invoke(connectedChecker)));
   }
 
+  @Test
   public void testChangeLogLevelForMembers() {
     final VM vm0 = Host.getHost(0).getVM(0);
     final VM vm1 = Host.getHost(0).getVM(1);
@@ -418,7 +429,7 @@ public class MiscellaneousCommandsDUnitTest extends CliCommandTestBase {
     String commandString = CliStrings.CHANGE_LOGLEVEL + " --" + CliStrings.CHANGE_LOGLEVEL__LOGLEVEL + "=finer" + " --" + CliStrings.CHANGE_LOGLEVEL__MEMBER + "=" + serverName1 + "," + serverName2;
 
     CommandResult commandResult = executeCommand(commandString);
-    LogWriterUtils.getLogWriter().info("testChangeLogLevel commandResult=" + commandResult);
+    getLogWriter().info("testChangeLogLevel commandResult=" + commandResult);
     assertTrue(Status.OK.equals(commandResult.getStatus()));
     CompositeResultData resultData = (CompositeResultData) commandResult.getResultData();
     SectionResultData section = resultData.retrieveSection("section");
@@ -437,6 +448,7 @@ public class MiscellaneousCommandsDUnitTest extends CliCommandTestBase {
     assertTrue(status.contains("true"));
   }
 
+  @Test
   public void testChangeLogLevelForGrps() {
     Properties localProps = new Properties();
     localProps.setProperty(DistributionConfig.NAME_NAME, "Manager");
@@ -474,7 +486,7 @@ public class MiscellaneousCommandsDUnitTest extends CliCommandTestBase {
     String commandString = CliStrings.CHANGE_LOGLEVEL + " --" + CliStrings.CHANGE_LOGLEVEL__LOGLEVEL + "=finer" + " --" + CliStrings.CHANGE_LOGLEVEL__GROUPS + "=" + grp1 + "," + grp2;
 
     CommandResult commandResult = executeCommand(commandString);
-    LogWriterUtils.getLogWriter().info("testChangeLogLevelForGrps commandResult=" + commandResult);
+    getLogWriter().info("testChangeLogLevelForGrps commandResult=" + commandResult);
 
     assertTrue(Status.OK.equals(commandResult.getStatus()));
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/69fd61f0/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/MiscellaneousCommandsExportLogsPart1DUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/MiscellaneousCommandsExportLogsPart1DUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/MiscellaneousCommandsExportLogsPart1DUnitTest.java
index b9178b6..60c5ded 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/MiscellaneousCommandsExportLogsPart1DUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/MiscellaneousCommandsExportLogsPart1DUnitTest.java
@@ -16,6 +16,17 @@
  */
 package com.gemstone.gemfire.management.internal.cli.commands;
 
+import static com.gemstone.gemfire.test.dunit.Assert.*;
+import static com.gemstone.gemfire.test.dunit.LogWriterUtils.*;
+
+import java.io.File;
+import java.io.IOException;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
 import com.gemstone.gemfire.cache.Cache;
 import com.gemstone.gemfire.cache.Region;
 import com.gemstone.gemfire.cache.RegionFactory;
@@ -25,30 +36,20 @@ import com.gemstone.gemfire.internal.logging.LogWriterImpl;
 import com.gemstone.gemfire.management.cli.Result;
 import com.gemstone.gemfire.management.internal.cli.result.CommandResult;
 import com.gemstone.gemfire.test.dunit.Host;
-import com.gemstone.gemfire.test.dunit.LogWriterUtils;
 import com.gemstone.gemfire.test.dunit.SerializableRunnable;
 import com.gemstone.gemfire.test.dunit.VM;
-
-import java.io.File;
-import java.io.IOException;
-import java.text.SimpleDateFormat;
-import java.util.Date;
+import com.gemstone.gemfire.test.junit.categories.DistributedTest;
 
 /**
  * Dunit class for testing gemfire function commands : export logs
- *
  */
-
+@Category(DistributedTest.class)
 public class MiscellaneousCommandsExportLogsPart1DUnitTest extends CliCommandTestBase {
 
   private static final long serialVersionUID = 1L;
 
-  public MiscellaneousCommandsExportLogsPart1DUnitTest(String name) {
-    super(name);
-  }
-
   public static String getMemberId() {
-    Cache cache = new GemfireDataCommandsDUnitTest("test").getCache();
+    Cache cache = new GemfireDataCommandsDUnitTest().getCache();
     return cache.getDistributedSystem().getDistributedMember().getId();
   }
 
@@ -77,6 +78,7 @@ public class MiscellaneousCommandsExportLogsPart1DUnitTest extends CliCommandTes
     return ("_" + formattedStartDate);
   }
 
+  @Test
   public void testExportLogs() throws IOException {
     Date startDate = new Date(System.currentTimeMillis() - 2 * 60 * 1000);
     SimpleDateFormat sf = new SimpleDateFormat("yyyy/MM/dd");
@@ -95,11 +97,11 @@ public class MiscellaneousCommandsExportLogsPart1DUnitTest extends CliCommandTes
     Result cmdResult = misc.exportLogsPreprocessing("./testExportLogs" + dir, null, null, logLevel, false, false, start,
         end, 1);
 
-    LogWriterUtils.getLogWriter().info("testExportLogs command result =" + cmdResult);
+    getLogWriter().info("testExportLogs command result =" + cmdResult);
 
     if (cmdResult != null) {
       String cmdStringRsult = commandResultToString((CommandResult) cmdResult);
-      LogWriterUtils.getLogWriter().info("testExportLogs cmdStringRsult=" + cmdStringRsult);
+      getLogWriter().info("testExportLogs cmdStringRsult=" + cmdStringRsult);
       assertEquals(Result.Status.OK, cmdResult.getStatus());
     } else {
       fail("testExportLogs failed as did not get CommandResult");
@@ -107,6 +109,7 @@ public class MiscellaneousCommandsExportLogsPart1DUnitTest extends CliCommandTes
     FileUtil.delete(new File("./testExportLogs" + dir));
   }
 
+  @Test
   public void testExportLogsForMerge() throws IOException {
     setupForExportLogs();
     Date startDate = new Date(System.currentTimeMillis() - 2 * 60 * 1000);
@@ -124,11 +127,11 @@ public class MiscellaneousCommandsExportLogsPart1DUnitTest extends CliCommandTes
 
     Result cmdResult = misc.exportLogsPreprocessing("./testExportLogsForMerge" + dir, null, null, logLevel, false, true,
         start, end, 1);
-    LogWriterUtils.getLogWriter().info("testExportLogsForMerge command=" + cmdResult);
+    getLogWriter().info("testExportLogsForMerge command=" + cmdResult);
 
     if (cmdResult != null) {
       String cmdStringRsult = commandResultToString((CommandResult) cmdResult);
-      LogWriterUtils.getLogWriter().info("testExportLogsForMerge cmdStringRsult=" + cmdStringRsult);
+      getLogWriter().info("testExportLogsForMerge cmdStringRsult=" + cmdStringRsult);
 
       assertEquals(Result.Status.OK, cmdResult.getStatus());
     } else {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/69fd61f0/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/MiscellaneousCommandsExportLogsPart2DUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/MiscellaneousCommandsExportLogsPart2DUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/MiscellaneousCommandsExportLogsPart2DUnitTest.java
index 678af5a..fbe156a 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/MiscellaneousCommandsExportLogsPart2DUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/MiscellaneousCommandsExportLogsPart2DUnitTest.java
@@ -16,6 +16,17 @@
  */
 package com.gemstone.gemfire.management.internal.cli.commands;
 
+import static com.gemstone.gemfire.test.dunit.Assert.*;
+import static com.gemstone.gemfire.test.dunit.LogWriterUtils.*;
+
+import java.io.File;
+import java.io.IOException;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
 import com.gemstone.gemfire.cache.Cache;
 import com.gemstone.gemfire.cache.Region;
 import com.gemstone.gemfire.cache.RegionFactory;
@@ -25,30 +36,20 @@ import com.gemstone.gemfire.internal.logging.LogWriterImpl;
 import com.gemstone.gemfire.management.cli.Result;
 import com.gemstone.gemfire.management.internal.cli.result.CommandResult;
 import com.gemstone.gemfire.test.dunit.Host;
-import com.gemstone.gemfire.test.dunit.LogWriterUtils;
 import com.gemstone.gemfire.test.dunit.SerializableRunnable;
 import com.gemstone.gemfire.test.dunit.VM;
-
-import java.io.File;
-import java.io.IOException;
-import java.text.SimpleDateFormat;
-import java.util.Date;
+import com.gemstone.gemfire.test.junit.categories.DistributedTest;
 
 /**
  * Dunit class for testing gemfire function commands : export logs
- *
  */
-
+@Category(DistributedTest.class)
 public class MiscellaneousCommandsExportLogsPart2DUnitTest extends CliCommandTestBase {
 
   private static final long serialVersionUID = 1L;
 
-  public MiscellaneousCommandsExportLogsPart2DUnitTest(String name) {
-    super(name);
-  }
-
   public static String getMemberId() {
-    Cache cache = new GemfireDataCommandsDUnitTest("test").getCache();
+    Cache cache = new GemfireDataCommandsDUnitTest().getCache();
     return cache.getDistributedSystem().getDistributedMember().getId();
   }
 
@@ -77,6 +78,7 @@ public class MiscellaneousCommandsExportLogsPart2DUnitTest extends CliCommandTes
     return ("_" + formattedStartDate);
   }
 
+  @Test
   public void testExportLogsForLogLevel() throws IOException {
     setupForExportLogs();
 
@@ -96,11 +98,11 @@ public class MiscellaneousCommandsExportLogsPart2DUnitTest extends CliCommandTes
     Result cmdResult = misc.exportLogsPreprocessing("./testExportLogsForLogLevel" + dir, null, null, logLevel, false,
         false, start, end, 1);
 
-    LogWriterUtils.getLogWriter().info("testExportLogsForLogLevel command=" + cmdResult);
+    getLogWriter().info("testExportLogsForLogLevel command=" + cmdResult);
 
     if (cmdResult != null) {
       String cmdStringRsult = commandResultToString((CommandResult) cmdResult);
-      LogWriterUtils.getLogWriter().info("testExportLogsForLogLevel cmdStringRsult=" + cmdStringRsult);
+      getLogWriter().info("testExportLogsForLogLevel cmdStringRsult=" + cmdStringRsult);
       assertEquals(Result.Status.OK, cmdResult.getStatus());
     } else {
       fail("testExportLogsForLogLevel failed as did not get CommandResult");
@@ -108,7 +110,7 @@ public class MiscellaneousCommandsExportLogsPart2DUnitTest extends CliCommandTes
     FileUtil.delete(new File("testExportLogsForLogLevel" + dir));
   }
 
-
+  @Test
   public void testExportLogsForLogLevelWithUPTOLOGLEVEL() throws IOException {
     setupForExportLogs();
 
@@ -128,11 +130,11 @@ public class MiscellaneousCommandsExportLogsPart2DUnitTest extends CliCommandTes
     Result cmdResult = misc.exportLogsPreprocessing("./testExportLogsForLogLevelWithUPTOLOGLEVEL" + dir, null, null,
         logLevel, true, false, start, end, 1);
 
-    LogWriterUtils.getLogWriter().info("testExportLogsForLogLevelWithUPTOLOGLEVEL command=" + cmdResult);
+    getLogWriter().info("testExportLogsForLogLevelWithUPTOLOGLEVEL command=" + cmdResult);
 
     if (cmdResult != null) {
       String cmdStringRsult = commandResultToString((CommandResult) cmdResult);
-      LogWriterUtils.getLogWriter().info("testExportLogsForLogLevelWithUPTOLOGLEVEL cmdStringRsult=" + cmdStringRsult);
+      getLogWriter().info("testExportLogsForLogLevelWithUPTOLOGLEVEL cmdStringRsult=" + cmdStringRsult);
 
       assertEquals(Result.Status.OK, cmdResult.getStatus());
     } else {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/69fd61f0/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/MiscellaneousCommandsExportLogsPart3DUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/MiscellaneousCommandsExportLogsPart3DUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/MiscellaneousCommandsExportLogsPart3DUnitTest.java
index 361a8d1..5c159e8 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/MiscellaneousCommandsExportLogsPart3DUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/MiscellaneousCommandsExportLogsPart3DUnitTest.java
@@ -16,6 +16,18 @@
  */
 package com.gemstone.gemfire.management.internal.cli.commands;
 
+import static com.gemstone.gemfire.test.dunit.Assert.*;
+import static com.gemstone.gemfire.test.dunit.LogWriterUtils.*;
+
+import java.io.File;
+import java.io.IOException;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+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.Region;
 import com.gemstone.gemfire.cache.RegionFactory;
@@ -26,31 +38,20 @@ import com.gemstone.gemfire.internal.logging.LogWriterImpl;
 import com.gemstone.gemfire.management.cli.Result;
 import com.gemstone.gemfire.management.internal.cli.result.CommandResult;
 import com.gemstone.gemfire.test.dunit.Host;
-import com.gemstone.gemfire.test.dunit.LogWriterUtils;
 import com.gemstone.gemfire.test.dunit.SerializableRunnable;
 import com.gemstone.gemfire.test.dunit.VM;
-
-import java.io.File;
-import java.io.IOException;
-import java.text.SimpleDateFormat;
-import java.util.Date;
-import java.util.Properties;
+import com.gemstone.gemfire.test.junit.categories.DistributedTest;
 
 /**
  * Dunit class for testing gemfire function commands : export logs
- *
  */
-
+@Category(DistributedTest.class)
 public class MiscellaneousCommandsExportLogsPart3DUnitTest extends CliCommandTestBase {
 
   private static final long serialVersionUID = 1L;
 
-  public MiscellaneousCommandsExportLogsPart3DUnitTest(String name) {
-    super(name);
-  }
-
   public static String getMemberId() {
-    Cache cache = new GemfireDataCommandsDUnitTest("test").getCache();
+    Cache cache = new GemfireDataCommandsDUnitTest().getCache();
     return cache.getDistributedSystem().getDistributedMember().getId();
   }
 
@@ -79,6 +80,7 @@ public class MiscellaneousCommandsExportLogsPart3DUnitTest extends CliCommandTes
     return ("_" + formattedStartDate);
   }
 
+  @Test
   public void testExportLogsForGroup() throws IOException {
     Properties localProps = new Properties();
     localProps.setProperty(DistributionConfig.NAME_NAME, "Manager");
@@ -103,10 +105,10 @@ public class MiscellaneousCommandsExportLogsPart3DUnitTest extends CliCommandTes
     Result cmdResult = misc.exportLogsPreprocessing("./testExportLogsForGroup" + dir, groups, null, logLevel, false,
         false, start, end, 1);
 
-    LogWriterUtils.getLogWriter().info("testExportLogsForGroup command result =" + cmdResult);
+    getLogWriter().info("testExportLogsForGroup command result =" + cmdResult);
     if (cmdResult != null) {
       String cmdStringRsult = commandResultToString((CommandResult) cmdResult);
-      LogWriterUtils.getLogWriter().info("testExportLogsForGroup cmdStringRsult=" + cmdStringRsult);
+      getLogWriter().info("testExportLogsForGroup cmdStringRsult=" + cmdStringRsult);
       assertEquals(Result.Status.OK, cmdResult.getStatus());
     } else {
       fail("testExportLogsForGroup failed as did not get CommandResult");
@@ -114,6 +116,7 @@ public class MiscellaneousCommandsExportLogsPart3DUnitTest extends CliCommandTes
     FileUtil.delete(new File("testExportLogsForGroup" + dir));
   }
 
+  @Test
   public void testExportLogsForMember() throws IOException {
     createDefaultSetup(null);
 
@@ -136,11 +139,11 @@ public class MiscellaneousCommandsExportLogsPart3DUnitTest extends CliCommandTes
     Result cmdResult = misc.exportLogsPreprocessing("./testExportLogsForMember" + dir, null, vm1MemberId, logLevel,
         false, false, start, end, 1);
 
-    LogWriterUtils.getLogWriter().info("testExportLogsForMember command result =" + cmdResult);
+    getLogWriter().info("testExportLogsForMember command result =" + cmdResult);
 
     if (cmdResult != null) {
       String cmdStringRsult = commandResultToString((CommandResult) cmdResult);
-      LogWriterUtils.getLogWriter().info("testExportLogsForMember cmdStringRsult=" + cmdStringRsult);
+      getLogWriter().info("testExportLogsForMember cmdStringRsult=" + cmdStringRsult);
       assertEquals(Result.Status.OK, cmdResult.getStatus());
     } else {
       fail("testExportLogsForMember failed as did not get CommandResult");

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/69fd61f0/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/MiscellaneousCommandsExportLogsPart4DUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/MiscellaneousCommandsExportLogsPart4DUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/MiscellaneousCommandsExportLogsPart4DUnitTest.java
index 360ba08..cf19659 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/MiscellaneousCommandsExportLogsPart4DUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/MiscellaneousCommandsExportLogsPart4DUnitTest.java
@@ -16,6 +16,17 @@
  */
 package com.gemstone.gemfire.management.internal.cli.commands;
 
+import static com.gemstone.gemfire.test.dunit.Assert.*;
+import static com.gemstone.gemfire.test.dunit.LogWriterUtils.*;
+
+import java.io.File;
+import java.io.IOException;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
 import com.gemstone.gemfire.cache.Cache;
 import com.gemstone.gemfire.cache.Region;
 import com.gemstone.gemfire.cache.RegionFactory;
@@ -25,29 +36,20 @@ import com.gemstone.gemfire.internal.logging.LogWriterImpl;
 import com.gemstone.gemfire.management.cli.Result;
 import com.gemstone.gemfire.management.internal.cli.result.CommandResult;
 import com.gemstone.gemfire.test.dunit.Host;
-import com.gemstone.gemfire.test.dunit.LogWriterUtils;
 import com.gemstone.gemfire.test.dunit.SerializableRunnable;
 import com.gemstone.gemfire.test.dunit.VM;
-
-import java.io.File;
-import java.io.IOException;
-import java.text.SimpleDateFormat;
-import java.util.Date;
+import com.gemstone.gemfire.test.junit.categories.DistributedTest;
 
 /**
  * Dunit class for testing gemfire function commands : export logs
- *
  */
+@Category(DistributedTest.class)
 public class MiscellaneousCommandsExportLogsPart4DUnitTest extends CliCommandTestBase {
 
   private static final long serialVersionUID = 1L;
 
-  public MiscellaneousCommandsExportLogsPart4DUnitTest(String name) {
-    super(name);
-  }
-
   public static String getMemberId() {
-    Cache cache = new GemfireDataCommandsDUnitTest("test").getCache();
+    Cache cache = new GemfireDataCommandsDUnitTest().getCache();
     return cache.getDistributedSystem().getDistributedMember().getId();
   }
 
@@ -76,6 +78,7 @@ public class MiscellaneousCommandsExportLogsPart4DUnitTest extends CliCommandTes
     return ("_" + formattedStartDate);
   }
 
+  @Test
   public void testExportLogsForTimeRange1() throws IOException {
     setupForExportLogs();
     Date startDate = new Date(System.currentTimeMillis() - 1 * 60 * 1000);
@@ -94,11 +97,11 @@ public class MiscellaneousCommandsExportLogsPart4DUnitTest extends CliCommandTes
     Result cmdResult = misc.exportLogsPreprocessing("./testExportLogsForTimeRange1" + dir, null, null, logLevel, false,
         false, start, end, 1);
 
-    LogWriterUtils.getLogWriter().info("testExportLogsForTimeRange1 command result =" + cmdResult);
+    getLogWriter().info("testExportLogsForTimeRange1 command result =" + cmdResult);
 
     if (cmdResult != null) {
       String cmdStringRsult = commandResultToString((CommandResult) cmdResult);
-      LogWriterUtils.getLogWriter().info("testExportLogsForTimeRange1 cmdStringRsult=" + cmdStringRsult);
+      getLogWriter().info("testExportLogsForTimeRange1 cmdStringRsult=" + cmdStringRsult);
       assertEquals(Result.Status.OK, cmdResult.getStatus());
     } else {
       fail("testExportLogsForTimeRange1 failed as did not get CommandResult");
@@ -106,6 +109,7 @@ public class MiscellaneousCommandsExportLogsPart4DUnitTest extends CliCommandTes
     FileUtil.delete(new File("testExportLogsForTimeRange1" + dir));
   }
 
+  @Test
   public void testExportLogsForTimeRangeForOnlyStartTime() throws IOException {
     setupForExportLogs();
     Date date = new Date();
@@ -122,11 +126,11 @@ public class MiscellaneousCommandsExportLogsPart4DUnitTest extends CliCommandTes
     Result cmdResult = misc.exportLogsPreprocessing("./testExportLogsForTimeRangeForOnlyStartTime" + dir, null, null,
         logLevel, false, false, s, null, 1);
 
-    LogWriterUtils.getLogWriter().info("testExportLogsForTimeRangeForOnlyStartTime command result =" + cmdResult);
+    getLogWriter().info("testExportLogsForTimeRangeForOnlyStartTime command result =" + cmdResult);
 
     if (cmdResult != null) {
       String cmdStringRsult = commandResultToString((CommandResult) cmdResult);
-      LogWriterUtils.getLogWriter().info("testExportLogsForTimeRangeForOnlyStartTime cmdStringRsult=" + cmdStringRsult);
+      getLogWriter().info("testExportLogsForTimeRangeForOnlyStartTime cmdStringRsult=" + cmdStringRsult);
       assertEquals(Result.Status.OK, cmdResult.getStatus());
     } else {
       fail("testExportLogsForTimeRangeForOnlyStartTime failed as did not get CommandResult");

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/69fd61f0/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/QueueCommandsDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/QueueCommandsDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/QueueCommandsDUnitTest.java
index c4d1f93..f61ff57 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/QueueCommandsDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/QueueCommandsDUnitTest.java
@@ -16,6 +16,21 @@
  */
 package com.gemstone.gemfire.management.internal.cli.commands;
 
+import static com.gemstone.gemfire.test.dunit.Assert.*;
+import static com.gemstone.gemfire.test.dunit.LogWriterUtils.*;
+import static com.gemstone.gemfire.test.dunit.Wait.*;
+
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.OutputStream;
+import java.util.List;
+import java.util.Properties;
+import java.util.concurrent.CopyOnWriteArrayList;
+
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
 import com.gemstone.gemfire.cache.Cache;
 import com.gemstone.gemfire.cache.asyncqueue.AsyncEventQueue;
 import com.gemstone.gemfire.distributed.Locator;
@@ -29,41 +44,30 @@ import com.gemstone.gemfire.management.cli.Result;
 import com.gemstone.gemfire.management.internal.cli.i18n.CliStrings;
 import com.gemstone.gemfire.management.internal.cli.result.CommandResult;
 import com.gemstone.gemfire.management.internal.cli.util.CommandStringBuilder;
-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.SerializableRunnable;
 import com.gemstone.gemfire.test.dunit.VM;
-import com.gemstone.gemfire.test.dunit.Wait;
 import com.gemstone.gemfire.test.dunit.WaitCriterion;
-
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.OutputStream;
-import java.util.List;
-import java.util.Properties;
-import java.util.concurrent.CopyOnWriteArrayList;
+import com.gemstone.gemfire.test.junit.categories.DistributedTest;
 
 /**
  * A distributed test suite of test cases for testing the queue commands that are part of Gfsh.
  *
  * @since 8.0
  */
+@Category(DistributedTest.class)
 public class QueueCommandsDUnitTest extends CliCommandTestBase {
+
   private static final long serialVersionUID = 1L;
 
   final List<String> filesToBeDeleted = new CopyOnWriteArrayList<String>();
 
-  public QueueCommandsDUnitTest(final String testName) {
-    super(testName);
-  }
-
   @Override
   public final void preSetUp() throws Exception {
     disconnectAllFromDS();
   }
 
+  @Test
   public void testAsyncEventQueue() throws IOException {
     final String queue1Name = "testAsyncEventQueue1";
     final String queue2Name = "testAsyncEventQueue2";
@@ -236,6 +240,7 @@ public class QueueCommandsDUnitTest extends CliCommandTestBase {
   /**
    * Asserts that creating async event queues correctly updates the shared configuration.
    */
+  @Test
   public void testCreateUpdatesSharedConfig() throws IOException {
     disconnectAllFromDS();
 
@@ -269,7 +274,7 @@ public class QueueCommandsDUnitTest extends CliCommandTestBase {
               return "Waiting for shared configuration to be started";
             }
           };
-          Wait.waitForCriterion(wc, 5000, 500, true);
+          waitForCriterion(wc, 5000, 500, true);
         } catch (IOException ioex) {
           fail("Unable to create a locator with a shared configuration");
         }
@@ -336,7 +341,7 @@ public class QueueCommandsDUnitTest extends CliCommandTestBase {
           xmlFromConfig = sharedConfig.getConfiguration(groupName).getCacheXmlContent();
           assertTrue(xmlFromConfig.contains(queueName));
         } catch (Exception e) {
-          Assert.fail("Error occurred in cluster configuration service", e);
+          fail("Error occurred in cluster configuration service", e);
         }
       }
     });
@@ -377,7 +382,7 @@ public class QueueCommandsDUnitTest extends CliCommandTestBase {
           executeCommand("undeploy --jar=" + fileToDelete.getName());
         }
       } catch (IOException e) {
-        LogWriterUtils.getLogWriter().error("Unable to delete file", e);
+        getLogWriter().error("Unable to delete file", e);
       }
     }
     this.filesToBeDeleted.clear();

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/69fd61f0/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/SharedConfigurationCommandsDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/SharedConfigurationCommandsDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/SharedConfigurationCommandsDUnitTest.java
index 5805853..d3e004b 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/SharedConfigurationCommandsDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/SharedConfigurationCommandsDUnitTest.java
@@ -16,6 +16,21 @@
  */
 package com.gemstone.gemfire.management.internal.cli.commands;
 
+import static com.gemstone.gemfire.test.dunit.Assert.*;
+import static com.gemstone.gemfire.test.dunit.LogWriterUtils.*;
+import static com.gemstone.gemfire.test.dunit.Wait.*;
+
+import java.io.File;
+import java.io.IOException;
+import java.net.InetAddress;
+import java.net.UnknownHostException;
+import java.util.Properties;
+import java.util.Set;
+
+import org.apache.commons.io.FileUtils;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
 import com.gemstone.gemfire.cache.Cache;
 import com.gemstone.gemfire.cache.CacheFactory;
 import com.gemstone.gemfire.distributed.DistributedMember;
@@ -34,42 +49,28 @@ import com.gemstone.gemfire.management.internal.cli.result.CommandResult;
 import com.gemstone.gemfire.management.internal.cli.util.CommandStringBuilder;
 import com.gemstone.gemfire.management.internal.configuration.SharedConfigurationDUnitTest;
 import com.gemstone.gemfire.management.internal.configuration.domain.Configuration;
-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.SerializableRunnable;
 import com.gemstone.gemfire.test.dunit.VM;
-import com.gemstone.gemfire.test.dunit.Wait;
 import com.gemstone.gemfire.test.dunit.WaitCriterion;
-
-import org.apache.commons.io.FileUtils;
-
-import java.io.File;
-import java.io.IOException;
-import java.net.InetAddress;
-import java.net.UnknownHostException;
-import java.util.Properties;
-import java.util.Set;
+import com.gemstone.gemfire.test.junit.categories.DistributedTest;
 
 /***
  * DUnit test to test export and import of shared configuration.
- *
  */
+@Category(DistributedTest.class)
+@SuppressWarnings("unchecked")
 public class SharedConfigurationCommandsDUnitTest extends CliCommandTestBase {
 
   private static final long serialVersionUID = 1L;
   private static final int TIMEOUT = 10000;
   private static final int INTERVAL = 500;
 
-  public SharedConfigurationCommandsDUnitTest(String name) {
-    super(name);
-  }
-
   File newDeployableJarFile = new File("DeployCommandsDUnit1.jar");
   private transient ClassBuilder classBuilder = new ClassBuilder();
 
-  @SuppressWarnings("unchecked")
+  @Test
   public void testExportImportSharedConfiguration() {
     disconnectAllFromDS();
 
@@ -134,7 +135,7 @@ public class SharedConfigurationCommandsDUnitTest extends CliCommandTestBase {
               return "Waiting for shared configuration to be started";
             }
           };
-          Wait.waitForCriterion(wc, TIMEOUT, INTERVAL, true);
+          waitForCriterion(wc, TIMEOUT, INTERVAL, true);
         } catch (IOException ioex) {
           fail("Unable to create a locator with a shared configuration");
         }
@@ -213,23 +214,23 @@ public class SharedConfigurationCommandsDUnitTest extends CliCommandTestBase {
     cmdResult = executeCommand(commandStringBuilder.getCommandString());
     String resultString = commandResultToString(cmdResult);
 
-    LogWriterUtils.getLogWriter().info("#SB Result\n");
-    LogWriterUtils.getLogWriter().info(resultString);
+    getLogWriter().info("#SB Result\n");
+    getLogWriter().info(resultString);
     assertEquals(true, cmdResult.getStatus().equals(Status.OK));
 
     commandStringBuilder = new CommandStringBuilder(CliStrings.STATUS_SHARED_CONFIG);
     cmdResult = executeCommand(commandStringBuilder.getCommandString());
     resultString = commandResultToString(cmdResult);
-    LogWriterUtils.getLogWriter().info("#SB Result\n");
-    LogWriterUtils.getLogWriter().info(resultString);
+    getLogWriter().info("#SB Result\n");
+    getLogWriter().info(resultString);
     assertEquals(Status.OK, cmdResult.getStatus());
 
     commandStringBuilder = new CommandStringBuilder(CliStrings.EXPORT_SHARED_CONFIG);
     commandStringBuilder.addOption(CliStrings.EXPORT_SHARED_CONFIG__FILE, sharedConfigZipFileName);
     cmdResult = executeCommand(commandStringBuilder.getCommandString());
     resultString = commandResultToString(cmdResult);
-    LogWriterUtils.getLogWriter().info("#SB Result\n");
-    LogWriterUtils.getLogWriter().info(resultString);
+    getLogWriter().info("#SB Result\n");
+    getLogWriter().info(resultString);
     assertEquals(Status.OK, cmdResult.getStatus());
 
     //Import into a running system should fail
@@ -300,7 +301,7 @@ public class SharedConfigurationCommandsDUnitTest extends CliCommandTestBase {
               return "Waiting for shared configuration to be started";
             }
           };
-          Wait.waitForCriterion(wc, 5000, 500, true);
+          waitForCriterion(wc, 5000, 500, true);
 
           SharedConfiguration sc = locator.getSharedConfiguration();
           assertNotNull(sc);
@@ -320,7 +321,7 @@ public class SharedConfigurationCommandsDUnitTest extends CliCommandTestBase {
         } catch (IOException ioex) {
           fail("Unable to create a locator with a shared configuration");
         } catch (Exception e) {
-          Assert.fail("Error occurred in cluster configuration service", e);
+          fail("Error occurred in cluster configuration service", e);
         }
       }
     });

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/69fd61f0/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ShellCommandsDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ShellCommandsDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ShellCommandsDUnitTest.java
index ee6fcac..f5aa506 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ShellCommandsDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ShellCommandsDUnitTest.java
@@ -16,6 +16,15 @@
  */
 package com.gemstone.gemfire.management.internal.cli.commands;
 
+import static com.gemstone.gemfire.test.dunit.Assert.*;
+import static com.gemstone.gemfire.test.dunit.LogWriterUtils.*;
+
+import java.io.File;
+import java.util.concurrent.TimeUnit;
+
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
 import com.gemstone.gemfire.distributed.AbstractLauncher.Status;
 import com.gemstone.gemfire.distributed.LocatorLauncher;
 import com.gemstone.gemfire.distributed.LocatorLauncher.LocatorState;
@@ -28,21 +37,13 @@ import com.gemstone.gemfire.management.internal.cli.i18n.CliStrings;
 import com.gemstone.gemfire.management.internal.cli.result.CommandResult;
 import com.gemstone.gemfire.management.internal.cli.shell.Gfsh;
 import com.gemstone.gemfire.management.internal.cli.util.CommandStringBuilder;
-import com.gemstone.gemfire.test.dunit.LogWriterUtils;
-
-import org.junit.Before;
-
-import java.io.File;
-import java.util.concurrent.TimeUnit;
+import com.gemstone.gemfire.test.junit.categories.DistributedTest;
 
+@Category(DistributedTest.class)
 public class ShellCommandsDUnitTest extends CliCommandTestBase {
 
   private static final long serialVersionUID = 1L;
 
-  public ShellCommandsDUnitTest(String name) {
-    super(name);
-  }
-
   @Override
   public final void postSetUp() throws Exception {
     getDefaultShell();
@@ -53,6 +54,7 @@ public class ShellCommandsDUnitTest extends CliCommandTestBase {
         "localhost[" + locatorPort + "]").toString());
   }
 
+  @Test
   public void testConnectToLocatorBecomesManager() {
     final int[] ports = AvailablePortHelper.getRandomAvailableTCPPorts(2);
 
@@ -98,13 +100,14 @@ public class ShellCommandsDUnitTest extends CliCommandTestBase {
     }
   }
 
+  @Test
   public void testEchoWithVariableAtEnd() {
     Gfsh gfshInstance = Gfsh.getCurrentInstance();
 
     if (gfshInstance == null) {
       fail("In testEcho command gfshInstance is null");
     }
-    LogWriterUtils.getLogWriter().info("Gsh " + gfshInstance);
+    getLogWriter().info("Gsh " + gfshInstance);
 
     gfshInstance.setEnvProperty("TESTSYS", "SYS_VALUE");
     printAllEnvs(gfshInstance);
@@ -122,6 +125,7 @@ public class ShellCommandsDUnitTest extends CliCommandTestBase {
     }
   }
 
+  @Test
   public void testEchoWithNoVariable() {
     Gfsh gfshInstance = Gfsh.getCurrentInstance();
 
@@ -146,6 +150,7 @@ public class ShellCommandsDUnitTest extends CliCommandTestBase {
     }
   }
 
+  @Test
   public void testEchoWithVariableAtStart() {
     Gfsh gfshInstance = Gfsh.getCurrentInstance();
 
@@ -169,6 +174,7 @@ public class ShellCommandsDUnitTest extends CliCommandTestBase {
     }
   }
 
+  @Test
   public void testEchoWithMultipleVariables() {
     Gfsh gfshInstance = Gfsh.getCurrentInstance();
 
@@ -192,6 +198,7 @@ public class ShellCommandsDUnitTest extends CliCommandTestBase {
     }
   }
 
+  @Test
   public void testEchoAllPropertyVariables() {
     Gfsh gfshInstance = Gfsh.getCurrentInstance();
 
@@ -210,6 +217,7 @@ public class ShellCommandsDUnitTest extends CliCommandTestBase {
     }
   }
 
+  @Test
   public void testEchoForSingleVariable() {
     Gfsh gfshInstance = Gfsh.getCurrentInstance();
 
@@ -234,6 +242,7 @@ public class ShellCommandsDUnitTest extends CliCommandTestBase {
     }
   }
 
+  @Test
   public void testEchoForSingleVariable2() {
     Gfsh gfshInstance = Gfsh.getCurrentInstance();
 
@@ -257,6 +266,7 @@ public class ShellCommandsDUnitTest extends CliCommandTestBase {
     }
   }
 
+  @Test
   public void testDebug() {
     Gfsh gfshInstance = Gfsh.getCurrentInstance();
 
@@ -278,6 +288,7 @@ public class ShellCommandsDUnitTest extends CliCommandTestBase {
 
   }
 
+  @Test
   public void testHistory() {
     Gfsh gfshInstance = Gfsh.getCurrentInstance();
 
@@ -297,6 +308,7 @@ public class ShellCommandsDUnitTest extends CliCommandTestBase {
     }
   }
 
+  @Test
   public void testHistoryWithFileName() {
     Gfsh gfshInstance = Gfsh.getCurrentInstance();
 
@@ -320,6 +332,7 @@ public class ShellCommandsDUnitTest extends CliCommandTestBase {
     }
   }
 
+  @Test
   public void testClearHistory() {
     Gfsh gfshInstance = Gfsh.getCurrentInstance();
 
@@ -334,9 +347,9 @@ public class ShellCommandsDUnitTest extends CliCommandTestBase {
 
     if (cmdResult != null) {
       assertEquals(Result.Status.OK, cmdResult.getStatus());
-      LogWriterUtils.getLogWriter().info("testClearHistory cmdResult=" + commandResultToString(cmdResult));
+      getLogWriter().info("testClearHistory cmdResult=" + commandResultToString(cmdResult));
       String resultString = commandResultToString(cmdResult);
-      LogWriterUtils.getLogWriter().info("testClearHistory resultString=" + resultString);
+      getLogWriter().info("testClearHistory resultString=" + resultString);
       assertTrue(resultString.contains(CliStrings.HISTORY__MSG__CLEARED_HISTORY));
       assertTrue(gfshInstance.getGfshHistory().size()<= 1);
     } else {
@@ -346,18 +359,18 @@ public class ShellCommandsDUnitTest extends CliCommandTestBase {
 
   private static void printCommandOutput(CommandResult cmdResult) {
     assertNotNull(cmdResult);
-    LogWriterUtils.getLogWriter().info("Command Output : ");
+    getLogWriter().info("Command Output : ");
     StringBuilder sb = new StringBuilder();
     cmdResult.resetToFirstLine();
     while (cmdResult.hasNextLine()) {
       sb.append(cmdResult.nextLine()).append(DataCommandRequest.NEW_LINE);
     }
-    LogWriterUtils.getLogWriter().info(sb.toString());
-    LogWriterUtils.getLogWriter().info("");
+    getLogWriter().info(sb.toString());
+    getLogWriter().info("");
   }
 
   private void printAllEnvs(Gfsh gfsh) {
-    LogWriterUtils.getLogWriter().info("printAllEnvs : " + StringUtils.objectToString(gfsh.getEnv(), false, 0));
+    getLogWriter().info("printAllEnvs : " + StringUtils.objectToString(gfsh.getEnv(), false, 0));
     /*
     getLogWriter().info("Gfsh printAllEnvs : " + HydraUtil.ObjectToString(getDefaultShell().getEnv()));    
     getLogWriter().info("gfsh " + gfsh + " default shell " + getDefaultShell());*/

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/69fd61f0/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ShowDeadlockDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ShowDeadlockDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ShowDeadlockDUnitTest.java
index 6bf05b3..df01f14 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ShowDeadlockDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ShowDeadlockDUnitTest.java
@@ -16,12 +16,29 @@
  */
 package com.gemstone.gemfire.management.internal.cli.commands;
 
+import static com.gemstone.gemfire.test.dunit.Assert.*;
+import static com.gemstone.gemfire.test.dunit.Invoke.*;
+import static com.gemstone.gemfire.test.dunit.LogWriterUtils.*;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Properties;
+import java.util.Set;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.locks.Lock;
+import java.util.concurrent.locks.ReentrantLock;
+
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
 import com.gemstone.gemfire.cache.Cache;
 import com.gemstone.gemfire.cache.execute.Function;
 import com.gemstone.gemfire.cache.execute.FunctionContext;
 import com.gemstone.gemfire.cache.execute.FunctionService;
 import com.gemstone.gemfire.cache.execute.ResultCollector;
-import com.gemstone.gemfire.cache30.CacheTestCase;
 import com.gemstone.gemfire.distributed.DistributedLockService;
 import com.gemstone.gemfire.distributed.internal.DistributionConfig;
 import com.gemstone.gemfire.distributed.internal.deadlock.GemFireDeadlockDetector;
@@ -32,34 +49,20 @@ import com.gemstone.gemfire.management.internal.cli.CliUtil;
 import com.gemstone.gemfire.management.internal.cli.i18n.CliStrings;
 import com.gemstone.gemfire.management.internal.cli.remote.CommandProcessor;
 import com.gemstone.gemfire.management.internal.cli.util.CommandStringBuilder;
-import com.gemstone.gemfire.test.dunit.Assert;
 import com.gemstone.gemfire.test.dunit.Host;
-import com.gemstone.gemfire.test.dunit.Invoke;
-import com.gemstone.gemfire.test.dunit.LogWriterUtils;
 import com.gemstone.gemfire.test.dunit.SerializableCallable;
 import com.gemstone.gemfire.test.dunit.SerializableRunnable;
 import com.gemstone.gemfire.test.dunit.VM;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.Collections;
-import java.util.HashSet;
-import java.util.Map;
-import java.util.Properties;
-import java.util.Set;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.locks.Lock;
-import java.util.concurrent.locks.ReentrantLock;
+import com.gemstone.gemfire.test.dunit.cache.internal.JUnit4CacheTestCase;
+import com.gemstone.gemfire.test.junit.categories.DistributedTest;
 
 /**
  * This DUnit tests uses same code as GemFireDeadlockDetectorDUnitTest and uses the command processor for executing the
  * "show deadlock" command
  */
-public class ShowDeadlockDUnitTest extends CacheTestCase {
+@Category(DistributedTest.class)
+public class ShowDeadlockDUnitTest extends JUnit4CacheTestCase {
 
-  /**
-   *
-   */
   private static final long serialVersionUID = 1L;
   private static final Set<Thread> stuckThreads = Collections.synchronizedSet(new HashSet<Thread>());
   private static final Map<String, String> EMPTY_ENV = Collections.emptyMap();
@@ -73,7 +76,7 @@ public class ShowDeadlockDUnitTest extends CacheTestCase {
 
   @Override
   public final void preTearDownCacheTestCase() throws Exception {
-    Invoke.invokeInEveryVM(new SerializableRunnable() {
+    invokeInEveryVM(new SerializableRunnable() {
       private static final long serialVersionUID = 1L;
 
       public void run() {
@@ -85,10 +88,7 @@ public class ShowDeadlockDUnitTest extends CacheTestCase {
     CliUtil.isGfshVM = true;
   }
 
-  public ShowDeadlockDUnitTest(String name) {
-    super(name);
-  }
-
+  @Test
   public void testNoDeadlock() throws ClassNotFoundException, IOException {
     Host host = Host.getHost(0);
     VM vm0 = host.getVM(0);
@@ -112,7 +112,7 @@ public class ShowDeadlockDUnitTest extends CacheTestCase {
 
     String deadLockOutputFromCommand = getResultAsString(result);
 
-    LogWriterUtils.getLogWriter().info("output = " + deadLockOutputFromCommand);
+    getLogWriter().info("output = " + deadLockOutputFromCommand);
     assertEquals(true, result.hasIncomingFiles());
     assertEquals(true, result.getStatus().equals(Status.OK));
     assertEquals(true, deadLockOutputFromCommand.startsWith(CliStrings.SHOW_DEADLOCK__NO__DEADLOCK));
@@ -126,7 +126,7 @@ public class ShowDeadlockDUnitTest extends CacheTestCase {
 
   private static final Lock lock = new ReentrantLock();
 
-
+  @Test
   public void testDistributedDeadlockWithFunction() throws InterruptedException, ClassNotFoundException, IOException {
     Host host = Host.getHost(0);
     VM vm0 = host.getVM(0);
@@ -148,7 +148,7 @@ public class ShowDeadlockDUnitTest extends CacheTestCase {
     Result result = commandProcessor.createCommandStatement(csb.toString(), EMPTY_ENV).process();
 
     String deadLockOutputFromCommand = getResultAsString(result);
-    LogWriterUtils.getLogWriter().info("Deadlock = " + deadLockOutputFromCommand);
+    getLogWriter().info("Deadlock = " + deadLockOutputFromCommand);
     result.saveIncomingFiles(null);
     assertEquals(true, deadLockOutputFromCommand.startsWith(CliStrings.SHOW_DEADLOCK__DEADLOCK__DETECTED));
     assertEquals(true, result.getStatus().equals(Status.OK));
@@ -185,7 +185,7 @@ public class ShowDeadlockDUnitTest extends CacheTestCase {
         try {
           Thread.sleep(1000);
         } catch (InterruptedException e) {
-          Assert.fail("interrupted", e);
+          fail("interrupted", e);
         }
         ResultCollector collector = FunctionService.onMember(basicGetSystem(), member).execute(new TestFunction());
         //wait the function to lock the lock on member.

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/69fd61f0/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ShowMetricsDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ShowMetricsDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ShowMetricsDUnitTest.java
index 90d0eed..c17f7e7 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ShowMetricsDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ShowMetricsDUnitTest.java
@@ -16,6 +16,19 @@
  */
 package com.gemstone.gemfire.management.internal.cli.commands;
 
+import static com.gemstone.gemfire.test.dunit.Assert.*;
+import static com.gemstone.gemfire.test.dunit.LogWriterUtils.*;
+import static com.gemstone.gemfire.test.dunit.Wait.*;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.Collections;
+import java.util.Properties;
+import javax.management.ObjectName;
+
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
 import com.gemstone.gemfire.cache.Cache;
 import com.gemstone.gemfire.cache.Region;
 import com.gemstone.gemfire.cache.RegionFactory;
@@ -36,30 +49,17 @@ import com.gemstone.gemfire.management.internal.cli.i18n.CliStrings;
 import com.gemstone.gemfire.management.internal.cli.remote.CommandProcessor;
 import com.gemstone.gemfire.management.internal.cli.result.CommandResult;
 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.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.junit.categories.DistributedTest;
 
-import javax.management.ObjectName;
-import java.io.File;
-import java.io.IOException;
-import java.util.Collections;
-import java.util.Properties;
-
-/****
- */
+@Category(DistributedTest.class)
 public class ShowMetricsDUnitTest extends CliCommandTestBase {
 
   private static final long serialVersionUID = 1L;
 
-  public ShowMetricsDUnitTest(String name) {
-    super(name);
-    // TODO Auto-generated constructor stub
-  }
-
   private void createLocalSetUp() {
     Properties localProps = new Properties();
     localProps.setProperty(DistributionConfig.NAME_NAME, "Controller");
@@ -70,9 +70,10 @@ public class ShowMetricsDUnitTest extends CliCommandTestBase {
     Region region2 = dataRegionFactory.create("REGION2");
   }
 
-  /*
+  /**
    * tests the default version of "show metrics"
    */
+  @Test
   public void testShowMetricsDefault() {
     createDefaultSetup(null);
     createLocalSetUp();
@@ -96,11 +97,11 @@ public class ShowMetricsDUnitTest extends CliCommandTestBase {
       @Override
       public Object call() throws Exception {
         WaitCriterion wc = createMBeanWaitCriterion(1, "", null, 0);
-        Wait.waitForCriterion(wc, 5000, 500, true);
+        waitForCriterion(wc, 5000, 500, true);
         CommandProcessor commandProcessor = new CommandProcessor();
         Result result = commandProcessor.createCommandStatement("show metrics", Collections.EMPTY_MAP).process();
         String resultStr = commandResultToString((CommandResult) result);
-        LogWriterUtils.getLogWriter().info(resultStr);
+        getLogWriter().info(resultStr);
         assertEquals(resultStr, true, result.getStatus().equals(Status.OK));
         return resultStr;
       }
@@ -112,8 +113,8 @@ public class ShowMetricsDUnitTest extends CliCommandTestBase {
 
     String managerResult = (String) managerResultObj;
 
-    LogWriterUtils.getLogWriter().info("#SB Manager");
-    LogWriterUtils.getLogWriter().info(managerResult);
+    getLogWriter().info("#SB Manager");
+    getLogWriter().info(managerResult);
   }
 
   public void systemSetUp() {
@@ -135,6 +136,7 @@ public class ShowMetricsDUnitTest extends CliCommandTestBase {
     });
   }
 
+  @Test
   public void testShowMetricsRegion() throws InterruptedException {
     systemSetUp();
     final String regionName = "REGION1";
@@ -143,7 +145,7 @@ public class ShowMetricsDUnitTest extends CliCommandTestBase {
       @Override
       public Object call() throws Exception {
         WaitCriterion wc = createMBeanWaitCriterion(2, regionName, null, 0);
-        Wait.waitForCriterion(wc, 5000, 500, true);
+        waitForCriterion(wc, 5000, 500, true);
         CommandProcessor commandProcessor = new CommandProcessor();
         Result result = commandProcessor.createCommandStatement("show metrics --region=REGION1",
             Collections.EMPTY_MAP).process();
@@ -159,8 +161,8 @@ public class ShowMetricsDUnitTest extends CliCommandTestBase {
 
     String managerResult = (String) managerResultObj;
 
-    LogWriterUtils.getLogWriter().info("#SB Manager");
-    LogWriterUtils.getLogWriter().info(managerResult);
+    getLogWriter().info("#SB Manager");
+    getLogWriter().info(managerResult);
   }
 
   /***
@@ -213,6 +215,7 @@ public class ShowMetricsDUnitTest extends CliCommandTestBase {
     return waitCriterion;
   }
 
+  @Test
   public void testShowMetricsMember() throws ClassNotFoundException, IOException, InterruptedException {
     systemSetUp();
     Cache cache = getCache();
@@ -230,9 +233,9 @@ public class ShowMetricsDUnitTest extends CliCommandTestBase {
       public Object call() throws Exception {
 
         WaitCriterion wc = createMBeanWaitCriterion(3, "", distributedMember, 0);
-        Wait.waitForCriterion(wc, 5000, 500, true);
+        waitForCriterion(wc, 5000, 500, true);
         wc = createMBeanWaitCriterion(5, "", distributedMember, cacheServerPort);
-        Wait.waitForCriterion(wc, 10000, 500, true);
+        waitForCriterion(wc, 10000, 500, true);
 
         final String command = CliStrings.SHOW_METRICS + " --" + CliStrings.SHOW_METRICS__MEMBER + "=" + distributedMember.getId() + " --" + CliStrings.SHOW_METRICS__CACHESERVER__PORT + "=" + cacheServerPort + " --" + CliStrings.SHOW_METRICS__FILE + "=" + exportFileName;
 
@@ -257,11 +260,12 @@ public class ShowMetricsDUnitTest extends CliCommandTestBase {
 
     String managerResult = (String) managerResultObj;
 
-    LogWriterUtils.getLogWriter().info("#SB Manager");
-    LogWriterUtils.getLogWriter().info(managerResult);
+    getLogWriter().info("#SB Manager");
+    getLogWriter().info(managerResult);
     cs.stop();
   }
 
+  @Test
   public void testShowMetricsRegionFromMember() throws ClassNotFoundException, IOException, InterruptedException {
     systemSetUp();
     Cache cache = getCache();
@@ -275,7 +279,7 @@ public class ShowMetricsDUnitTest extends CliCommandTestBase {
       public Object call() throws Exception {
 
         WaitCriterion wc = createMBeanWaitCriterion(4, regionName, distributedMember, 0);
-        Wait.waitForCriterion(wc, 5000, 500, true);
+        waitForCriterion(wc, 5000, 500, true);
         CommandProcessor commandProcessor = new CommandProcessor();
         Result result = commandProcessor.createCommandStatement(
             "show metrics --region=" + regionName + " --member=" + distributedMember.getName() + " --file=" + exportFileName,
@@ -298,10 +302,11 @@ public class ShowMetricsDUnitTest extends CliCommandTestBase {
 
     String managerResult = (String) managerResultObj;
 
-    LogWriterUtils.getLogWriter().info("#SB Manager");
-    LogWriterUtils.getLogWriter().info(managerResult);
+    getLogWriter().info("#SB Manager");
+    getLogWriter().info(managerResult);
   }
 
+  @Test
   public void testShowMetricsRegionFromMemberWithCategories() throws ClassNotFoundException, IOException, InterruptedException {
     systemSetUp();
     Cache cache = getCache();
@@ -315,7 +320,7 @@ public class ShowMetricsDUnitTest extends CliCommandTestBase {
       public Object call() throws Exception {
 
         WaitCriterion wc = createMBeanWaitCriterion(4, regionName, distributedMember, 0);
-        Wait.waitForCriterion(wc, 5000, 500, true);
+        waitForCriterion(wc, 5000, 500, true);
         CommandProcessor commandProcessor = new CommandProcessor();
         Result result = commandProcessor.createCommandStatement(
             "show metrics --region=" + regionName + " --member=" + distributedMember.getName() + " --file=" + exportFileName + " --categories=region,eviction",
@@ -338,7 +343,7 @@ public class ShowMetricsDUnitTest extends CliCommandTestBase {
 
     String managerResult = (String) managerResultObj;
 
-    LogWriterUtils.getLogWriter().info("#SB Manager");
-    LogWriterUtils.getLogWriter().info(managerResult);
+    getLogWriter().info("#SB Manager");
+    getLogWriter().info(managerResult);
   }
 }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/69fd61f0/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ShowStackTraceDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ShowStackTraceDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ShowStackTraceDUnitTest.java
index 9a72d36..6a14a40 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ShowStackTraceDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ShowStackTraceDUnitTest.java
@@ -16,32 +16,34 @@
  */
 package com.gemstone.gemfire.management.internal.cli.commands;
 
+import static com.gemstone.gemfire.test.dunit.Assert.*;
+import static com.gemstone.gemfire.test.dunit.LogWriterUtils.*;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.Properties;
+
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
 import com.gemstone.gemfire.distributed.internal.DistributionConfig;
 import com.gemstone.gemfire.management.cli.Result.Status;
 import com.gemstone.gemfire.management.internal.cli.i18n.CliStrings;
 import com.gemstone.gemfire.management.internal.cli.result.CommandResult;
 import com.gemstone.gemfire.management.internal.cli.util.CommandStringBuilder;
 import com.gemstone.gemfire.test.dunit.Host;
-import com.gemstone.gemfire.test.dunit.LogWriterUtils;
 import com.gemstone.gemfire.test.dunit.SerializableRunnable;
 import com.gemstone.gemfire.test.dunit.VM;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.Properties;
+import com.gemstone.gemfire.test.junit.categories.DistributedTest;
 
 /***
  * DUnit test for 'show stack-trace' command
- *
  */
+@Category(DistributedTest.class)
 public class ShowStackTraceDUnitTest extends CliCommandTestBase {
 
   private static final long serialVersionUID = 1L;
 
-  public ShowStackTraceDUnitTest(String name) {
-    super(name);
-  }
-
   private void createCache(Properties props) {
     getSystem(props);
     getCache();
@@ -84,6 +86,7 @@ public class ShowStackTraceDUnitTest extends CliCommandTestBase {
    * @throws ClassNotFoundException
    * @throws IOException
    */
+  @Test
   public void testExportStacktrace() throws ClassNotFoundException, IOException {
     setupSystem();
 
@@ -93,9 +96,9 @@ public class ShowStackTraceDUnitTest extends CliCommandTestBase {
     CommandStringBuilder csb = new CommandStringBuilder(CliStrings.EXPORT_STACKTRACE);
     csb.addOption(CliStrings.EXPORT_STACKTRACE__FILE, allStacktracesFile.getCanonicalPath());
     String commandString = csb.toString();
-    LogWriterUtils.getLogWriter().info("CommandString : " + commandString);
+    getLogWriter().info("CommandString : " + commandString);
     CommandResult commandResult = executeCommand(commandString);
-    LogWriterUtils.getLogWriter().info("Output : \n" + commandResultToString(commandResult));
+    getLogWriter().info("Output : \n" + commandResultToString(commandResult));
     assertTrue(commandResult.getStatus().equals(Status.OK));
 
     File mgrStacktraceFile = new File("managerStacktrace.txt");
@@ -105,9 +108,9 @@ public class ShowStackTraceDUnitTest extends CliCommandTestBase {
     csb.addOption(CliStrings.EXPORT_STACKTRACE__FILE, mgrStacktraceFile.getCanonicalPath());
     csb.addOption(CliStrings.EXPORT_STACKTRACE__MEMBER, "Manager");
     commandString = csb.toString();
-    LogWriterUtils.getLogWriter().info("CommandString : " + commandString);
+    getLogWriter().info("CommandString : " + commandString);
     commandResult = executeCommand(commandString);
-    LogWriterUtils.getLogWriter().info("Output : \n" + commandResultToString(commandResult));
+    getLogWriter().info("Output : \n" + commandResultToString(commandResult));
     assertTrue(commandResult.getStatus().equals(Status.OK));
 
     File serverStacktraceFile = new File("serverStacktrace.txt");
@@ -117,9 +120,9 @@ public class ShowStackTraceDUnitTest extends CliCommandTestBase {
     csb.addOption(CliStrings.EXPORT_STACKTRACE__FILE, serverStacktraceFile.getCanonicalPath());
     csb.addOption(CliStrings.EXPORT_STACKTRACE__MEMBER, "Server");
     commandString = csb.toString();
-    LogWriterUtils.getLogWriter().info("CommandString : " + commandString);
+    getLogWriter().info("CommandString : " + commandString);
     commandResult = executeCommand(commandString);
-    LogWriterUtils.getLogWriter().info("Output : \n" + commandResultToString(commandResult));
+    getLogWriter().info("Output : \n" + commandResultToString(commandResult));
     assertTrue(commandResult.getStatus().equals(Status.OK));
 
     File groupStacktraceFile = new File("groupstacktrace.txt");
@@ -129,9 +132,9 @@ public class ShowStackTraceDUnitTest extends CliCommandTestBase {
     csb.addOption(CliStrings.EXPORT_STACKTRACE__FILE, groupStacktraceFile.getCanonicalPath());
     csb.addOption(CliStrings.EXPORT_STACKTRACE__GROUP, "G2");
     commandString = csb.toString();
-    LogWriterUtils.getLogWriter().info("CommandString : " + commandString);
+    getLogWriter().info("CommandString : " + commandString);
     commandResult = executeCommand(commandString);
-    LogWriterUtils.getLogWriter().info("Output : \n" + commandResultToString(commandResult));
+    getLogWriter().info("Output : \n" + commandResultToString(commandResult));
     assertTrue(commandResult.getStatus().equals(Status.OK));
 
     File wrongStackTraceFile = new File("wrongStackTrace.txt");
@@ -141,9 +144,9 @@ public class ShowStackTraceDUnitTest extends CliCommandTestBase {
     csb.addOption(CliStrings.EXPORT_STACKTRACE__FILE, wrongStackTraceFile.getCanonicalPath());
     csb.addOption(CliStrings.EXPORT_STACKTRACE__MEMBER, "WrongMember");
     commandString = csb.toString();
-    LogWriterUtils.getLogWriter().info("CommandString : " + commandString);
+    getLogWriter().info("CommandString : " + commandString);
     commandResult = executeCommand(commandString);
-    LogWriterUtils.getLogWriter().info("Output : \n" + commandResultToString(commandResult));
+    getLogWriter().info("Output : \n" + commandResultToString(commandResult));
     assertFalse(commandResult.getStatus().equals(Status.OK));
   }
 }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/69fd61f0/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/UserCommandsDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/UserCommandsDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/UserCommandsDUnitTest.java
index 97a9305..3b4db25 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/UserCommandsDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/UserCommandsDUnitTest.java
@@ -16,6 +16,16 @@
  */
 package com.gemstone.gemfire.management.internal.cli.commands;
 
+import static com.gemstone.gemfire.test.dunit.Assert.*;
+
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.util.Properties;
+
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
 import com.gemstone.gemfire.distributed.internal.DistributionConfig;
 import com.gemstone.gemfire.internal.ClassBuilder;
 import com.gemstone.gemfire.internal.ClassPathLoader;
@@ -25,20 +35,16 @@ import com.gemstone.gemfire.management.internal.cli.CommandManager;
 import com.gemstone.gemfire.management.internal.cli.result.CommandResult;
 import com.gemstone.gemfire.test.dunit.Host;
 import com.gemstone.gemfire.test.dunit.SerializableRunnable;
-
-import org.junit.Test;
-
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.util.Properties;
+import com.gemstone.gemfire.test.junit.categories.DistributedTest;
 
 /**
  * Unit tests for configuring user commands.
  *
  * @since 8.0
  */
+@Category(DistributedTest.class)
 public class UserCommandsDUnitTest extends CliCommandTestBase {
+
   private static final long serialVersionUID = 1L;
   final File jarDirectory = new File(
       (new File(ClassPathLoader.class.getProtectionDomain().getCodeSource().getLocation().getPath())).getParent(),
@@ -46,10 +52,6 @@ public class UserCommandsDUnitTest extends CliCommandTestBase {
   final File jarFile = new File(this.jarDirectory, "UserCommandsDUnit.jar");
   boolean deleteJarDirectory = false;
 
-  public UserCommandsDUnitTest(String name) throws Exception {
-    super(name);
-  }
-
   @Override
   public final void postSetUp() throws Exception {
     createUserCommandJarFile();



Mime
View raw message