geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jinmeil...@apache.org
Subject [08/18] incubator-geode git commit: Add SecurityTest and FlakyTest. Convert CLI tests to JUnit 4.
Date Tue, 12 Apr 2016 21:16:33 GMT
Add SecurityTest and FlakyTest. Convert CLI tests to JUnit 4.


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/69fd61f0
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/69fd61f0
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/69fd61f0

Branch: refs/heads/feature/GEODE-17-2
Commit: 69fd61f09d21257774ebd7ec4dfa482291102d46
Parents: 513c72f
Author: Kirk Lund <klund@apache.org>
Authored: Tue Apr 5 10:31:55 2016 -0700
Committer: Kirk Lund <klund@apache.org>
Committed: Tue Apr 5 10:31:55 2016 -0700

----------------------------------------------------------------------
 .../LauncherLifecycleCommandsDUnitTest.java     |  90 +--
 .../SharedConfigurationEndToEndDUnitTest.java   |  18 +-
 .../gemfire/internal/process/ProcessUtils.java  |   9 +-
 .../BlockingProcessStreamReaderJUnitTest.java   |  16 -
 ...NonBlockingProcessStreamReaderJUnitTest.java |  24 -
 .../AbstractCommandsSupportJUnitTest.java       |  16 +-
 .../cli/commands/CliCommandTestBase.java        |  57 +-
 .../cli/commands/ConfigCommandsDUnitTest.java   |  85 +--
 ...eateAlterDestroyRegionCommandsDUnitTest.java | 121 ++--
 .../cli/commands/DeployCommandsDUnitTest.java   |  33 +-
 .../commands/DiskStoreCommandsDUnitTest.java    |  83 +--
 .../commands/DiskStoreCommandsJUnitTest.java    |  19 +-
 .../cli/commands/FunctionCommandsDUnitTest.java |  97 ++--
 .../commands/GemfireDataCommandsDUnitTest.java  | 267 +++++----
 ...WithCacheLoaderDuringCacheMissDUnitTest.java |  20 +-
 .../HTTPServiceSSLSupportJUnitTest.java         |  12 +-
 .../cli/commands/IndexCommandsDUnitTest.java    |  31 +-
 .../cli/commands/IndexCommandsJUnitTest.java    |  18 +-
 ...stAndDescribeDiskStoreCommandsDUnitTest.java |  23 +-
 .../ListAndDescribeRegionDUnitTest.java         |  50 +-
 .../cli/commands/ListIndexCommandDUnitTest.java |  29 +-
 .../cli/commands/MemberCommandsDUnitTest.java   |  60 +-
 .../MiscellaneousCommandsDUnitTest.java         |  84 +--
 ...laneousCommandsExportLogsPart1DUnitTest.java |  37 +-
 ...laneousCommandsExportLogsPart2DUnitTest.java |  38 +-
 ...laneousCommandsExportLogsPart3DUnitTest.java |  39 +-
 ...laneousCommandsExportLogsPart4DUnitTest.java |  36 +-
 .../cli/commands/QueueCommandsDUnitTest.java    |  41 +-
 .../SharedConfigurationCommandsDUnitTest.java   |  55 +-
 .../cli/commands/ShellCommandsDUnitTest.java    |  47 +-
 .../cli/commands/ShowDeadlockDUnitTest.java     |  56 +-
 .../cli/commands/ShowMetricsDUnitTest.java      |  71 +--
 .../cli/commands/ShowStackTraceDUnitTest.java   |  43 +-
 .../cli/commands/UserCommandsDUnitTest.java     |  24 +-
 .../security/ClientAuthenticationDUnitTest.java |   6 +-
 .../ClientAuthenticationPart2DUnitTest.java     |   6 +-
 .../security/ClientAuthenticationTestCase.java  |   3 +
 .../security/ClientAuthorizationDUnitTest.java  |  10 +-
 .../security/ClientAuthorizationTestCase.java   |   2 +-
 .../security/ClientMultiUserAuthzDUnitTest.java |  10 +-
 .../DeltaClientAuthorizationDUnitTest.java      |  10 +-
 .../DeltaClientPostAuthorizationDUnitTest.java  |   8 +-
 .../security/GemFireSecurityExceptionTest.java  |   6 +-
 .../security/NotAuthorizedExceptionTest.java    |   6 +-
 .../security/P2PAuthenticationDUnitTest.java    |  10 +-
 .../gemfire/security/SecurityTestUtils.java     |  13 +-
 .../generator/AuthzCredentialGenerator.java     |  15 +-
 .../security/generator/CredentialGenerator.java |   3 +-
 .../generator/DummyCredentialGenerator.java     |   6 +-
 .../generator/LdapUserCredentialGenerator.java  |  15 +-
 .../generator/PKCSCredentialGenerator.java      |   8 +-
 .../generator/SSLCredentialGenerator.java       |   9 +-
 .../UserPasswordWithExtraPropsAuthInit.java     |   6 +-
 .../generator/XmlAuthzCredentialGenerator.java  |  10 +-
 .../security/templates/DummyAuthorization.java  |   8 +-
 .../templates/LdapUserAuthenticator.java        |   3 +-
 .../security/templates/PKCSAuthInit.java        |   3 +-
 .../security/templates/PKCSAuthenticator.java   |   3 +-
 .../security/templates/PKCSPrincipalTest.java   |   9 +-
 .../templates/UserPasswordAuthInit.java         |   4 +-
 .../templates/UsernamePrincipalTest.java        |   9 +-
 .../security/templates/XmlAuthorization.java    |  19 +-
 .../security/templates/XmlErrorHandler.java     |   5 +-
 .../gemfire/test/dunit/AsyncInvocation.java     | 426 ++++++++++----
 .../gemfire/test/dunit/DistributedTestCase.java |   8 +-
 .../test/dunit/DistributedTestUtils.java        |   2 +-
 .../gemfire/test/dunit/ThreadUtils.java         |  13 +-
 .../com/gemstone/gemfire/test/dunit/VM.java     | 562 +++++++++----------
 .../com/gemstone/gemfire/test/dunit/Wait.java   |   2 +-
 .../cache/internal/JUnit4CacheTestCase.java     |   4 +-
 .../internal/JUnit3DistributedTestCase.java     |   9 +-
 .../internal/JUnit4DistributedTestCase.java     |  15 +-
 .../internal/tests/JUnit3BasicDUnitTest.java    | 189 -------
 .../JUnit3GetDefaultDiskStoreNameDUnitTest.java |  66 ---
 .../tests/JUnit3GetTestMethodNameDUnitTest.java |  53 --
 .../dunit/internal/tests/JUnit3VMDUnitTest.java | 192 -------
 .../internal/tests/JUnit4BasicDUnitTest.java    | 202 -------
 .../JUnit4GetDefaultDiskStoreNameDUnitTest.java |  65 ---
 .../tests/JUnit4GetTestMethodNameDUnitTest.java |  52 --
 .../dunit/internal/tests/JUnit4VMDUnitTest.java | 200 -------
 .../DistributedRestoreSystemProperties.java     |   3 +-
 .../gemfire/test/dunit/rules/RemoteInvoker.java |   3 +-
 .../gemfire/test/dunit/standalone/ChildVM.java  |   5 +-
 .../test/dunit/standalone/DUnitLauncher.java    |  10 +-
 .../test/dunit/standalone/RemoteDUnitVM.java    |   5 +-
 .../test/dunit/standalone/RemoteDUnitVMIF.java  |   4 +-
 .../test/dunit/tests/BasicDUnitTest.java        | 222 ++++----
 .../test/dunit/tests/JUnit4BasicDUnitTest.java  | 234 ++++++++
 .../JUnit4GetDefaultDiskStoreNameDUnitTest.java |  66 +++
 .../tests/JUnit4GetTestMethodNameDUnitTest.java |  53 ++
 ...ingGetPropertiesDisconnectsAllDUnitTest.java |  57 ++
 .../test/dunit/tests/JUnit4VMDUnitTest.java     | 201 +++++++
 .../cli/commands/ClientCommandsDUnitTest.java   | 199 +++----
 .../DurableClientCommandsDUnitTest.java         |  53 +-
 .../ClientAuthorizationTwoDUnitTest.java        |   8 +-
 .../security/ClientAuthzObjectModDUnitTest.java |   8 +-
 .../ClientCQPostAuthorizationDUnitTest.java     |   8 +-
 .../ClientPostAuthorizationDUnitTest.java       |  14 +-
 .../gemfire/security/MultiUserAPIDUnitTest.java |   8 +-
 .../MultiUserDurableCQAuthzDUnitTest.java       |   8 +-
 .../test/junit/categories/FlakyTest.java        |  24 +
 .../test/junit/categories/SecurityTest.java     |  23 +
 .../test/junit/categories/CategoryOne.java      |  20 +
 .../test/junit/categories/CategoryTest.java     | 169 ++++++
 .../test/junit/categories/CategoryTwo.java      |  20 +
 .../wan/wancommand/WANCommandTestBase.java      |  35 +-
 ...anCommandCreateGatewayReceiverDUnitTest.java |  45 +-
 .../WanCommandCreateGatewaySenderDUnitTest.java |  45 +-
 ...WanCommandGatewayReceiverStartDUnitTest.java |  39 +-
 .../WanCommandGatewayReceiverStopDUnitTest.java |  37 +-
 .../WanCommandGatewaySenderStartDUnitTest.java  |  44 +-
 .../WanCommandGatewaySenderStopDUnitTest.java   |  39 +-
 .../wan/wancommand/WanCommandListDUnitTest.java |  52 +-
 .../WanCommandPauseResumeDUnitTest.java         | 138 ++---
 .../wancommand/WanCommandStatusDUnitTest.java   |  79 +--
 .../ClusterConfigurationDUnitTest.java          |  64 ++-
 116 files changed, 3161 insertions(+), 2915 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/69fd61f0/geode-assembly/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/LauncherLifecycleCommandsDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-assembly/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/LauncherLifecycleCommandsDUnitTest.java b/geode-assembly/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/LauncherLifecycleCommandsDUnitTest.java
index 2344155..4553140 100644
--- a/geode-assembly/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/LauncherLifecycleCommandsDUnitTest.java
+++ b/geode-assembly/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/LauncherLifecycleCommandsDUnitTest.java
@@ -16,8 +16,43 @@
  */
 package com.gemstone.gemfire.management.internal.cli.commands;
 
+import static com.gemstone.gemfire.test.dunit.Assert.*;
 import static com.gemstone.gemfire.test.dunit.Wait.*;
 
+import java.io.BufferedReader;
+import java.io.BufferedWriter;
+import java.io.File;
+import java.io.FileFilter;
+import java.io.FileOutputStream;
+import java.io.FileReader;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.io.OutputStreamWriter;
+import java.lang.management.ManagementFactory;
+import java.net.InetAddress;
+import java.nio.charset.Charset;
+import java.text.DateFormat;
+import java.text.MessageFormat;
+import java.text.SimpleDateFormat;
+import java.util.Calendar;
+import java.util.Queue;
+import java.util.Set;
+import java.util.concurrent.ConcurrentLinkedDeque;
+import java.util.concurrent.TimeUnit;
+import javax.management.MBeanServerConnection;
+import javax.management.ObjectName;
+import javax.management.Query;
+import javax.management.QueryExp;
+import javax.management.remote.JMXConnector;
+import javax.management.remote.JMXConnectorFactory;
+import javax.management.remote.JMXServiceURL;
+
+import org.junit.FixMethodOrder;
+import org.junit.Ignore;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+import org.junit.runners.MethodSorters;
+
 import com.gemstone.gemfire.cache.Region;
 import com.gemstone.gemfire.cache.client.ClientCache;
 import com.gemstone.gemfire.cache.client.ClientCacheFactory;
@@ -46,38 +81,7 @@ 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.WaitCriterion;
-
-import org.junit.FixMethodOrder;
-import org.junit.Ignore;
-import org.junit.runners.MethodSorters;
-
-import javax.management.MBeanServerConnection;
-import javax.management.ObjectName;
-import javax.management.Query;
-import javax.management.QueryExp;
-import javax.management.remote.JMXConnector;
-import javax.management.remote.JMXConnectorFactory;
-import javax.management.remote.JMXServiceURL;
-import java.io.BufferedReader;
-import java.io.BufferedWriter;
-import java.io.File;
-import java.io.FileFilter;
-import java.io.FileOutputStream;
-import java.io.FileReader;
-import java.io.FileWriter;
-import java.io.IOException;
-import java.io.OutputStreamWriter;
-import java.lang.management.ManagementFactory;
-import java.net.InetAddress;
-import java.nio.charset.Charset;
-import java.text.DateFormat;
-import java.text.MessageFormat;
-import java.text.SimpleDateFormat;
-import java.util.Calendar;
-import java.util.Queue;
-import java.util.Set;
-import java.util.concurrent.ConcurrentLinkedDeque;
-import java.util.concurrent.TimeUnit;
+import com.gemstone.gemfire.test.junit.categories.DistributedTest;
 
 /**
  * The LauncherLifecycleCommandsDUnitTest class is a test suite of integration tests testing the contract and
@@ -95,6 +99,7 @@ import java.util.concurrent.TimeUnit;
  * @see com.gemstone.gemfire.management.internal.cli.util.CommandStringBuilder
  * @since 7.0
  */
+@Category(DistributedTest.class)
 @FixMethodOrder(MethodSorters.NAME_ASCENDING)
 public class LauncherLifecycleCommandsDUnitTest extends CliCommandTestBase {
 
@@ -104,10 +109,6 @@ public class LauncherLifecycleCommandsDUnitTest extends CliCommandTestBase {
 
   private final Queue<Integer> processIds = new ConcurrentLinkedDeque<>();
 
-  public LauncherLifecycleCommandsDUnitTest(final String testName) {
-    super(testName);
-  }
-
   protected static String getMemberId(final int jmxManagerPort, final String memberName) throws Exception {
     return getMemberId(InetAddress.getLocalHost().getHostName(), jmxManagerPort, memberName);
   }
@@ -296,6 +297,7 @@ public class LauncherLifecycleCommandsDUnitTest extends CliCommandTestBase {
     }
   }
 
+  @Test
   public void test000StartLocatorCapturesOutputOnError() throws IOException {
     final int locatorPort = AvailablePortHelper.getRandomAvailableTCPPort();
 
@@ -356,6 +358,7 @@ public class LauncherLifecycleCommandsDUnitTest extends CliCommandTestBase {
     return pid;
   }
 
+  @Test
   public void test001StartLocatorFailsFastOnMissingGemFirePropertiesFile() {
     String gemfirePropertiesPathname = "/path/to/missing/gemfire.properties";
 
@@ -381,6 +384,7 @@ public class LauncherLifecycleCommandsDUnitTest extends CliCommandTestBase {
             gemfirePropertiesPathname)));
   }
 
+  @Test
   public void test002StartLocatorFailsFastOnMissingGemFireSecurityPropertiesFile() {
     String gemfireSecurityPropertiesPathname = "/path/to/missing/gemfire-security.properties";
 
@@ -406,6 +410,7 @@ public class LauncherLifecycleCommandsDUnitTest extends CliCommandTestBase {
             gemfireSecurityPropertiesPathname)));
   }
 
+  @Test
   public void test003StartServerFailsFastOnMissingCacheXmlFile() {
     String cacheXmlPathname = "/path/to/missing/cache.xml";
 
@@ -425,6 +430,7 @@ public class LauncherLifecycleCommandsDUnitTest extends CliCommandTestBase {
         resultString.contains(MessageFormat.format(CliStrings.CACHE_XML_NOT_FOUND_MESSAGE, cacheXmlPathname)));
   }
 
+  @Test
   public void test004StartServerFailsFastOnMissingGemFirePropertiesFile() {
     String gemfirePropertiesFile = "/path/to/missing/gemfire.properties";
 
@@ -445,6 +451,7 @@ public class LauncherLifecycleCommandsDUnitTest extends CliCommandTestBase {
             gemfirePropertiesFile)));
   }
 
+  @Test
   public void test005StartServerFailsFastOnMissingGemFireSecurityPropertiesFile() {
     String gemfireSecuritiesPropertiesFile = "/path/to/missing/gemfire-securities.properties";
 
@@ -465,6 +472,7 @@ public class LauncherLifecycleCommandsDUnitTest extends CliCommandTestBase {
             gemfireSecuritiesPropertiesFile)));
   }
 
+  @Test
   public void test006StartLocatorInRelativeDirectory() {
     final int locatorPort = AvailablePortHelper.getRandomAvailableTCPPort();
 
@@ -500,6 +508,7 @@ public class LauncherLifecycleCommandsDUnitTest extends CliCommandTestBase {
     }
   }
 
+  @Test
   public void test007StatusLocatorUsingMemberNameIDWhenGfshIsNotConnected() {
     CommandResult result = executeCommand(CliStrings.STATUS_LOCATOR + " --name=" + getTestMethodName());
 
@@ -509,6 +518,7 @@ public class LauncherLifecycleCommandsDUnitTest extends CliCommandTestBase {
         StringUtils.trim(toString(result)));
   }
 
+  @Test
   public void test008StatusLocatorUsingMemberName() {
     final int[] ports = AvailablePortHelper.getRandomAvailableTCPPorts(2);
 
@@ -571,6 +581,7 @@ public class LauncherLifecycleCommandsDUnitTest extends CliCommandTestBase {
     }
   }
 
+  @Test
   public void test009StatusLocatorUsingMemberId() throws Exception {
     final int[] ports = AvailablePortHelper.getRandomAvailableTCPPorts(2);
 
@@ -627,6 +638,7 @@ public class LauncherLifecycleCommandsDUnitTest extends CliCommandTestBase {
     }
   }
 
+  @Test
   public void test010StopLocatorUsingMemberNameIDWhenGfshIsNotConnected() {
     CommandResult result = executeCommand(CliStrings.STOP_LOCATOR + " --name=" + getTestMethodName());
 
@@ -636,6 +648,7 @@ public class LauncherLifecycleCommandsDUnitTest extends CliCommandTestBase {
         StringUtils.trim(toString(result)));
   }
 
+  @Test
   public void test011StopLocatorUsingMemberName() {
     final int[] ports = AvailablePortHelper.getRandomAvailableTCPPorts(2);
 
@@ -723,6 +736,7 @@ public class LauncherLifecycleCommandsDUnitTest extends CliCommandTestBase {
   }
 
   // @see Trac Bug # 46760
+  @Test
   public void test012StopLocatorUsingMemberId() throws Exception {
     final int[] ports = AvailablePortHelper.getRandomAvailableTCPPorts(2);
 
@@ -800,7 +814,8 @@ public class LauncherLifecycleCommandsDUnitTest extends CliCommandTestBase {
   }
 
   @Ignore("Disabled until GEODE-1025, SGF-476 are resolved")
-  public void IGNORE_test013StartServerWithSpring() {
+  @Test
+  public void test013StartServerWithSpring() {
     String pathname = (getClass().getSimpleName() + "_" + getTestMethodName());
     File workingDirectory = new File(pathname);
 
@@ -860,6 +875,7 @@ public class LauncherLifecycleCommandsDUnitTest extends CliCommandTestBase {
     assertEquals(Status.NOT_RESPONDING, serverState.getStatus());
   }
 
+  @Test
   public void test014GemFireServerJvmProcessTerminatesOnOutOfMemoryError() throws Exception {
     int ports[] = AvailablePortHelper.getRandomAvailableTCPPorts(2);
     final int serverPort = ports[0];

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/69fd61f0/geode-assembly/src/test/java/com/gemstone/gemfire/management/internal/configuration/SharedConfigurationEndToEndDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-assembly/src/test/java/com/gemstone/gemfire/management/internal/configuration/SharedConfigurationEndToEndDUnitTest.java b/geode-assembly/src/test/java/com/gemstone/gemfire/management/internal/configuration/SharedConfigurationEndToEndDUnitTest.java
index edd056b..e1093a2 100644
--- a/geode-assembly/src/test/java/com/gemstone/gemfire/management/internal/configuration/SharedConfigurationEndToEndDUnitTest.java
+++ b/geode-assembly/src/test/java/com/gemstone/gemfire/management/internal/configuration/SharedConfigurationEndToEndDUnitTest.java
@@ -16,6 +16,8 @@
  */
 package com.gemstone.gemfire.management.internal.configuration;
 
+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 com.gemstone.gemfire.cache.Cache;
@@ -40,15 +42,16 @@ import com.gemstone.gemfire.management.internal.cli.commands.CliCommandTestBase;
 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.DistributedTestCase;
 import com.gemstone.gemfire.test.dunit.Host;
 import com.gemstone.gemfire.test.dunit.IgnoredException;
-import com.gemstone.gemfire.test.dunit.LogWriterUtils;
 import com.gemstone.gemfire.test.dunit.SerializableCallable;
 import com.gemstone.gemfire.test.dunit.VM;
 import com.gemstone.gemfire.test.dunit.WaitCriterion;
+import com.gemstone.gemfire.test.junit.categories.DistributedTest;
 
 import org.apache.commons.io.FileUtils;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
 
 import java.io.File;
 import java.io.IOException;
@@ -59,6 +62,7 @@ import java.util.Properties;
 import java.util.Set;
 import java.util.concurrent.ExecutionException;
 
+@Category(DistributedTest.class)
 public class SharedConfigurationEndToEndDUnitTest extends CliCommandTestBase {
   private static final int TIMEOUT = 10000;
   private static final int INTERVAL = 500;
@@ -69,11 +73,6 @@ public class SharedConfigurationEndToEndDUnitTest extends CliCommandTestBase {
   public static Set<String> serverNames = new HashSet<String>();
   public static Set<String> jarFileNames = new HashSet<String>();
 
-  public SharedConfigurationEndToEndDUnitTest(String name) {
-    super(name);
-    // TODO Auto-generated constructor stub
-  }
-
   private static final long serialVersionUID = -2276690105585944041L;
 
   public Set<String> startServers(HeadlessGfsh gfsh, String locatorString, int numServers, String serverNamePrefix, int startNum) throws ClassNotFoundException, IOException {
@@ -93,6 +92,7 @@ public class SharedConfigurationEndToEndDUnitTest extends CliCommandTestBase {
     return serverNames;
   }
 
+  @Test
   public void testStartServerAndExecuteCommands() throws InterruptedException, ClassNotFoundException, IOException, ExecutionException {
     IgnoredException.addIgnoredException("EntryDestroyedException");
     Object[] result = setup();
@@ -117,7 +117,7 @@ public class SharedConfigurationEndToEndDUnitTest extends CliCommandTestBase {
 
 
     //shutdown everything
-    LogWriterUtils.getLogWriter().info("Shutting down all the members");
+    getLogWriter().info("Shutting down all the members");
     shutdownAll();
     deleteSavedJarFiles();
   }
@@ -147,7 +147,7 @@ public class SharedConfigurationEndToEndDUnitTest extends CliCommandTestBase {
 
   protected void executeAndVerifyCommand(String commandString) {
     CommandResult cmdResult = executeCommand(commandString);
-    LogWriterUtils.getLogWriter().info("Command Result : \n" + commandResultToString(cmdResult));
+    getLogWriter().info("Command Result : \n" + commandResultToString(cmdResult));
     assertEquals(Status.OK, cmdResult.getStatus());
     assertFalse(cmdResult.failedToPersist());
   }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/69fd61f0/geode-core/src/main/java/com/gemstone/gemfire/internal/process/ProcessUtils.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/process/ProcessUtils.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/process/ProcessUtils.java
index c2841da..db99615 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/process/ProcessUtils.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/process/ProcessUtils.java
@@ -85,14 +85,9 @@ public final class ProcessUtils {
    * @return true if the Process is a currently running process
    */
   public static boolean isProcessAlive(final Process process) {
-    try {
-      process.exitValue();
-      return false;
-    } catch (IllegalThreadStateException e) {
-      return true;
-    }
+    return process.isAlive();
   }
-  
+
   /**
    * Returns true if a process identified by the process id was
    * running on this host machine and has been terminated by this operation.

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/69fd61f0/geode-core/src/test/java/com/gemstone/gemfire/internal/process/BlockingProcessStreamReaderJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/process/BlockingProcessStreamReaderJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/process/BlockingProcessStreamReaderJUnitTest.java
index d83d9fe..53c78c7 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/process/BlockingProcessStreamReaderJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/process/BlockingProcessStreamReaderJUnitTest.java
@@ -283,14 +283,6 @@ public class BlockingProcessStreamReaderJUnitTest extends ProcessStreamReaderTes
     this.stderr.start();
     this.stdout.start();
     
-    // wait for process to start
-    assertEventuallyTrue("Process never started", new Callable<Boolean>() {
-      @Override
-      public Boolean call() throws Exception {
-        return ProcessUtils.isProcessAlive(process);
-      }
-    }, WAIT_FOR_PROCESS_TO_START_TIMEOUT, INTERVAL);
-    
     // wait for process to die
     assertEventuallyFalse("Process never died", new Callable<Boolean>() {
       @Override
@@ -363,14 +355,6 @@ public class BlockingProcessStreamReaderJUnitTest extends ProcessStreamReaderTes
     this.stderr.start();
     this.stdout.start();
     
-    // wait for process to start
-    assertEventuallyTrue("Process never started", new Callable<Boolean>() {
-      @Override
-      public Boolean call() throws Exception {
-        return ProcessUtils.isProcessAlive(process);
-      }
-    }, WAIT_FOR_PROCESS_TO_START_TIMEOUT, INTERVAL);
-    
     // wait for process to die
     assertEventuallyFalse("Process never died", new Callable<Boolean>() {
       @Override

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/69fd61f0/geode-core/src/test/java/com/gemstone/gemfire/internal/process/NonBlockingProcessStreamReaderJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/process/NonBlockingProcessStreamReaderJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/process/NonBlockingProcessStreamReaderJUnitTest.java
index ca8f1a5..2960190 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/process/NonBlockingProcessStreamReaderJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/process/NonBlockingProcessStreamReaderJUnitTest.java
@@ -140,14 +140,6 @@ public class NonBlockingProcessStreamReaderJUnitTest extends ProcessStreamReader
     this.stderr.start();
     this.stdout.start();
     
-    // wait for process to start
-    assertEventuallyTrue("Process never started", new Callable<Boolean>() {
-      @Override
-      public Boolean call() throws Exception {
-        return ProcessUtils.isProcessAlive(process);
-      }
-    }, WAIT_FOR_PROCESS_TO_START_TIMEOUT, INTERVAL);
-    
     // wait for process to die
     assertEventuallyFalse("Process never died", new Callable<Boolean>() {
       @Override
@@ -218,14 +210,6 @@ public class NonBlockingProcessStreamReaderJUnitTest extends ProcessStreamReader
     this.stderr.start();
     this.stdout.start();
     
-    // wait for process to start
-    assertEventuallyTrue("Process never started", new Callable<Boolean>() {
-      @Override
-      public Boolean call() throws Exception {
-        return ProcessUtils.isProcessAlive(process);
-      }
-    }, WAIT_FOR_PROCESS_TO_START_TIMEOUT, INTERVAL);
-    
     // wait for process to die
     assertEventuallyFalse("Process never died", new Callable<Boolean>() {
       @Override
@@ -296,14 +280,6 @@ public class NonBlockingProcessStreamReaderJUnitTest extends ProcessStreamReader
     this.stderr.start();
     this.stdout.start();
     
-    // wait for process to start
-    assertEventuallyTrue("Process never started", new Callable<Boolean>() {
-      @Override
-      public Boolean call() throws Exception {
-        return ProcessUtils.isProcessAlive(process);
-      }
-    }, WAIT_FOR_PROCESS_TO_START_TIMEOUT, INTERVAL);
-    
     // wait for process to die
     assertEventuallyFalse("Process never died", new Callable<Boolean>() {
       @Override

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/69fd61f0/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/AbstractCommandsSupportJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/AbstractCommandsSupportJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/AbstractCommandsSupportJUnitTest.java
index 8d9971e..2b2377b 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/AbstractCommandsSupportJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/AbstractCommandsSupportJUnitTest.java
@@ -23,6 +23,14 @@ import java.io.StringWriter;
 import java.util.Collections;
 import java.util.Set;
 
+import org.jmock.Expectations;
+import org.jmock.Mockery;
+import org.jmock.lib.legacy.ClassImposteriser;
+import org.junit.After;
+import org.junit.Before;
+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.FunctionService;
@@ -35,14 +43,6 @@ import com.gemstone.gemfire.management.internal.cli.i18n.CliStrings;
 import com.gemstone.gemfire.management.internal.cli.util.MemberNotFoundException;
 import com.gemstone.gemfire.test.junit.categories.UnitTest;
 
-import org.jmock.Expectations;
-import org.jmock.Mockery;
-import org.jmock.lib.legacy.ClassImposteriser;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-
 /**
  * The AbstractCommandsSupportJUnitTest class is a test suite of test cases testing the contract and functionality
  * of the AbstractCommandsSupport class for implementing GemFire shell (Gfsh) commands.

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/69fd61f0/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/CliCommandTestBase.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/CliCommandTestBase.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/CliCommandTestBase.java
index 7d8dc55..55f5556 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/CliCommandTestBase.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/CliCommandTestBase.java
@@ -16,8 +16,22 @@
  */
 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.IOException;
+import java.io.PrintStream;
+import java.io.PrintWriter;
+import java.io.StringWriter;
+import java.net.InetAddress;
+import java.net.UnknownHostException;
+import java.util.Map;
+import java.util.Properties;
+import java.util.Set;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
 import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache30.CacheTestCase;
 import com.gemstone.gemfire.distributed.internal.DistributionConfig;
 import com.gemstone.gemfire.internal.AvailablePortHelper;
 import com.gemstone.gemfire.management.ManagementService;
@@ -29,29 +43,14 @@ 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.Host;
-import com.gemstone.gemfire.test.dunit.LogWriterUtils;
 import com.gemstone.gemfire.test.dunit.SerializableCallable;
 import com.gemstone.gemfire.test.dunit.SerializableRunnable;
-
-import util.TestException;
-
-import java.io.IOException;
-import java.io.PrintStream;
-import java.io.PrintWriter;
-import java.io.StringWriter;
-import java.net.InetAddress;
-import java.net.UnknownHostException;
-import java.util.Map;
-import java.util.Properties;
-import java.util.Set;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
+import com.gemstone.gemfire.test.dunit.cache.internal.JUnit4CacheTestCase;
 
 /**
  * Base class for all the CLI/gfsh command dunit tests.
- *
  */
-public class CliCommandTestBase extends CacheTestCase {
+public class CliCommandTestBase extends JUnit4CacheTestCase {
 
   private static final long serialVersionUID = 1L;
 
@@ -68,10 +67,6 @@ public class CliCommandTestBase extends CacheTestCase {
 
   private String jmxHost;
 
-  public CliCommandTestBase(String name) {
-    super(name);
-  }
-
   @Override
   public final void preTearDownCacheTestCase() throws Exception {
     preTearDownCliCommandTestBase();
@@ -238,7 +233,7 @@ public class CliCommandTestBase extends CacheTestCase {
     CommandResult result = executeCommand(shell, command.toString());
 
     if (!shell.isConnectedAndReady()) {
-      throw new TestException(
+      throw new AssertionError(
           "Connect command failed to connect to manager " + endpoint + " result=" + commandResultToString(result));
     }
 
@@ -273,9 +268,9 @@ public class CliCommandTestBase extends CacheTestCase {
       info("Started testable shell: " + shell);
       return shell;
     } catch (ClassNotFoundException e) {
-      throw new TestException(getStackTrace(e));
+      throw new AssertionError(getStackTrace(e));
     } catch (IOException e) {
-      throw new TestException(getStackTrace(e));
+      throw new AssertionError(getStackTrace(e));
     }
   }
 
@@ -338,9 +333,9 @@ public class CliCommandTestBase extends CacheTestCase {
     try {
       info("Executing command " + command + " with command Mgr " + CommandManager.getInstance());
     } catch (ClassNotFoundException cnfex) {
-      throw new TestException(getStackTrace(cnfex));
+      throw new AssertionError(getStackTrace(cnfex));
     } catch (IOException ioex) {
-      throw new TestException(getStackTrace(ioex));
+      throw new AssertionError(getStackTrace(ioex));
     }
 
     shell.executeCommand(command);
@@ -540,18 +535,18 @@ public class CliCommandTestBase extends CacheTestCase {
   }
 
   protected void info(String string) {
-    LogWriterUtils.getLogWriter().info(string);
+    getLogWriter().info(string);
   }
 
   protected void debug(String string) {
-    LogWriterUtils.getLogWriter().fine(string);
+    getLogWriter().fine(string);
   }
 
   protected void error(String string) {
-    LogWriterUtils.getLogWriter().error(string);
+    getLogWriter().error(string);
   }
 
   protected void error(String string, Throwable e) {
-    LogWriterUtils.getLogWriter().error(string, e);
+    getLogWriter().error(string, 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/ConfigCommandsDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ConfigCommandsDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ConfigCommandsDUnitTest.java
index 7cfb693..9844d90 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ConfigCommandsDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ConfigCommandsDUnitTest.java
@@ -16,6 +16,26 @@
  */
 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 static com.gemstone.gemfire.test.dunit.Wait.*;
+
+import java.io.File;
+import java.io.FileReader;
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.io.StringWriter;
+import java.lang.management.ManagementFactory;
+import java.lang.management.RuntimeMXBean;
+import java.util.Collections;
+import java.util.List;
+import java.util.Properties;
+
+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.server.CacheServer;
 import com.gemstone.gemfire.distributed.Locator;
@@ -35,36 +55,21 @@ 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.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 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.FileReader;
-import java.io.IOException;
-import java.io.PrintWriter;
-import java.io.StringWriter;
-import java.lang.management.ManagementFactory;
-import java.lang.management.RuntimeMXBean;
-import java.util.Collections;
-import java.util.List;
-import java.util.Properties;
+import com.gemstone.gemfire.test.junit.categories.DistributedTest;
 
 /**
  * Dunit class for testing GemFire config commands : export config
  *
  * @since 7.0
  */
+@Category(DistributedTest.class)
+@SuppressWarnings("serial")
 public class ConfigCommandsDUnitTest extends CliCommandTestBase {
-  private static final long serialVersionUID = 1L;
 
   File managerConfigFile = new File("Manager-cache.xml");
   File managerPropsFile = new File("Manager-gf.properties");
@@ -77,26 +82,23 @@ public class ConfigCommandsDUnitTest extends CliCommandTestBase {
   File subDir = new File("ConfigCommandsDUnitTestSubDir");
   File subManagerConfigFile = new File(subDir, managerConfigFile.getName());
 
-  public ConfigCommandsDUnitTest(String name) {
-    super(name);
-  }
-
   @Override
   protected void preTearDownCliCommandTestBase() throws Exception {
     deleteTestFiles();
-    Invoke.invokeInEveryVM(new SerializableRunnable() {
+    invokeInEveryVM(new SerializableRunnable() {
 
       @Override
       public void run() {
         try {
           deleteTestFiles();
         } catch (IOException e) {
-          Assert.fail("error", e);
+          fail("error", e);
         }
       }
     });
   }
 
+  @Test
   public void testDescribeConfig() throws ClassNotFoundException, IOException {
     createDefaultSetup(null);
     final String controllerName = "Member2";
@@ -123,10 +125,10 @@ public class ConfigCommandsDUnitTest extends CliCommandTestBase {
     RuntimeMXBean runtimeBean = ManagementFactory.getRuntimeMXBean();
     List<String> jvmArgs = runtimeBean.getInputArguments();
 
-    LogWriterUtils.getLogWriter().info("#SB Actual JVM Args : ");
+    getLogWriter().info("#SB Actual JVM Args : ");
 
     for (String jvmArg : jvmArgs) {
-      LogWriterUtils.getLogWriter().info("#SB JVM " + jvmArg);
+      getLogWriter().info("#SB JVM " + jvmArg);
     }
 
     InternalDistributedSystem system = (InternalDistributedSystem) cache.getDistributedSystem();
@@ -140,7 +142,7 @@ public class ConfigCommandsDUnitTest extends CliCommandTestBase {
     CommandResult cmdResult = executeCommand(command);
 
     String resultStr = commandResultToString(cmdResult);
-    LogWriterUtils.getLogWriter().info("#SB Hiding the defaults\n" + resultStr);
+    getLogWriter().info("#SB Hiding the defaults\n" + resultStr);
 
     assertEquals(true, cmdResult.getStatus().equals(Status.OK));
     assertEquals(true, resultStr.contains("G1"));
@@ -150,7 +152,7 @@ public class ConfigCommandsDUnitTest extends CliCommandTestBase {
 
     cmdResult = executeCommand(command + " --" + CliStrings.DESCRIBE_CONFIG__HIDE__DEFAULTS + "=false");
     resultStr = commandResultToString(cmdResult);
-    LogWriterUtils.getLogWriter().info("#SB No hiding of defaults\n" + resultStr);
+    getLogWriter().info("#SB No hiding of defaults\n" + resultStr);
 
     assertEquals(true, cmdResult.getStatus().equals(Status.OK));
     assertEquals(true, resultStr.contains("is-server"));
@@ -160,7 +162,7 @@ public class ConfigCommandsDUnitTest extends CliCommandTestBase {
     cs.stop();
   }
 
-  @SuppressWarnings("serial")
+  @Test
   public void testExportConfig() throws IOException {
     Properties localProps = new Properties();
     localProps.setProperty(DistributionConfig.NAME_NAME, "Manager");
@@ -252,12 +254,13 @@ public class ConfigCommandsDUnitTest extends CliCommandTestBase {
       FileReader reader = new FileReader(shellConfigFile);
       reader.read(fileContents);
     } catch (Exception ex) {
-      Assert.fail("Unable to read file contents for comparison", ex);
+      fail("Unable to read file contents for comparison", ex);
     }
 
     assertEquals(configToMatch, new String(fileContents));
   }
 
+  @Test
   public void testAlterRuntimeConfig() throws ClassNotFoundException, IOException {
     final String controller = "controller";
     createDefaultSetup(null);
@@ -279,8 +282,8 @@ public class ConfigCommandsDUnitTest extends CliCommandTestBase {
     csb.addOption(CliStrings.ALTER_RUNTIME_CONFIG__LOG__DISK__SPACE__LIMIT, "10");
     CommandResult cmdResult = executeCommand(csb.getCommandString());
     String resultString = commandResultToString(cmdResult);
-    LogWriterUtils.getLogWriter().info("Result\n");
-    LogWriterUtils.getLogWriter().info(resultString);
+    getLogWriter().info("Result\n");
+    getLogWriter().info(resultString);
     assertEquals(true, cmdResult.getStatus().equals(Status.OK));
     assertEquals(LogWriterImpl.INFO_LEVEL, config.getLogLevel());
     assertEquals(50, config.getLogFileSizeLimit());
@@ -295,6 +298,7 @@ public class ConfigCommandsDUnitTest extends CliCommandTestBase {
     Result result = commandProcessor.createCommandStatement("alter runtime", Collections.EMPTY_MAP).process();
   }
 
+  @Test
   public void testAlterRuntimeConfigRandom() {
     final String member1 = "VM1";
     final String controller = "controller";
@@ -318,8 +322,8 @@ public class ConfigCommandsDUnitTest extends CliCommandTestBase {
     CommandStringBuilder csb = new CommandStringBuilder(CliStrings.ALTER_RUNTIME_CONFIG);
     CommandResult cmdResult = executeCommand(csb.getCommandString());
     String resultAsString = commandResultToString(cmdResult);
-    LogWriterUtils.getLogWriter().info("#SB Result\n");
-    LogWriterUtils.getLogWriter().info(resultAsString);
+    getLogWriter().info("#SB Result\n");
+    getLogWriter().info(resultAsString);
     assertEquals(true, cmdResult.getStatus().equals(Status.ERROR));
     assertTrue(resultAsString.contains(CliStrings.ALTER_RUNTIME_CONFIG__RELEVANT__OPTION__MESSAGE));
 
@@ -327,12 +331,13 @@ public class ConfigCommandsDUnitTest extends CliCommandTestBase {
     csb.addOption(CliStrings.ALTER_RUNTIME_CONFIG__LOG__DISK__SPACE__LIMIT, "2000000000");
     cmdResult = executeCommand(csb.getCommandString());
     resultAsString = commandResultToString(cmdResult);
-    LogWriterUtils.getLogWriter().info("#SB Result\n");
-    LogWriterUtils.getLogWriter().info(resultAsString);
+    getLogWriter().info("#SB Result\n");
+    getLogWriter().info(resultAsString);
     assertEquals(true, cmdResult.getStatus().equals(Status.ERROR));
 
   }
 
+  @Test
   public void testAlterRuntimeConfigOnAllMembers() {
     final String member1 = "VM1";
     final String controller = "controller";
@@ -363,8 +368,8 @@ public class ConfigCommandsDUnitTest extends CliCommandTestBase {
     csb.addOption(CliStrings.ALTER_RUNTIME_CONFIG__LOG__DISK__SPACE__LIMIT, "10");
     CommandResult cmdResult = executeCommand(csb.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));
     assertEquals(LogWriterImpl.INFO_LEVEL, config.getLogLevel());
     assertEquals(50, config.getLogFileSizeLimit());
@@ -428,7 +433,7 @@ public class ConfigCommandsDUnitTest 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");
         }
@@ -479,7 +484,7 @@ public class ConfigCommandsDUnitTest extends CliCommandTestBase {
           gemfireProperties = sharedConfig.getConfiguration(groupName).getGemfireProperties();
           assertEquals("fine", gemfireProperties.get(DistributionConfig.LOG_LEVEL_NAME));
         } 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/CreateAlterDestroyRegionCommandsDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/CreateAlterDestroyRegionCommandsDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/CreateAlterDestroyRegionCommandsDUnitTest.java
index 10b37c1..b6692c7 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/CreateAlterDestroyRegionCommandsDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/CreateAlterDestroyRegionCommandsDUnitTest.java
@@ -16,6 +16,30 @@
  */
 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.jayway.awaitility.Awaitility.*;
+
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.OutputStream;
+import java.text.MessageFormat;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Properties;
+import java.util.concurrent.Callable;
+import java.util.concurrent.CopyOnWriteArrayList;
+import java.util.concurrent.TimeUnit;
+import javax.management.MBeanServer;
+import javax.management.MalformedObjectNameException;
+import javax.management.ObjectName;
+
+import org.junit.Ignore;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
 import com.gemstone.gemfire.cache.Cache;
 import com.gemstone.gemfire.cache.PartitionAttributesFactory;
 import com.gemstone.gemfire.cache.Region;
@@ -41,29 +65,17 @@ import com.gemstone.gemfire.management.internal.ManagementConstants;
 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.SerializableCallable;
 import com.gemstone.gemfire.test.dunit.VM;
-import com.jayway.awaitility.Awaitility;
-
-import javax.management.MBeanServer;
-import javax.management.MalformedObjectNameException;
-import javax.management.ObjectName;
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.OutputStream;
-import java.text.MessageFormat;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Properties;
-import java.util.concurrent.Callable;
-import java.util.concurrent.CopyOnWriteArrayList;
-import java.util.concurrent.TimeUnit;
+import com.gemstone.gemfire.test.junit.Retry;
+import com.gemstone.gemfire.test.junit.categories.DistributedTest;
+import com.gemstone.gemfire.test.junit.categories.FlakyTest;
+import com.gemstone.gemfire.test.junit.rules.RetryRule;
 
+@Category({ DistributedTest.class, FlakyTest.class }) // GEODE-973
 public class CreateAlterDestroyRegionCommandsDUnitTest extends CliCommandTestBase {
+
   private static final long serialVersionUID = 1L;
 
   final String alterRegionName = "testAlterRegionRegion";
@@ -81,13 +93,13 @@ public class CreateAlterDestroyRegionCommandsDUnitTest extends CliCommandTestBas
 
   final List<String> filesToBeDeleted = new CopyOnWriteArrayList<String>();
 
-  public CreateAlterDestroyRegionCommandsDUnitTest(String name) {
-    super(name);
-  }
+  @Rule
+  public RetryRule retryRule = new RetryRule();
 
   /**
    * Asserts that the "compressor" option for the "create region" command succeeds for a recognized compressor.
    */
+  @Test
   public void testCreateRegionWithGoodCompressor() {
     createDefaultSetup(null);
     VM vm = Host.getHost(0).getVM(1);
@@ -123,6 +135,7 @@ public class CreateAlterDestroyRegionCommandsDUnitTest extends CliCommandTestBas
   /**
    * Asserts that the "compressor" option for the "create region" command fails for an unrecognized compressorc.
    */
+  @Test
   public void testCreateRegionWithBadCompressor() {
     createDefaultSetup(null);
 
@@ -152,6 +165,7 @@ public class CreateAlterDestroyRegionCommandsDUnitTest extends CliCommandTestBas
    * Asserts that a missing "compressor" option for the "create region" command results in a region with no
    * compression.
    */
+  @Test
   public void testCreateRegionWithNoCompressor() {
     createDefaultSetup(null);
 
@@ -183,6 +197,7 @@ public class CreateAlterDestroyRegionCommandsDUnitTest extends CliCommandTestBas
     assertEquals(Result.Status.OK, cmdResult.getStatus());
   }
 
+  @Test
   public void testDestroyDistributedRegion() {
     createDefaultSetup(null);
 
@@ -205,39 +220,40 @@ public class CreateAlterDestroyRegionCommandsDUnitTest extends CliCommandTestBas
 
     // Test failure when region not found
     String command = "destroy region --name=DOESNOTEXIST";
-    LogWriterUtils.getLogWriter().info("testDestroyRegion command=" + command);
+    getLogWriter().info("testDestroyRegion command=" + command);
     CommandResult cmdResult = executeCommand(command);
     String strr = commandResultToString(cmdResult);
-    LogWriterUtils.getLogWriter().info("testDestroyRegion strr=" + strr);
+    getLogWriter().info("testDestroyRegion strr=" + strr);
     assertTrue(stringContainsLine(strr, "Could not find.*\"DOESNOTEXIST\".*"));
     assertEquals(Result.Status.ERROR, cmdResult.getStatus());
 
     // Test unable to destroy with co-location
     command = "destroy region --name=/Customer";
-    LogWriterUtils.getLogWriter().info("testDestroyRegion command=" + command);
+    getLogWriter().info("testDestroyRegion command=" + command);
     cmdResult = executeCommand(command);
     strr = commandResultToString(cmdResult);
-    LogWriterUtils.getLogWriter().info("testDestroyRegion strr=" + strr);
+    getLogWriter().info("testDestroyRegion strr=" + strr);
     assertEquals(Result.Status.ERROR, cmdResult.getStatus());
 
     // Test success
     command = "destroy region --name=/Order";
-    LogWriterUtils.getLogWriter().info("testDestroyRegion command=" + command);
+    getLogWriter().info("testDestroyRegion command=" + command);
     cmdResult = executeCommand(command);
     strr = commandResultToString(cmdResult);
     assertTrue(stringContainsLine(strr, ".*Order.*destroyed successfully.*"));
-    LogWriterUtils.getLogWriter().info("testDestroyRegion strr=" + strr);
+    getLogWriter().info("testDestroyRegion strr=" + strr);
     assertEquals(Result.Status.OK, cmdResult.getStatus());
 
     command = "destroy region --name=/Customer";
-    LogWriterUtils.getLogWriter().info("testDestroyRegion command=" + command);
+    getLogWriter().info("testDestroyRegion command=" + command);
     cmdResult = executeCommand(command);
     strr = commandResultToString(cmdResult);
     assertTrue(stringContainsLine(strr, ".*Customer.*destroyed successfully.*"));
-    LogWriterUtils.getLogWriter().info("testDestroyRegion strr=" + strr);
+    getLogWriter().info("testDestroyRegion strr=" + strr);
     assertEquals(Result.Status.OK, cmdResult.getStatus());
   }
 
+  @Test
   public void testDestroyLocalRegions() {
     createDefaultSetup(null);
 
@@ -255,19 +271,19 @@ public class CreateAlterDestroyRegionCommandsDUnitTest extends CliCommandTestBas
 
     // Test failure when region not found
     String command = "destroy region --name=DOESNOTEXIST";
-    LogWriterUtils.getLogWriter().info("testDestroyRegion command=" + command);
+    getLogWriter().info("testDestroyRegion command=" + command);
     CommandResult cmdResult = executeCommand(command);
     String strr = commandResultToString(cmdResult);
-    LogWriterUtils.getLogWriter().info("testDestroyRegion strr=" + strr);
+    getLogWriter().info("testDestroyRegion strr=" + strr);
     assertTrue(stringContainsLine(strr, "Could not find.*\"DOESNOTEXIST\".*"));
     assertEquals(Result.Status.ERROR, cmdResult.getStatus());
 
     command = "destroy region --name=/Customer";
-    LogWriterUtils.getLogWriter().info("testDestroyRegion command=" + command);
+    getLogWriter().info("testDestroyRegion command=" + command);
     cmdResult = executeCommand(command);
     strr = commandResultToString(cmdResult);
     assertTrue(stringContainsLine(strr, ".*Customer.*destroyed successfully.*"));
-    LogWriterUtils.getLogWriter().info("testDestroyRegion strr=" + strr);
+    getLogWriter().info("testDestroyRegion strr=" + strr);
     assertEquals(Result.Status.OK, cmdResult.getStatus());
 
     for (int i = 1; i <= 3; i++) {
@@ -278,6 +294,7 @@ public class CreateAlterDestroyRegionCommandsDUnitTest extends CliCommandTestBas
     }
   }
 
+  @Test
   public void testDestroyLocalAndDistributedRegions() {
     createDefaultSetup(null);
 
@@ -300,19 +317,19 @@ public class CreateAlterDestroyRegionCommandsDUnitTest extends CliCommandTestBas
 
     // Test failure when region not found
     String command = "destroy region --name=DOESNOTEXIST";
-    LogWriterUtils.getLogWriter().info("testDestroyRegion command=" + command);
+    getLogWriter().info("testDestroyRegion command=" + command);
     CommandResult cmdResult = executeCommand(command);
     String strr = commandResultToString(cmdResult);
-    LogWriterUtils.getLogWriter().info("testDestroyRegion strr=" + strr);
+    getLogWriter().info("testDestroyRegion strr=" + strr);
     assertTrue(stringContainsLine(strr, "Could not find.*\"DOESNOTEXIST\".*"));
     assertEquals(Result.Status.ERROR, cmdResult.getStatus());
 
     command = "destroy region --name=/Customer";
-    LogWriterUtils.getLogWriter().info("testDestroyRegion command=" + command);
+    getLogWriter().info("testDestroyRegion command=" + command);
     cmdResult = executeCommand(command);
     strr = commandResultToString(cmdResult);
     assertTrue(stringContainsLine(strr, ".*Customer.*destroyed successfully.*"));
-    LogWriterUtils.getLogWriter().info("testDestroyRegion strr=" + strr);
+    getLogWriter().info("testDestroyRegion strr=" + strr);
     assertEquals(Result.Status.OK, cmdResult.getStatus());
 
     for (int i = 1; i <= 3; i++) {
@@ -325,7 +342,7 @@ public class CreateAlterDestroyRegionCommandsDUnitTest extends CliCommandTestBas
 
   private void waitForRegionMBeanCreation(final String regionPath, final int mbeanCount) {
     Host.getHost(0).getVM(0).invoke(() -> {
-      Awaitility.waitAtMost(5, TimeUnit.SECONDS).until(newRegionMBeanIsCreated(regionPath, mbeanCount));
+      waitAtMost(5, TimeUnit.SECONDS).until(newRegionMBeanIsCreated(regionPath, mbeanCount));
     });
   }
 
@@ -337,30 +354,32 @@ public class CreateAlterDestroyRegionCommandsDUnitTest extends CliCommandTestBas
         ObjectName queryExpON = new ObjectName(queryExp);
         return mbeanServer.queryNames(null, queryExpON).size() == mbeanCount;
       } catch (MalformedObjectNameException mone) {
-        LogWriterUtils.getLogWriter().error(mone);
+        getLogWriter().error(mone);
         fail(mone.getMessage());
         return false;
       }
     };
   }
 
+  @Test
+  @Retry(2) // GEODE-973: getRandomAvailablePort
   public void testCreateRegion46391() throws IOException {
-    createDefaultSetup(null);
+    createDefaultSetup(null); // GEODE-973: getRandomAvailablePort
     String command = CliStrings.CREATE_REGION + " --" + CliStrings.CREATE_REGION__REGION + "=" + this.region46391 + " --" + CliStrings.CREATE_REGION__REGIONSHORTCUT + "=REPLICATE";
 
-    LogWriterUtils.getLogWriter().info("testCreateRegion46391 create region command=" + command);
+    getLogWriter().info("testCreateRegion46391 create region command=" + command);
 
     CommandResult cmdResult = executeCommand(command);
     assertEquals(Result.Status.OK, cmdResult.getStatus());
 
     command = CliStrings.PUT + " --" + CliStrings.PUT__KEY + "=k1" + " --" + CliStrings.PUT__VALUE + "=k1" + " --" + CliStrings.PUT__REGIONNAME + "=" + this.region46391;
 
-    LogWriterUtils.getLogWriter().info("testCreateRegion46391 put command=" + command);
+    getLogWriter().info("testCreateRegion46391 put command=" + command);
 
     CommandResult cmdResult2 = executeCommand(command);
     assertEquals(Result.Status.OK, cmdResult2.getStatus());
 
-    LogWriterUtils.getLogWriter().info("testCreateRegion46391  cmdResult2=" + commandResultToString(cmdResult2));
+    getLogWriter().info("testCreateRegion46391  cmdResult2=" + commandResultToString(cmdResult2));
     String str1 = "Result      : true";
     String str2 = "Key         : k1";
     String str3 = "Key Class   : java.lang.String";
@@ -376,7 +395,9 @@ public class CreateAlterDestroyRegionCommandsDUnitTest extends CliCommandTestBas
     assertTrue(commandResultToString(cmdResult2).contains(str5));
   }
 
-  public void bug51924_testAlterRegion() throws IOException {
+  @Ignore("bug51924")
+  @Test
+  public void testAlterRegion() throws IOException {
     createDefaultSetup(null);
 
     CommandResult cmdResult = executeCommand(CliStrings.LIST_REGION);
@@ -748,6 +769,7 @@ public class CreateAlterDestroyRegionCommandsDUnitTest extends CliCommandTestBas
   /**
    * Asserts that creating, altering and destroying regions correctly updates the shared configuration.
    */
+  @Test
   public void testCreateAlterDestroyUpdatesSharedConfig() {
     disconnectAllFromDS();
 
@@ -768,7 +790,7 @@ public class CreateAlterDestroyRegionCommandsDUnitTest extends CliCommandTestBas
         final InternalLocator locator = (InternalLocator) Locator.startLocatorAndDS(locatorPort, locatorLogFile, null,
             locatorProps);
 
-        Awaitility.waitAtMost(5, TimeUnit.SECONDS).until(() -> locator.isSharedConfigurationRunning());
+        waitAtMost(5, TimeUnit.SECONDS).until(() -> locator.isSharedConfigurationRunning());
       } catch (IOException ioex) {
         fail("Unable to create a locator with a shared configuration");
       }
@@ -809,7 +831,7 @@ public class CreateAlterDestroyRegionCommandsDUnitTest extends CliCommandTestBas
       try {
         assertTrue(sharedConfig.getConfiguration(groupName).getCacheXmlContent().contains(regionName));
       } catch (Exception e) {
-        Assert.fail("Error in cluster configuration service", e);
+        fail("Error in cluster configuration service", e);
       }
     });
 
@@ -880,6 +902,7 @@ public class CreateAlterDestroyRegionCommandsDUnitTest extends CliCommandTestBas
 
   }
 
+  @Test
   public void testDestroyRegionWithSharedConfig() {
 
     disconnectAllFromDS();
@@ -901,7 +924,7 @@ public class CreateAlterDestroyRegionCommandsDUnitTest extends CliCommandTestBas
         final InternalLocator locator = (InternalLocator) Locator.startLocatorAndDS(locatorPort, locatorLogFile, null,
             locatorProps);
 
-        Awaitility.waitAtMost(5, TimeUnit.SECONDS).until(() -> locator.isSharedConfigurationRunning());
+        waitAtMost(5, TimeUnit.SECONDS).until(() -> locator.isSharedConfigurationRunning());
       } catch (IOException ioex) {
         fail("Unable to create a locator with a shared configuration");
       }
@@ -950,7 +973,7 @@ public class CreateAlterDestroyRegionCommandsDUnitTest extends CliCommandTestBas
     commandStringBuilder = new CommandStringBuilder(CliStrings.DESTROY_REGION);
     commandStringBuilder.addOption(CliStrings.DESTROY_REGION__REGION, regionName);
     cmdResult = executeCommand(commandStringBuilder.toString());
-    LogWriterUtils.getLogWriter().info("#SB" + commandResultToString(cmdResult));
+    getLogWriter().info("#SB" + commandResultToString(cmdResult));
     assertEquals(Result.Status.OK, cmdResult.getStatus());
 
     // Make sure the region was removed from the shared config
@@ -997,7 +1020,7 @@ public class CreateAlterDestroyRegionCommandsDUnitTest extends CliCommandTestBas
           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/DeployCommandsDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/DeployCommandsDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/DeployCommandsDUnitTest.java
index b70b9fa..fee3978 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/DeployCommandsDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/DeployCommandsDUnitTest.java
@@ -16,6 +16,17 @@
  */
 package com.gemstone.gemfire.management.internal.cli.commands;
 
+import static com.gemstone.gemfire.test.dunit.Assert.*;
+
+import java.io.File;
+import java.io.FilenameFilter;
+import java.io.IOException;
+import java.util.Properties;
+import java.util.regex.Pattern;
+
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
 import com.gemstone.gemfire.distributed.Locator;
 import com.gemstone.gemfire.distributed.internal.DistributionConfig;
 import com.gemstone.gemfire.distributed.internal.DistributionManager;
@@ -35,31 +46,22 @@ 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.FilenameFilter;
-import java.io.IOException;
-import java.util.Properties;
-import java.util.regex.Pattern;
+import com.gemstone.gemfire.test.junit.categories.DistributedTest;
 
 /**
  * Unit tests for the DeployCommands class
  *
  * @since 7.0
  */
+@Category(DistributedTest.class)
+@SuppressWarnings("serial")
 public class DeployCommandsDUnitTest extends CliCommandTestBase {
-  private static final long serialVersionUID = 1L;
 
   File newDeployableJarFile = new File("DeployCommandsDUnit1.jar");
 
   transient private ClassBuilder classBuilder = new ClassBuilder();
   transient private CommandProcessor commandProcessor;
 
-  public DeployCommandsDUnitTest(String name) {
-    super(name);
-  }
-
-  @SuppressWarnings("serial")
   @Override
   public final void postSetUp() throws Exception {
     this.commandProcessor = new CommandProcessor();
@@ -90,7 +92,7 @@ public class DeployCommandsDUnitTest extends CliCommandTestBase {
     deleteSavedJarFiles();
   }
 
-  @SuppressWarnings("serial")
+  @Test
   public void testDeploy() throws IOException {
     final Properties props = new Properties();
     final Host host = Host.getHost(0);
@@ -176,7 +178,7 @@ public class DeployCommandsDUnitTest extends CliCommandTestBase {
     assertEquals(2, countMatchesInString(resultString, "DeployCommandsDUnit6.jar"));
   }
 
-  @SuppressWarnings("serial")
+  @Test
   public void testUndeploy() throws IOException {
     final Properties props = new Properties();
     final Host host = Host.getHost(0);
@@ -253,7 +255,7 @@ public class DeployCommandsDUnitTest extends CliCommandTestBase {
     assertEquals(4, countMatchesInString(resultString, "DeployCommandsDUnit5.jar"));
   }
 
-  @SuppressWarnings("serial")
+  @Test
   public void testListDeployed() throws IOException {
     final Properties props = new Properties();
     final Host host = Host.getHost(0);
@@ -322,6 +324,7 @@ public class DeployCommandsDUnitTest extends CliCommandTestBase {
   /**
    * Does an end-to-end test using the complete CLI framework while ensuring that the shared configuration is updated.
    */
+  @Test
   public void testEndToEnd() throws IOException {
     final String groupName = "testDeployEndToEndGroup";
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/69fd61f0/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/DiskStoreCommandsDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/DiskStoreCommandsDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/DiskStoreCommandsDUnitTest.java
index 566977c..e8ee713 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/DiskStoreCommandsDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/DiskStoreCommandsDUnitTest.java
@@ -16,6 +16,23 @@
  */
 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.Collection;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Properties;
+import java.util.StringTokenizer;
+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.CacheFactory;
 import com.gemstone.gemfire.cache.DataPolicy;
@@ -46,25 +63,12 @@ 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.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.junit.Test;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Properties;
-import java.util.StringTokenizer;
-import java.util.concurrent.CopyOnWriteArrayList;
+import com.gemstone.gemfire.test.junit.categories.DistributedTest;
 
 /**
  * The DiskStoreCommandsDUnitTest class is a distributed test suite of test cases for testing the disk store commands
@@ -75,16 +79,12 @@ import java.util.concurrent.CopyOnWriteArrayList;
  * @see org.junit.Test
  * @since 7.0
  */
+@Category(DistributedTest.class)
+@SuppressWarnings("serial")
 public class DiskStoreCommandsDUnitTest extends CliCommandTestBase {
-  private static final long serialVersionUID = 1L;
 
   final List<String> filesToBeDeleted = new CopyOnWriteArrayList<String>();
 
-  public DiskStoreCommandsDUnitTest(final String testName) {
-    super(testName);
-  }
-
-  @SuppressWarnings("serial")
   @Test
   public void testMissingDiskStore() {
     final String regionName = "testShowMissingDiskStoreRegion";
@@ -198,7 +198,7 @@ public class DiskStoreCommandsDUnitTest extends CliCommandTestBase {
             return "Waiting for another persistent member to come online";
           }
         };
-        Wait.waitForCriterion(waitCriterion, 70000, 100, true);
+        waitForCriterion(waitCriterion, 70000, 100, true);
       }
     });
 
@@ -240,6 +240,7 @@ public class DiskStoreCommandsDUnitTest extends CliCommandTestBase {
     }
   }
 
+  @Test
   public void testDescribeOfflineDiskStore() {
     createDefaultSetup(null);
 
@@ -292,6 +293,7 @@ public class DiskStoreCommandsDUnitTest extends CliCommandTestBase {
     assertFalse(stringContainsLine(stringResult, ".*/" + region2 + ": .*"));
   }
 
+  @Test
   public void testOfflineDiskStorePdxCommands() {
     final Properties props = new Properties();
     props.setProperty("mcast-port", "0");
@@ -336,7 +338,7 @@ public class DiskStoreCommandsDUnitTest extends CliCommandTestBase {
         stringContainsLine(stringResult, ".*com\\.gemstone\\.gemfire\\.cache\\.query\\.data\\.PortfolioPdx\\$Day.*"));
   }
 
-
+  @Test
   public void testValidateDiskStore() {
     createDefaultSetup(null);
 
@@ -369,20 +371,21 @@ public class DiskStoreCommandsDUnitTest extends CliCommandTestBase {
       }
     });
     String command = "validate offline-disk-store --name=" + diskStoreName1 + " --disk-dirs=" + diskStoreDir.getAbsolutePath();
-    LogWriterUtils.getLogWriter().info("testValidateDiskStore command: " + command);
+    getLogWriter().info("testValidateDiskStore command: " + command);
     CommandResult cmdResult = executeCommand(command);
     if (cmdResult != null) {
       String stringResult = commandResultToString(cmdResult);
-      LogWriterUtils.getLogWriter().info("testValidateDiskStore cmdResult is stringResult " + stringResult);
+      getLogWriter().info("testValidateDiskStore cmdResult is stringResult " + stringResult);
       assertEquals(Result.Status.OK, cmdResult.getStatus());
       assertTrue(stringResult.contains("Total number of region entries in this disk store is"));
 
     } else {
-      LogWriterUtils.getLogWriter().info("testValidateDiskStore cmdResult is null");
+      getLogWriter().info("testValidateDiskStore cmdResult is null");
       fail("Did not get CommandResult in testValidateDiskStore");
     }
   }
 
+  @Test
   public void testExportOfflineDiskStore() throws Exception {
     createDefaultSetup(null);
 
@@ -423,7 +426,7 @@ public class DiskStoreCommandsDUnitTest extends CliCommandTestBase {
       }
     });
     String command = "export offline-disk-store --name=" + diskStoreName1 + " --disk-dirs=" + diskStoreDir.getAbsolutePath() + " --dir=" + exportDir;
-    LogWriterUtils.getLogWriter().info("testExportDiskStore command" + command);
+    getLogWriter().info("testExportDiskStore command" + command);
     CommandResult cmdResult = executeCommand(command);
     if (cmdResult != null) {
       assertEquals(Result.Status.OK, cmdResult.getStatus());
@@ -432,7 +435,7 @@ public class DiskStoreCommandsDUnitTest extends CliCommandTestBase {
       SnapshotTestUtil.checkSnapshotEntries(exportDir, entries, diskStoreName1, region2);
 
     } else {
-      LogWriterUtils.getLogWriter().info("testExportOfflineDiskStore cmdResult is null");
+      getLogWriter().info("testExportOfflineDiskStore cmdResult is null");
       fail("Did not get CommandResult in testExportOfflineDiskStore");
     }
   }
@@ -440,6 +443,7 @@ public class DiskStoreCommandsDUnitTest extends CliCommandTestBase {
   /**
    * Asserts that creating and destroying disk stores correctly updates the shared configuration.
    */
+  @Test
   public void testCreateDestroyUpdatesSharedConfig() {
     disconnectAllFromDS();
 
@@ -473,7 +477,7 @@ public class DiskStoreCommandsDUnitTest 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");
         }
@@ -522,7 +526,7 @@ public class DiskStoreCommandsDUnitTest extends CliCommandTestBase {
           xmlFromConfig = sharedConfig.getConfiguration(groupName).getCacheXmlContent();
           assertTrue(xmlFromConfig.contains(diskStoreName));
         } catch (Exception e) {
-          Assert.fail("Error occurred in cluster configuration service", e);
+          fail("Error occurred in cluster configuration service", e);
         }
       }
     });
@@ -573,7 +577,7 @@ public class DiskStoreCommandsDUnitTest extends CliCommandTestBase {
           xmlFromConfig = sharedConfig.getConfiguration(groupName).getCacheXmlContent();
           assertFalse(xmlFromConfig.contains(diskStoreName));
         } catch (Exception e) {
-          Assert.fail("Error occurred in cluster configuration service", e);
+          fail("Error occurred in cluster configuration service", e);
         }
       }
     });
@@ -603,13 +607,14 @@ public class DiskStoreCommandsDUnitTest extends CliCommandTestBase {
   }
 
 
-  /****
+  /**
    * 1) Create a disk-store in a member, get the disk-dirs. 2) Close the member. 3) Execute the command. 4) Restart the
    * member. 5) Check if the disk-store is altered.
    *
    * @throws IOException
    * @throws ClassNotFoundException
    */
+  @Test
   public void testAlterDiskStore() throws ClassNotFoundException, IOException {
     final String regionName = "region1";
     final String diskStoreName = "disk-store1";
@@ -664,7 +669,7 @@ public class DiskStoreCommandsDUnitTest extends CliCommandTestBase {
 
     CommandResult cmdResult = executeCommand(commandString);
     String resultString = commandResultToString(cmdResult);
-    LogWriterUtils.getLogWriter().info("#SB command output : \n" + resultString);
+    getLogWriter().info("#SB command output : \n" + resultString);
     assertEquals(true, Result.Status.OK.equals(cmdResult.getStatus()));
     assertEquals(true, resultString.contains("concurrencyLevel=5"));
     assertEquals(true, resultString.contains("lruAction=local-destroy"));
@@ -695,7 +700,7 @@ public class DiskStoreCommandsDUnitTest extends CliCommandTestBase {
 
     cmdResult = executeCommand(commandString);
     resultString = commandResultToString(cmdResult);
-    LogWriterUtils.getLogWriter().info("command output : \n" + resultString);
+    getLogWriter().info("command output : \n" + resultString);
     assertEquals(true, Result.Status.OK.equals(cmdResult.getStatus()));
 
     Object postDestroyValue = vm1.invoke(new SerializableCallable() {
@@ -722,13 +727,13 @@ public class DiskStoreCommandsDUnitTest extends CliCommandTestBase {
 
     cmdResult = executeCommand(commandString);
     resultString = commandResultToString(cmdResult);
-    LogWriterUtils.getLogWriter().info("Alter DiskStore with wrong remove option  : \n" + resultString);
+    getLogWriter().info("Alter DiskStore with wrong remove option  : \n" + resultString);
     assertEquals(true, Result.Status.ERROR.equals(cmdResult.getStatus()));
 
     filesToBeDeleted.add(diskDirName);
   }
 
-
+  @Test
   public void testBackupDiskStoreBackup() throws IOException {
     final String regionName = "region1";
     final String fullBackUpName = "fullBackUp";
@@ -789,7 +794,7 @@ public class DiskStoreCommandsDUnitTest extends CliCommandTestBase {
 
     CommandResult cmdResult = executeCommand(commandString);
     String resultAsString = commandResultToString(cmdResult);
-    LogWriterUtils.getLogWriter().info("Result from full backup : \n" + resultAsString);
+    getLogWriter().info("Result from full backup : \n" + resultAsString);
     assertEquals(Result.Status.OK, cmdResult.getStatus());
     assertEquals(true, resultAsString.contains("Manager"));
     assertEquals(true, resultAsString.contains(vm1Name));
@@ -819,13 +824,14 @@ public class DiskStoreCommandsDUnitTest extends CliCommandTestBase {
 
     cmdResult = executeCommand(csb.toString());
     resultAsString = commandResultToString(cmdResult);
-    LogWriterUtils.getLogWriter().info("Result from incremental backup : \n" + resultAsString);
+    getLogWriter().info("Result from incremental backup : \n" + resultAsString);
     assertEquals(Result.Status.OK, cmdResult.getStatus());
 
     assertEquals(true, resultAsString.contains("Manager"));
     assertEquals(true, resultAsString.contains(vm1Name));
   }
 
+  @Test
   public void testCreateDiskStore() {
     final String diskStore1Name = "testCreateDiskStore1";
     final String diskStore2Name = "testCreateDiskStore2";
@@ -942,6 +948,7 @@ public class DiskStoreCommandsDUnitTest extends CliCommandTestBase {
     assertTrue(stringContainsLine(stringResult, vm2Name + ".*" + diskStore2Name + " .*"));
   }
 
+  @Test
   public void testDestroyDiskStore() {
     final String diskStore1Name = "testDestroyDiskStore1";
     final String diskStore2Name = "testDestroyDiskStore2";
@@ -1151,7 +1158,7 @@ public class DiskStoreCommandsDUnitTest extends CliCommandTestBase {
       try {
         deleteFiles();
       } 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/DiskStoreCommandsJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/DiskStoreCommandsJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/DiskStoreCommandsJUnitTest.java
index 4b9f4c6..788e9eb 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/DiskStoreCommandsJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/DiskStoreCommandsJUnitTest.java
@@ -24,6 +24,15 @@ import java.util.Collections;
 import java.util.List;
 import java.util.Set;
 
+import org.jmock.Expectations;
+import org.jmock.Mockery;
+import org.jmock.lib.legacy.ClassImposteriser;
+import org.junit.After;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
 import com.gemstone.gemfire.cache.Cache;
 import com.gemstone.gemfire.cache.execute.Execution;
 import com.gemstone.gemfire.cache.execute.FunctionInvocationTargetException;
@@ -31,7 +40,6 @@ import com.gemstone.gemfire.cache.execute.ResultCollector;
 import com.gemstone.gemfire.distributed.DistributedMember;
 import com.gemstone.gemfire.internal.cache.execute.AbstractExecution;
 import com.gemstone.gemfire.internal.util.CollectionUtils;
-import com.gemstone.gemfire.management.internal.cli.CliUtil;
 import com.gemstone.gemfire.management.internal.cli.domain.DiskStoreDetails;
 import com.gemstone.gemfire.management.internal.cli.functions.DescribeDiskStoreFunction;
 import com.gemstone.gemfire.management.internal.cli.functions.ListDiskStoresFunction;
@@ -40,15 +48,6 @@ import com.gemstone.gemfire.management.internal.cli.util.DiskStoreNotFoundExcept
 import com.gemstone.gemfire.management.internal.cli.util.MemberNotFoundException;
 import com.gemstone.gemfire.test.junit.categories.UnitTest;
 
-import org.jmock.Expectations;
-import org.jmock.Mockery;
-import org.jmock.lib.legacy.ClassImposteriser;
-import org.junit.After;
-import org.junit.Assert;
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-
 /**
  * The DiskStoreCommandsJUnitTest class is a test suite of test cases testing the contract and functionality of the
  * DiskStoreCommands class implementing commands in the GemFire shell (gfsh) that access and modify disk stores in


Mime
View raw message