geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jinmeil...@apache.org
Subject [15/50] [abbrv] incubator-geode git commit: GEODE-17: CliCommandTestBase refactor
Date Fri, 29 Apr 2016 19:23:25 GMT
GEODE-17: CliCommandTestBase refactor

* refactored CliCommandTestBase
* put Parameterized run on each child classes so that not every child class of CliCommandTestBase needs to run with parameters.
* added GfshShellConnectionRule


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

Branch: refs/heads/develop
Commit: 2322827b049dd5f35e81f363778cfb07ceaf2df3
Parents: e08fd9f
Author: Jinmei Liao <jiliao@pivotal.io>
Authored: Thu Apr 14 14:55:42 2016 -0700
Committer: Jinmei Liao <jiliao@pivotal.io>
Committed: Thu Apr 14 14:55:42 2016 -0700

----------------------------------------------------------------------
 .../LauncherLifecycleCommandsDUnitTest.java     |   4 -
 .../SharedConfigurationEndToEndDUnitTest.java   |   4 -
 .../cli/commands/CliCommandTestBase.java        | 156 ++++++++++---------
 .../cli/commands/ConfigCommandsDUnitTest.java   |  19 ++-
 ...eateAlterDestroyRegionCommandsDUnitTest.java |  27 ++--
 .../cli/commands/DeployCommandsDUnitTest.java   |   9 +-
 .../commands/DiskStoreCommandsDUnitTest.java    |  25 +--
 .../cli/commands/FunctionCommandsDUnitTest.java |  27 ++--
 .../commands/GemfireDataCommandsDUnitTest.java  |  15 +-
 ...WithCacheLoaderDuringCacheMissDUnitTest.java |   9 +-
 .../cli/commands/IndexCommandsDUnitTest.java    |  13 +-
 ...stAndDescribeDiskStoreCommandsDUnitTest.java |   9 +-
 .../ListAndDescribeRegionDUnitTest.java         |   9 +-
 .../cli/commands/ListIndexCommandDUnitTest.java |   9 +-
 .../MiscellaneousCommandsDUnitTest.java         |  23 +--
 ...laneousCommandsExportLogsPart1DUnitTest.java |   9 +-
 ...laneousCommandsExportLogsPart2DUnitTest.java |   9 +-
 ...laneousCommandsExportLogsPart3DUnitTest.java |  13 +-
 ...laneousCommandsExportLogsPart4DUnitTest.java |   9 +-
 .../cli/commands/QueueCommandsDUnitTest.java    |   9 +-
 .../SharedConfigurationCommandsDUnitTest.java   |   9 +-
 .../cli/commands/ShellCommandsDUnitTest.java    |   7 +-
 .../cli/commands/ShowMetricsDUnitTest.java      |  11 +-
 .../cli/commands/ShowStackTraceDUnitTest.java   |   9 +-
 .../cli/commands/UserCommandsDUnitTest.java     |  11 +-
 ...CacheServerMBeanAuthenticationJUnitTest.java |   2 +-
 .../security/GfshCommandsSecurityTest.java      |  40 +++++
 .../security/GfshShellConnectionRule.java       | 101 ++++++++++++
 .../security/JMXConnectionConfiguration.java    |   1 -
 .../JsonAuthorizationCacheStartRule.java        |  12 +-
 .../cli/commands/ClientCommandsDUnitTest.java   |  16 +-
 .../DurableClientCommandsDUnitTest.java         |   6 +-
 .../wan/wancommand/WANCommandTestBase.java      |   4 -
 ...anCommandCreateGatewayReceiverDUnitTest.java |  24 ++-
 .../WanCommandCreateGatewaySenderDUnitTest.java |  24 ++-
 ...WanCommandGatewayReceiverStartDUnitTest.java |  14 +-
 .../WanCommandGatewayReceiverStopDUnitTest.java |  14 +-
 .../WanCommandGatewaySenderStartDUnitTest.java  |  16 +-
 .../WanCommandGatewaySenderStopDUnitTest.java   |  14 +-
 .../wan/wancommand/WanCommandListDUnitTest.java |  14 +-
 .../WanCommandPauseResumeDUnitTest.java         |  24 ++-
 .../wancommand/WanCommandStatusDUnitTest.java   |  16 +-
 .../ClusterConfigurationDUnitTest.java          |   4 -
 43 files changed, 480 insertions(+), 320 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/2322827b/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 e857ce7..efbcf94 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
@@ -108,10 +108,6 @@ public class LauncherLifecycleCommandsDUnitTest extends CliCommandTestBase {
 
   private final Queue<Integer> processIds = new ConcurrentLinkedDeque<>();
 
-  public LauncherLifecycleCommandsDUnitTest(boolean useHttpOnConnect, String jsonAuthorization) {
-    super(useHttpOnConnect, jsonAuthorization);
-  }
-
   protected static String getMemberId(final int jmxManagerPort, final String memberName) throws Exception {
     return getMemberId(InetAddress.getLocalHost().getHostName(), jmxManagerPort, memberName);
   }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/2322827b/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 2583649..63f23a1 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
@@ -73,10 +73,6 @@ public class SharedConfigurationEndToEndDUnitTest extends CliCommandTestBase {
 
   private static final long serialVersionUID = -2276690105585944041L;
 
-  public SharedConfigurationEndToEndDUnitTest(boolean useHttpOnConnect, String jsonAuthorization) {
-    super(useHttpOnConnect, jsonAuthorization);
-  }
-
   public Set<String> startServers(HeadlessGfsh gfsh, String locatorString, int numServers, String serverNamePrefix, int startNum) throws ClassNotFoundException, IOException {
     Set<String> serverNames = new HashSet<String>();
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/2322827b/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 02cf8b7..cdf19b5 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
@@ -31,7 +31,6 @@ import com.gemstone.gemfire.management.internal.security.JSONAuthorization;
 import com.gemstone.gemfire.test.dunit.Host;
 import com.gemstone.gemfire.test.dunit.SerializableRunnable;
 import com.gemstone.gemfire.test.dunit.cache.internal.JUnit4CacheTestCase;
-import org.junit.runner.RunWith;
 import org.junit.runners.Parameterized;
 
 import java.io.IOException;
@@ -54,7 +53,6 @@ import static com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter;
 /**
  * Base class for all the CLI/gfsh command dunit tests.
  */
-@RunWith(Parameterized.class)
 public abstract class CliCommandTestBase extends JUnit4CacheTestCase {
 
   private static final long serialVersionUID = 1L;
@@ -63,26 +61,34 @@ public abstract class CliCommandTestBase extends JUnit4CacheTestCase {
 
   private transient HeadlessGfsh shell;
 
-  protected boolean useHttpOnConnect;
-  protected String jsonAuthorization;
+  protected boolean useHttpOnConnect = false;
+  protected boolean enableAuth = false;
+  protected String jsonAuthorization = "cacheServer.json";
+  protected String username = "super-user";
+  protected String password = "1234567";
 
-  private int httpPort;
-  private int jmxPort;
+  protected int httpPort;
+  protected int jmxPort;
 
-  private String jmxHost;
+  protected String jmxHost;
 
-  public CliCommandTestBase(boolean useHttpOnConnect, String jsonAuthorization){
+  public CliCommandTestBase(){
+    this(false, false);
+  }
+
+  // Junit will use the parameters to initialize the test class and run the tests with different parameters
+  public CliCommandTestBase(boolean useHttpOnConnect, boolean enableAuth){
     this.useHttpOnConnect = useHttpOnConnect;
-    this.jsonAuthorization = jsonAuthorization;
+    this.enableAuth = enableAuth;
   }
 
   @Parameterized.Parameters
   public static Collection parameters() {
     return Arrays.asList(new Object[][] {
-        { false, null },
-        { true, null },
-        { false, "cacheServer.json" },
-        { true, "cacheServer.json" }
+        { false, false },  // useHttpOnConnect=false, no security enabled
+        { true, false }, // useHttpOnConnect=true, no security enabled
+        { false, true }, // useHttpOnConnect=false, security enabled with cacheServer.json
+        { true, true } // useHttpOnConnect=true, security enabled with cacheServer.json
     });
   }
 
@@ -107,55 +113,59 @@ public abstract class CliCommandTestBase extends JUnit4CacheTestCase {
    * @return the default testable GemFire shell.
    */
   @SuppressWarnings("serial")
-  protected HeadlessGfsh createDefaultSetup(final Properties props) {
-    Object[] result = (Object[]) Host.getHost(0).getVM(0).invoke( "createDefaultSetup", () -> {
-        final Object[] results = new Object[3];
-        final Properties localProps = (props != null ? props : new Properties());
-
-        try {
-          jmxHost = InetAddress.getLocalHost().getHostName();
-        } catch (UnknownHostException ignore) {
-          jmxHost = "localhost";
-        }
+  protected HeadlessGfsh setUpJmxManagerOnVm0ThenConnect(final Properties props) {
+    setUpJMXManagerOnVM(0, props);
+    shellConnect();
+    return shell;
+  }
 
-        if (!localProps.containsKey(DistributionConfig.NAME_NAME)) {
-          localProps.setProperty(DistributionConfig.NAME_NAME, "Manager");
-        }
+  protected void setUpJMXManagerOnVM(int vm, final Properties props){
+    Object[] result = (Object[]) Host.getHost(0).getVM(vm).invoke( "setUpJmxManagerOnVm0ThenConnect", () -> {
+      final Object[] results = new Object[3];
+      final Properties localProps = (props != null ? props : new Properties());
 
-        final int[] ports = AvailablePortHelper.getRandomAvailableTCPPorts(2);
+      try {
+        jmxHost = InetAddress.getLocalHost().getHostName();
+      } catch (UnknownHostException ignore) {
+        jmxHost = "localhost";
+      }
 
-        jmxPort = ports[0];
-        httpPort = ports[1];
+      if (!localProps.containsKey(DistributionConfig.NAME_NAME)) {
+        localProps.setProperty(DistributionConfig.NAME_NAME, "Manager");
+      }
 
-        localProps.setProperty(DistributionConfig.JMX_MANAGER_NAME, "true");
-        localProps.setProperty(DistributionConfig.JMX_MANAGER_START_NAME, "true");
-        localProps.setProperty(DistributionConfig.JMX_MANAGER_BIND_ADDRESS_NAME, String.valueOf(jmxHost));
-        localProps.setProperty(DistributionConfig.JMX_MANAGER_PORT_NAME, String.valueOf(jmxPort));
-        localProps.setProperty(DistributionConfig.HTTP_SERVICE_PORT_NAME, String.valueOf(httpPort));
+      final int[] ports = AvailablePortHelper.getRandomAvailableTCPPorts(2);
 
-        if(jsonAuthorization!=null){
-          localProps.put(DistributionConfig.SECURITY_CLIENT_AUTHENTICATOR_NAME,
-              JSONAuthorization.class.getName() + ".create");
-          localProps.put(DistributionConfig.SECURITY_CLIENT_ACCESSOR_NAME, JSONAuthorization.class.getName() + ".create");
+      jmxPort = ports[0];
+      httpPort = ports[1];
 
-          JSONAuthorization.setUpWithJsonFile(jsonAuthorization);
-        }
+      localProps.setProperty(DistributionConfig.JMX_MANAGER_NAME, "true");
+      localProps.setProperty(DistributionConfig.JMX_MANAGER_START_NAME, "true");
+      localProps.setProperty(DistributionConfig.JMX_MANAGER_BIND_ADDRESS_NAME, String.valueOf(jmxHost));
+      localProps.setProperty(DistributionConfig.JMX_MANAGER_PORT_NAME, String.valueOf(jmxPort));
+      localProps.setProperty(DistributionConfig.HTTP_SERVICE_PORT_NAME, String.valueOf(httpPort));
+
+      if(enableAuth){
+        localProps.put(DistributionConfig.SECURITY_CLIENT_AUTHENTICATOR_NAME,
+            JSONAuthorization.class.getName() + ".create");
+        localProps.put(DistributionConfig.SECURITY_CLIENT_ACCESSOR_NAME, JSONAuthorization.class.getName() + ".create");
 
-        getSystem(localProps);
-        verifyManagementServiceStarted(getCache());
+        JSONAuthorization.setUpWithJsonFile(jsonAuthorization);
+      }
+
+      getSystem(localProps);
+      verifyManagementServiceStarted(getCache());
 
-        results[0] = jmxHost;
-        results[1] = jmxPort;
-        results[2] = httpPort;
+      results[0] = jmxHost;
+      results[1] = jmxPort;
+      results[2] = httpPort;
 
-        return results;
+      return results;
     });
 
     this.jmxHost = (String) result[0];
     this.jmxPort = (Integer) result[1];
     this.httpPort = (Integer) result[2];
-
-    return defaultShellConnect();
   }
 
   /**
@@ -184,7 +194,7 @@ public abstract class CliCommandTestBase extends JUnit4CacheTestCase {
    * @param cache Cache to use when creating the management service
    */
   private void verifyManagementServiceStarted(Cache cache) {
-    assert (cache != null);
+    assertTrue(cache != null);
 
     this.managementService = ManagementService.getExistingManagementService(cache);
     assertNotNull(this.managementService);
@@ -218,35 +228,39 @@ public abstract class CliCommandTestBase extends JUnit4CacheTestCase {
   }
 
   /**
-   * Connect the default shell to the default JMX server.
-   *
-   * @return The default shell.
-   */
-  private HeadlessGfsh defaultShellConnect() {
-    HeadlessGfsh shell = getDefaultShell();
-    shellConnect(this.jmxHost, this.jmxPort, this.httpPort, shell);
-    return shell;
-  }
-
-  /**
    * Connect a shell to the JMX server at the given host and port
    *
+   *
    * @param host    Host of the JMX server
    * @param jmxPort Port of the JMX server
    * @param shell   Shell to connect
    */
   protected void shellConnect(final String host, final int jmxPort, final int httpPort, HeadlessGfsh shell) {
-    assert (host != null);
-    assert (shell != null);
+    assertTrue(host != null);
+    assertTrue(shell != null);
+
+    CommandResult result = connect(host, jmxPort, httpPort, shell);
+    if (!shell.isConnectedAndReady()) {
+      throw new AssertionError(
+          "Connect command failed to connect to manager, result=" + commandResultToString(result));
+    }
+    info("Successfully connected to managing node using " + (useHttpOnConnect ? "HTTP" : "JMX"));
+    assertEquals(true, shell.isConnectedAndReady());
+  }
+
+  protected CommandResult shellConnect(){
+    return connect(this.jmxHost, this.jmxPort, this.httpPort, getDefaultShell());
+  }
 
+  protected CommandResult connect(final String host, final int jmxPort, final int httpPort, HeadlessGfsh shell){
     final CommandStringBuilder command = new CommandStringBuilder(CliStrings.CONNECT);
-    String endpoint;
 
-    if(jsonAuthorization!=null) {
-      command.addOption(CliStrings.CONNECT__USERNAME, "super-user");
-      command.addOption(CliStrings.CONNECT__PASSWORD, "1234567");
+    if(enableAuth) {
+      command.addOption(CliStrings.CONNECT__USERNAME, username);
+      command.addOption(CliStrings.CONNECT__PASSWORD, password);
     }
 
+    String endpoint;
     if (useHttpOnConnect) {
       endpoint = "http://" + host + ":" + httpPort + "/gemfire/v1";
       command.addOption(CliStrings.CONNECT__USE_HTTP, Boolean.TRUE.toString());
@@ -257,15 +271,7 @@ public abstract class CliCommandTestBase extends JUnit4CacheTestCase {
     }
     System.out.println(getClass().getSimpleName()+" using endpoint: "+endpoint);
 
-    CommandResult result = executeCommand(shell, command.toString());
-
-    if (!shell.isConnectedAndReady()) {
-      throw new AssertionError(
-          "Connect command failed to connect to manager " + endpoint + " result=" + commandResultToString(result));
-    }
-
-    info("Successfully connected to managing node using " + (useHttpOnConnect ? "HTTP" : "JMX"));
-    assertEquals(true, shell.isConnectedAndReady());
+    return executeCommand(shell, command.toString());
   }
 
   /**

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/2322827b/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 8481688..e528bb5 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
@@ -44,6 +44,8 @@ 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 org.junit.runner.RunWith;
+import org.junit.runners.Parameterized;
 
 import java.io.File;
 import java.io.FileReader;
@@ -67,6 +69,7 @@ import static com.gemstone.gemfire.test.dunit.Wait.waitForCriterion;
  * @since 7.0
  */
 @Category(DistributedTest.class)
+@RunWith(Parameterized.class)
 @SuppressWarnings("serial")
 public class ConfigCommandsDUnitTest extends CliCommandTestBase {
 
@@ -81,8 +84,8 @@ public class ConfigCommandsDUnitTest extends CliCommandTestBase {
   File subDir = new File("ConfigCommandsDUnitTestSubDir");
   File subManagerConfigFile = new File(subDir, managerConfigFile.getName());
 
-  public ConfigCommandsDUnitTest(boolean useHttpOnConnect, String jsonAuthorization) {
-    super(useHttpOnConnect, jsonAuthorization);
+  public ConfigCommandsDUnitTest(boolean useHttpOnConnect, boolean enableAuth) {
+    super(useHttpOnConnect, enableAuth);
   }
 
   @Override
@@ -103,7 +106,7 @@ public class ConfigCommandsDUnitTest extends CliCommandTestBase {
 
   @Test
   public void testDescribeConfig() throws ClassNotFoundException, IOException {
-    createDefaultSetup(null);
+    setUpJmxManagerOnVm0ThenConnect(null);
     final String controllerName = "Member2";
 
     /***
@@ -170,7 +173,7 @@ public class ConfigCommandsDUnitTest extends CliCommandTestBase {
     Properties localProps = new Properties();
     localProps.setProperty(DistributionConfig.NAME_NAME, "Manager");
     localProps.setProperty(DistributionConfig.GROUPS_NAME, "Group1");
-    createDefaultSetup(localProps);
+    setUpJmxManagerOnVm0ThenConnect(localProps);
 
     // Create a cache in another VM (VM1)
     Host.getHost(0).getVM(1).invoke(new SerializableRunnable() {
@@ -266,7 +269,7 @@ public class ConfigCommandsDUnitTest extends CliCommandTestBase {
   @Test
   public void testAlterRuntimeConfig() throws ClassNotFoundException, IOException {
     final String controller = "controller";
-    createDefaultSetup(null);
+    setUpJmxManagerOnVm0ThenConnect(null);
     Properties localProps = new Properties();
     localProps.setProperty(DistributionConfig.NAME_NAME, controller);
     localProps.setProperty(DistributionConfig.LOG_LEVEL_NAME, "error");
@@ -305,7 +308,7 @@ public class ConfigCommandsDUnitTest extends CliCommandTestBase {
   public void testAlterRuntimeConfigRandom() {
     final String member1 = "VM1";
     final String controller = "controller";
-    createDefaultSetup(null);
+    setUpJmxManagerOnVm0ThenConnect(null);
     Properties localProps = new Properties();
     localProps.setProperty(DistributionConfig.NAME_NAME, controller);
     localProps.setProperty(DistributionConfig.LOG_LEVEL_NAME, "error");
@@ -344,7 +347,7 @@ public class ConfigCommandsDUnitTest extends CliCommandTestBase {
   public void testAlterRuntimeConfigOnAllMembers() {
     final String member1 = "VM1";
     final String controller = "controller";
-    createDefaultSetup(null);
+    setUpJmxManagerOnVm0ThenConnect(null);
     Properties localProps = new Properties();
     localProps.setProperty(DistributionConfig.NAME_NAME, controller);
     localProps.setProperty(DistributionConfig.LOG_LEVEL_NAME, "error");
@@ -447,7 +450,7 @@ public class ConfigCommandsDUnitTest extends CliCommandTestBase {
     Properties managerProps = new Properties();
     managerProps.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
     managerProps.setProperty(DistributionConfig.LOCATORS_NAME, "localhost:" + locatorPort);
-    createDefaultSetup(managerProps);
+    setUpJmxManagerOnVm0ThenConnect(managerProps);
 
     // Create a cache in VM 1
     VM vm = Host.getHost(0).getVM(1);

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/2322827b/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 0718f53..17c0c85 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
@@ -52,6 +52,8 @@ import org.junit.Ignore;
 import org.junit.Rule;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
+import org.junit.runner.RunWith;
+import org.junit.runners.Parameterized;
 
 import javax.management.MBeanServer;
 import javax.management.MalformedObjectNameException;
@@ -73,6 +75,7 @@ import static com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter;
 import static com.jayway.awaitility.Awaitility.waitAtMost;
 
 @Category({ DistributedTest.class, FlakyTest.class }) // GEODE-973
+@RunWith(Parameterized.class)
 public class CreateAlterDestroyRegionCommandsDUnitTest extends CliCommandTestBase {
 
   private static final long serialVersionUID = 1L;
@@ -95,8 +98,8 @@ public class CreateAlterDestroyRegionCommandsDUnitTest extends CliCommandTestBas
   @Rule
   public RetryRule retryRule = new RetryRule();
 
-  public CreateAlterDestroyRegionCommandsDUnitTest(boolean useHttpOnConnect, String jsonAuthorization){
-    super(useHttpOnConnect, jsonAuthorization);
+  public CreateAlterDestroyRegionCommandsDUnitTest(boolean useHttpOnConnect, boolean enableAuth){
+    super(useHttpOnConnect, enableAuth);
   }
 
   /**
@@ -104,7 +107,7 @@ public class CreateAlterDestroyRegionCommandsDUnitTest extends CliCommandTestBas
    */
   @Test
   public void testCreateRegionWithGoodCompressor() {
-    createDefaultSetup(null);
+    setUpJmxManagerOnVm0ThenConnect(null);
     VM vm = Host.getHost(0).getVM(1);
 
     // Create a cache in vm 1
@@ -140,7 +143,7 @@ public class CreateAlterDestroyRegionCommandsDUnitTest extends CliCommandTestBas
    */
   @Test
   public void testCreateRegionWithBadCompressor() {
-    createDefaultSetup(null);
+    setUpJmxManagerOnVm0ThenConnect(null);
 
     VM vm = Host.getHost(0).getVM(1);
 
@@ -170,7 +173,7 @@ public class CreateAlterDestroyRegionCommandsDUnitTest extends CliCommandTestBas
    */
   @Test
   public void testCreateRegionWithNoCompressor() {
-    createDefaultSetup(null);
+    setUpJmxManagerOnVm0ThenConnect(null);
 
     VM vm = Host.getHost(0).getVM(1);
 
@@ -202,7 +205,7 @@ public class CreateAlterDestroyRegionCommandsDUnitTest extends CliCommandTestBas
 
   @Test
   public void testDestroyDistributedRegion() {
-    createDefaultSetup(null);
+    setUpJmxManagerOnVm0ThenConnect(null);
 
     for (int i = 1; i <= 2; i++) {
       Host.getHost(0).getVM(i).invoke(() -> {
@@ -258,7 +261,7 @@ public class CreateAlterDestroyRegionCommandsDUnitTest extends CliCommandTestBas
 
   @Test
   public void testDestroyLocalRegions() {
-    createDefaultSetup(null);
+    setUpJmxManagerOnVm0ThenConnect(null);
 
     for (int i = 1; i <= 3; i++) {
       Host.getHost(0).getVM(i).invoke(() -> {
@@ -299,7 +302,7 @@ public class CreateAlterDestroyRegionCommandsDUnitTest extends CliCommandTestBas
 
   @Test
   public void testDestroyLocalAndDistributedRegions() {
-    createDefaultSetup(null);
+    setUpJmxManagerOnVm0ThenConnect(null);
 
     for (int i = 1; i <= 2; i++) {
       Host.getHost(0).getVM(i).invoke(() -> {
@@ -367,7 +370,7 @@ public class CreateAlterDestroyRegionCommandsDUnitTest extends CliCommandTestBas
   @Test
   @Retry(2) // GEODE-973: getRandomAvailablePort
   public void testCreateRegion46391() throws IOException {
-    createDefaultSetup(null); // GEODE-973: getRandomAvailablePort
+    setUpJmxManagerOnVm0ThenConnect(null); // GEODE-973: getRandomAvailablePort
     String command = CliStrings.CREATE_REGION + " --" + CliStrings.CREATE_REGION__REGION + "=" + this.region46391 + " --" + CliStrings.CREATE_REGION__REGIONSHORTCUT + "=REPLICATE";
 
     getLogWriter().info("testCreateRegion46391 create region command=" + command);
@@ -401,7 +404,7 @@ public class CreateAlterDestroyRegionCommandsDUnitTest extends CliCommandTestBas
   @Ignore("bug51924")
   @Test
   public void testAlterRegion() throws IOException {
-    createDefaultSetup(null);
+    setUpJmxManagerOnVm0ThenConnect(null);
 
     CommandResult cmdResult = executeCommand(CliStrings.LIST_REGION);
     assertEquals(Result.Status.OK, cmdResult.getStatus());
@@ -803,7 +806,7 @@ public class CreateAlterDestroyRegionCommandsDUnitTest extends CliCommandTestBas
     Properties managerProps = new Properties();
     managerProps.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
     managerProps.setProperty(DistributionConfig.LOCATORS_NAME, "localhost:" + locatorPort);
-    createDefaultSetup(managerProps);
+    setUpJmxManagerOnVm0ThenConnect(managerProps);
 
     // Create a cache in VM 1
     VM vm = Host.getHost(0).getVM(1);
@@ -937,7 +940,7 @@ public class CreateAlterDestroyRegionCommandsDUnitTest extends CliCommandTestBas
     Properties managerProps = new Properties();
     managerProps.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
     managerProps.setProperty(DistributionConfig.LOCATORS_NAME, "localhost:" + locatorPort);
-    createDefaultSetup(managerProps);
+    setUpJmxManagerOnVm0ThenConnect(managerProps);
 
     // Create a cache in VM 1
     VM vm = Host.getHost(0).getVM(1);

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/2322827b/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 1888872..b81b080 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
@@ -38,6 +38,8 @@ import com.gemstone.gemfire.test.dunit.WaitCriterion;
 import com.gemstone.gemfire.test.junit.categories.DistributedTest;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
+import org.junit.runner.RunWith;
+import org.junit.runners.Parameterized;
 
 import java.io.File;
 import java.io.FilenameFilter;
@@ -54,6 +56,7 @@ import static com.gemstone.gemfire.test.dunit.Assert.*;
  */
 @Category(DistributedTest.class)
 @SuppressWarnings("serial")
+@RunWith(Parameterized.class)
 public class DeployCommandsDUnitTest extends CliCommandTestBase {
 
   File newDeployableJarFile = new File("DeployCommandsDUnit1.jar");
@@ -61,8 +64,8 @@ public class DeployCommandsDUnitTest extends CliCommandTestBase {
   transient private ClassBuilder classBuilder = new ClassBuilder();
   transient private CommandProcessor commandProcessor;
 
-  public DeployCommandsDUnitTest(boolean useHttpOnConnect, String jsonAuthorization){
-    super(useHttpOnConnect, jsonAuthorization);
+  public DeployCommandsDUnitTest(boolean useHttpOnConnect, boolean enableAuth){
+    super(useHttpOnConnect, enableAuth);
   }
 
   @Override
@@ -370,7 +373,7 @@ public class DeployCommandsDUnitTest extends CliCommandTestBase {
     managerProps.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
     managerProps.setProperty(DistributionConfig.GROUPS_NAME, groupName);
     managerProps.setProperty(DistributionConfig.LOCATORS_NAME, "localhost:" + locatorPort);
-    createDefaultSetup(managerProps);
+    setUpJmxManagerOnVm0ThenConnect(managerProps);
 
     // Create a JAR file
     this.classBuilder.writeJarFromName("DeployCommandsDUnitA", this.newDeployableJarFile);

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/2322827b/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 a8e667b..2fe08c9 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
@@ -54,6 +54,8 @@ import com.gemstone.gemfire.test.dunit.WaitCriterion;
 import com.gemstone.gemfire.test.junit.categories.DistributedTest;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
+import org.junit.runner.RunWith;
+import org.junit.runners.Parameterized;
 
 import java.io.File;
 import java.io.IOException;
@@ -80,19 +82,20 @@ import static com.gemstone.gemfire.test.dunit.Wait.waitForCriterion;
  */
 @Category(DistributedTest.class)
 @SuppressWarnings("serial")
+@RunWith(Parameterized.class)
 public class DiskStoreCommandsDUnitTest extends CliCommandTestBase {
 
   final List<String> filesToBeDeleted = new CopyOnWriteArrayList<String>();
 
-  public DiskStoreCommandsDUnitTest(boolean useHttpOnConnect, String jsonAuthorization){
-    super(useHttpOnConnect, jsonAuthorization);
+  public DiskStoreCommandsDUnitTest(boolean useHttpOnConnect, boolean enableAuth){
+    super(useHttpOnConnect, enableAuth);
   }
 
   @Test
   public void testMissingDiskStore() {
     final String regionName = "testShowMissingDiskStoreRegion";
 
-    createDefaultSetup(null);
+    setUpJmxManagerOnVm0ThenConnect(null);
 
     final VM vm0 = Host.getHost(0).getVM(0);
     final VM vm1 = Host.getHost(0).getVM(1);
@@ -245,7 +248,7 @@ public class DiskStoreCommandsDUnitTest extends CliCommandTestBase {
 
   @Test
   public void testDescribeOfflineDiskStore() {
-    createDefaultSetup(null);
+    setUpJmxManagerOnVm0ThenConnect(null);
 
     final File diskStoreDir = new File(new File(".").getAbsolutePath(), "DiskStoreCommandDUnitDiskStores");
     diskStoreDir.mkdir();
@@ -343,7 +346,7 @@ public class DiskStoreCommandsDUnitTest extends CliCommandTestBase {
 
   @Test
   public void testValidateDiskStore() {
-    createDefaultSetup(null);
+    setUpJmxManagerOnVm0ThenConnect(null);
 
     final File diskStoreDir = new File(new File(".").getAbsolutePath(), "DiskStoreCommandDUnitDiskStores");
     diskStoreDir.mkdir();
@@ -390,7 +393,7 @@ public class DiskStoreCommandsDUnitTest extends CliCommandTestBase {
 
   @Test
   public void testExportOfflineDiskStore() throws Exception {
-    createDefaultSetup(null);
+    setUpJmxManagerOnVm0ThenConnect(null);
 
     final File diskStoreDir = new File(new File(".").getAbsolutePath(), "DiskStoreCommandDUnitDiskStores");
     diskStoreDir.mkdir();
@@ -491,7 +494,7 @@ public class DiskStoreCommandsDUnitTest extends CliCommandTestBase {
     Properties managerProps = new Properties();
     managerProps.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
     managerProps.setProperty(DistributionConfig.LOCATORS_NAME, "localhost:" + locatorPort);
-    createDefaultSetup(managerProps);
+    setUpJmxManagerOnVm0ThenConnect(managerProps);
 
     // Create a cache in VM 1
     final File diskStoreDir = new File(new File(".").getAbsolutePath(), diskStoreName);
@@ -647,7 +650,7 @@ public class DiskStoreCommandsDUnitTest extends CliCommandTestBase {
     disconnectAllFromDS();
 
     //Now do the command execution
-    createDefaultSetup(null);
+    setUpJmxManagerOnVm0ThenConnect(null);
     Gfsh gfshInstance = Gfsh.getCurrentInstance();
 
     if (gfshInstance == null) {
@@ -748,7 +751,7 @@ public class DiskStoreCommandsDUnitTest extends CliCommandTestBase {
     final String incrementalBackUpName = "incrementalBackUp";
     final VM manager = Host.getHost(0).getVM(0);
     final VM vm1 = Host.getHost(0).getVM(1);
-    createDefaultSetup(null);
+    setUpJmxManagerOnVm0ThenConnect(null);
 
 
     File controllerDiskDir = new File(controllerDiskDirName);
@@ -841,7 +844,7 @@ public class DiskStoreCommandsDUnitTest extends CliCommandTestBase {
 
     Properties localProps = new Properties();
     localProps.setProperty(DistributionConfig.GROUPS_NAME, "Group0");
-    createDefaultSetup(localProps);
+    setUpJmxManagerOnVm0ThenConnect(localProps);
 
     CommandResult cmdResult = executeCommand(CliStrings.LIST_DISK_STORE);
     assertEquals(Result.Status.OK, cmdResult.getStatus());
@@ -960,7 +963,7 @@ public class DiskStoreCommandsDUnitTest extends CliCommandTestBase {
 
     Properties localProps = new Properties();
     localProps.setProperty(DistributionConfig.GROUPS_NAME, "Group0");
-    createDefaultSetup(localProps);
+    setUpJmxManagerOnVm0ThenConnect(localProps);
 
     CommandResult cmdResult = executeCommand(CliStrings.LIST_DISK_STORE);
     assertEquals(Result.Status.OK, cmdResult.getStatus());

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/2322827b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/FunctionCommandsDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/FunctionCommandsDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/FunctionCommandsDUnitTest.java
index 6c89247..3e68e8b 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/FunctionCommandsDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/FunctionCommandsDUnitTest.java
@@ -39,6 +39,8 @@ import com.gemstone.gemfire.test.dunit.WaitCriterion;
 import com.gemstone.gemfire.test.junit.categories.DistributedTest;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
+import org.junit.runner.RunWith;
+import org.junit.runners.Parameterized;
 
 import java.util.List;
 import java.util.Properties;
@@ -51,6 +53,7 @@ import static com.gemstone.gemfire.test.dunit.Wait.waitForCriterion;
  * Dunit class for testing gemfire function commands : execute function, destroy function, list function
  */
 @Category(DistributedTest.class)
+@RunWith(Parameterized.class)
 public class FunctionCommandsDUnitTest extends CliCommandTestBase {
 
   private static final long serialVersionUID = 1L;
@@ -58,14 +61,14 @@ public class FunctionCommandsDUnitTest extends CliCommandTestBase {
   private static final String REGION_ONE = "RegionOne";
   private static final String REGION_TWO = "RegionTwo";
 
-  public FunctionCommandsDUnitTest(boolean useHttpOnConnect, String jsonAuthorization){
-    super(useHttpOnConnect, jsonAuthorization);
+  public FunctionCommandsDUnitTest(boolean useHttpOnConnect, boolean enableAuth){
+    super(useHttpOnConnect, enableAuth);
   }
 
   void setupWith2Regions() {
     final VM vm1 = Host.getHost(0).getVM(1);
     final VM vm2 = Host.getHost(0).getVM(2);
-    createDefaultSetup(null);
+    setUpJmxManagerOnVm0ThenConnect(null);
 
     vm1.invoke(new SerializableRunnable() {
       public void run() {
@@ -140,7 +143,7 @@ public class FunctionCommandsDUnitTest extends CliCommandTestBase {
 
   @Test
   public void testExecuteFunctionOnRegion() {
-    createDefaultSetup(null);
+    setUpJmxManagerOnVm0ThenConnect(null);
 
     final Function function = new TestFunction(true, TestFunction.TEST_FUNCTION1);
     Host.getHost(0).getVM(0).invoke(new SerializableRunnable() {
@@ -168,7 +171,7 @@ public class FunctionCommandsDUnitTest extends CliCommandTestBase {
 
   void setupForBug51480() {
     final VM vm1 = Host.getHost(0).getVM(1);
-    createDefaultSetup(null);
+    setUpJmxManagerOnVm0ThenConnect(null);
     vm1.invoke(new SerializableRunnable() {
       public void run() {
         final Function function = new TestFunction(true, TestFunction.TEST_FUNCTION1);
@@ -249,7 +252,7 @@ public class FunctionCommandsDUnitTest extends CliCommandTestBase {
     Properties localProps = new Properties();
     localProps.setProperty(DistributionConfig.NAME_NAME, "Manager");
     localProps.setProperty(DistributionConfig.GROUPS_NAME, "Group1");
-    createDefaultSetup(localProps);
+    setUpJmxManagerOnVm0ThenConnect(localProps);
     Function function = new TestFunction(true, TestFunction.TEST_FUNCTION1);
     FunctionService.registerFunction(function);
     final VM vm1 = Host.getHost(0).getVM(1);
@@ -280,7 +283,7 @@ public class FunctionCommandsDUnitTest extends CliCommandTestBase {
     Properties localProps = new Properties();
     localProps.setProperty(DistributionConfig.NAME_NAME, "Manager");
     localProps.setProperty(DistributionConfig.GROUPS_NAME, "Group1");
-    createDefaultSetup(localProps);
+    setUpJmxManagerOnVm0ThenConnect(localProps);
     Function function = new TestFunction(true, TestFunction.TEST_FUNCTION1);
     FunctionService.registerFunction(function);
     final VM vm1 = Host.getHost(0).getVM(1);
@@ -314,7 +317,7 @@ public class FunctionCommandsDUnitTest extends CliCommandTestBase {
     Properties localProps = new Properties();
     localProps.setProperty(DistributionConfig.NAME_NAME, "Manager");
     localProps.setProperty(DistributionConfig.GROUPS_NAME, "Group1");
-    createDefaultSetup(localProps);
+    setUpJmxManagerOnVm0ThenConnect(localProps);
     Function function = new TestFunction(true, TestFunction.TEST_FUNCTION_RETURN_ARGS);
     FunctionService.registerFunction(function);
 
@@ -350,7 +353,7 @@ public class FunctionCommandsDUnitTest extends CliCommandTestBase {
     Properties localProps = new Properties();
     localProps.setProperty(DistributionConfig.NAME_NAME, "Manager");
     localProps.setProperty(DistributionConfig.GROUPS_NAME, "Group0");
-    createDefaultSetup(localProps);
+    setUpJmxManagerOnVm0ThenConnect(localProps);
     Function function = new TestFunction(true, TestFunction.TEST_FUNCTION1);
     FunctionService.registerFunction(function);
 
@@ -406,7 +409,7 @@ public class FunctionCommandsDUnitTest extends CliCommandTestBase {
 
   @Test
   public void testDestroyOnMember() {
-    createDefaultSetup(null);
+    setUpJmxManagerOnVm0ThenConnect(null);
     Function function = new TestFunction(true, TestFunction.TEST_FUNCTION1);
     FunctionService.registerFunction(function);
     final VM vm1 = Host.getHost(0).getVM(1);
@@ -429,7 +432,7 @@ public class FunctionCommandsDUnitTest extends CliCommandTestBase {
     Properties localProps = new Properties();
     localProps.setProperty(DistributionConfig.NAME_NAME, "Manager");
     localProps.setProperty(DistributionConfig.GROUPS_NAME, "Group0");
-    createDefaultSetup(localProps);
+    setUpJmxManagerOnVm0ThenConnect(localProps);
     Function function = new TestFunction(true, TestFunction.TEST_FUNCTION1);
     FunctionService.registerFunction(function);
 
@@ -493,7 +496,7 @@ public class FunctionCommandsDUnitTest extends CliCommandTestBase {
     // Create the default setup, putting the Manager VM into Group1
     Properties localProps = new Properties();
     localProps.setProperty(DistributionConfig.GROUPS_NAME, "Group1");
-    createDefaultSetup(localProps);
+    setUpJmxManagerOnVm0ThenConnect(localProps);
 
     // Find no functions
     CommandResult cmdResult = executeCommand(CliStrings.LIST_FUNCTION);

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/2322827b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/GemfireDataCommandsDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/GemfireDataCommandsDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/GemfireDataCommandsDUnitTest.java
index d07b33e..7a81f18 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/GemfireDataCommandsDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/GemfireDataCommandsDUnitTest.java
@@ -63,6 +63,8 @@ import com.gemstone.gemfire.test.dunit.WaitCriterion;
 import com.gemstone.gemfire.test.junit.categories.DistributedTest;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
+import org.junit.runner.RunWith;
+import org.junit.runners.Parameterized;
 
 import java.io.File;
 import java.io.IOException;
@@ -86,6 +88,7 @@ import static com.gemstone.gemfire.test.dunit.Wait.waitForCriterion;
  */
 @Category(DistributedTest.class)
 @SuppressWarnings("serial")
+@RunWith(Parameterized.class)
 public class GemfireDataCommandsDUnitTest extends CliCommandTestBase {
 
   private static final long serialVersionUID = 1L;
@@ -118,8 +121,8 @@ public class GemfireDataCommandsDUnitTest extends CliCommandTestBase {
 
   final static int COUNT = 5;
 
-  public GemfireDataCommandsDUnitTest(boolean useHttpOnConnect, String jsonAuthorization){
-    super(useHttpOnConnect, jsonAuthorization);
+  public GemfireDataCommandsDUnitTest(boolean useHttpOnConnect, boolean enableAuth){
+    super(useHttpOnConnect, enableAuth);
   }
 
   public String getMemberId() {
@@ -132,7 +135,7 @@ public class GemfireDataCommandsDUnitTest extends CliCommandTestBase {
     final VM vm2 = Host.getHost(0).getVM(2);
     Properties props = new Properties();
     props.setProperty(DistributionConfig.NAME_NAME, testName + "Manager");
-    HeadlessGfsh gfsh = createDefaultSetup(props);
+    HeadlessGfsh gfsh = setUpJmxManagerOnVm0ThenConnect(props);
     assertNotNull(gfsh);
     assertEquals(true, gfsh.isConnectedAndReady());
 
@@ -1550,7 +1553,7 @@ public class GemfireDataCommandsDUnitTest extends CliCommandTestBase {
       }
       exportFile.deleteOnExit();
 
-      createDefaultSetup(null);
+      setUpJmxManagerOnVm0ThenConnect(null);
 
       manager.invoke(new SerializableCallable() {
         public Object call() {
@@ -1650,7 +1653,7 @@ public class GemfireDataCommandsDUnitTest extends CliCommandTestBase {
   void setupWith2Regions() {
     final VM vm1 = Host.getHost(0).getVM(1);
     final VM vm2 = Host.getHost(0).getVM(2);
-    createDefaultSetup(null);
+    setUpJmxManagerOnVm0ThenConnect(null);
 
     vm1.invoke(new SerializableRunnable() {
       public void run() {
@@ -1879,7 +1882,7 @@ public class GemfireDataCommandsDUnitTest extends CliCommandTestBase {
   void setupTestRebalanceForEntireDS() {
     final VM vm1 = Host.getHost(0).getVM(1);
     final VM vm2 = Host.getHost(0).getVM(2);
-    createDefaultSetup(null);
+    setUpJmxManagerOnVm0ThenConnect(null);
 
     vm1.invoke(new SerializableRunnable() {
       public void run() {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/2322827b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/GetCommandOnRegionWithCacheLoaderDuringCacheMissDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/GetCommandOnRegionWithCacheLoaderDuringCacheMissDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/GetCommandOnRegionWithCacheLoaderDuringCacheMissDUnitTest.java
index b2e98b5..097269d 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/GetCommandOnRegionWithCacheLoaderDuringCacheMissDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/GetCommandOnRegionWithCacheLoaderDuringCacheMissDUnitTest.java
@@ -42,6 +42,8 @@ import com.gemstone.gemfire.test.dunit.WaitCriterion;
 import com.gemstone.gemfire.test.junit.categories.DistributedTest;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
+import org.junit.runner.RunWith;
+import org.junit.runners.Parameterized;
 
 import java.io.Serializable;
 import java.util.HashMap;
@@ -63,6 +65,7 @@ import static com.gemstone.gemfire.test.dunit.Wait.waitForCriterion;
  */
 @SuppressWarnings("unused")
 @Category(DistributedTest.class)
+@RunWith(Parameterized.class)
 public class GetCommandOnRegionWithCacheLoaderDuringCacheMissDUnitTest extends CliCommandTestBase {
 
   private static final String GEMFIRE_MANAGER_NAME = "GemManagerNode";
@@ -71,8 +74,8 @@ public class GetCommandOnRegionWithCacheLoaderDuringCacheMissDUnitTest extends C
   private static final String USERS_REGION_NAME = "Users";
 
 
-  public GetCommandOnRegionWithCacheLoaderDuringCacheMissDUnitTest(boolean useHttpOnConnect, String jsonAuthorization){
-    super(useHttpOnConnect, jsonAuthorization);
+  public GetCommandOnRegionWithCacheLoaderDuringCacheMissDUnitTest(boolean useHttpOnConnect, boolean enableAuth){
+    super(useHttpOnConnect, enableAuth);
   }
 
   protected static String getRegionPath(final String regionName) {
@@ -96,7 +99,7 @@ public class GetCommandOnRegionWithCacheLoaderDuringCacheMissDUnitTest extends C
   @Override
   public final void postSetUp() throws Exception {
     Properties managerDistributedSystemProperties = createDistributedSystemProperties(GEMFIRE_MANAGER_NAME);
-    HeadlessGfsh gfsh = createDefaultSetup(managerDistributedSystemProperties);
+    HeadlessGfsh gfsh = setUpJmxManagerOnVm0ThenConnect(managerDistributedSystemProperties);
 
     assertNotNull(gfsh);
     assertTrue(gfsh.isConnectedAndReady());

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/2322827b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/IndexCommandsDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/IndexCommandsDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/IndexCommandsDUnitTest.java
index fbe9323..e2c8e2e 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/IndexCommandsDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/IndexCommandsDUnitTest.java
@@ -47,6 +47,8 @@ import com.gemstone.gemfire.test.junit.categories.DistributedTest;
 import com.gemstone.gemfire.test.junit.categories.FlakyTest;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
+import org.junit.runner.RunWith;
+import org.junit.runners.Parameterized;
 
 import java.io.File;
 import java.io.IOException;
@@ -55,6 +57,7 @@ import java.util.Properties;
 import static com.gemstone.gemfire.test.dunit.Assert.*;
 
 @Category({ DistributedTest.class, FlakyTest.class }) // see GEODE-689, GEODE-1048
+@RunWith(Parameterized.class)
 public class IndexCommandsDUnitTest extends CliCommandTestBase {
 
   private static final long serialVersionUID = 1L;
@@ -64,8 +67,8 @@ public class IndexCommandsDUnitTest extends CliCommandTestBase {
   private static final String parRegPersName = "ParRegPers";
   private static final String repRegPersName = "RepRegPer";
 
-  public IndexCommandsDUnitTest(boolean useHttpOnConnect, String jsonAuthorization) {
-    super(useHttpOnConnect, jsonAuthorization);
+  public IndexCommandsDUnitTest(boolean useHttpOnConnect, boolean enableAuth) {
+    super(useHttpOnConnect, enableAuth);
   }
 
   Region<?, ?> createParReg(String regionName, Cache cache, Class keyConstraint, Class valueConstraint) {
@@ -645,7 +648,7 @@ public class IndexCommandsDUnitTest extends CliCommandTestBase {
     Properties managerProps = new Properties();
     managerProps.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
     managerProps.setProperty(DistributionConfig.LOCATORS_NAME, "localhost:" + locatorPort);
-    createDefaultSetup(managerProps);
+    setUpJmxManagerOnVm0ThenConnect(managerProps);
 
     // Create a cache in VM 1
     VM vm = Host.getHost(0).getVM(1);
@@ -763,7 +766,7 @@ public class IndexCommandsDUnitTest extends CliCommandTestBase {
 
   private void setupSystem() {
     disconnectAllFromDS();
-    createDefaultSetup(null);
+    setUpJmxManagerOnVm0ThenConnect(null);
     final String parRegName = "StocksParReg";
 
     final VM manager = Host.getHost(0).getVM(0);
@@ -793,7 +796,7 @@ public class IndexCommandsDUnitTest extends CliCommandTestBase {
 
   private void setupSystemPersist() {
     disconnectAllFromDS();
-    createDefaultSetup(null);
+    setUpJmxManagerOnVm0ThenConnect(null);
     final String parRegName = "StocksParReg";
 
     final VM manager = Host.getHost(0).getVM(0);

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/2322827b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ListAndDescribeDiskStoreCommandsDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ListAndDescribeDiskStoreCommandsDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ListAndDescribeDiskStoreCommandsDUnitTest.java
index 0224982..2ac3bd2 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ListAndDescribeDiskStoreCommandsDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ListAndDescribeDiskStoreCommandsDUnitTest.java
@@ -32,6 +32,8 @@ import com.gemstone.gemfire.test.dunit.VM;
 import com.gemstone.gemfire.test.junit.categories.DistributedTest;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
+import org.junit.runner.RunWith;
+import org.junit.runners.Parameterized;
 
 import java.io.Serializable;
 import java.util.Properties;
@@ -50,10 +52,11 @@ import static com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter;
  * @since 7.0
  */
 @Category(DistributedTest.class)
+@RunWith(Parameterized.class)
 public class ListAndDescribeDiskStoreCommandsDUnitTest extends CliCommandTestBase {
 
-  public ListAndDescribeDiskStoreCommandsDUnitTest(boolean useHttpOnConnect, String jsonAuthorization) {
-    super(useHttpOnConnect, jsonAuthorization);
+  public ListAndDescribeDiskStoreCommandsDUnitTest(boolean useHttpOnConnect, boolean enableAuth) {
+    super(useHttpOnConnect, enableAuth);
   }
 
   protected static String toString(final Result result) {
@@ -71,7 +74,7 @@ public class ListAndDescribeDiskStoreCommandsDUnitTest extends CliCommandTestBas
 
   @Override
   public final void postSetUp() throws Exception {
-    createDefaultSetup(null);
+    setUpJmxManagerOnVm0ThenConnect(null);
     setupGemFire();
   }
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/2322827b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ListAndDescribeRegionDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ListAndDescribeRegionDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ListAndDescribeRegionDUnitTest.java
index bf8e913..627cbf0 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ListAndDescribeRegionDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ListAndDescribeRegionDUnitTest.java
@@ -40,6 +40,8 @@ import com.gemstone.gemfire.test.dunit.VM;
 import com.gemstone.gemfire.test.junit.categories.DistributedTest;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
+import org.junit.runner.RunWith;
+import org.junit.runners.Parameterized;
 
 import java.util.Properties;
 
@@ -47,6 +49,7 @@ import static com.gemstone.gemfire.test.dunit.Assert.*;
 import static com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter;
 
 @Category(DistributedTest.class)
+@RunWith(Parameterized.class)
 public class ListAndDescribeRegionDUnitTest extends CliCommandTestBase {
 
   private static final String REGION1 = "region1";
@@ -58,8 +61,8 @@ public class ListAndDescribeRegionDUnitTest extends CliCommandTestBase {
   private static final String PR1 = "PR1";
   private static final String LOCALREGIONONMANAGER = "LocalRegionOnManager";
 
-  public ListAndDescribeRegionDUnitTest(boolean useHttpOnConnect, String jsonAuthorization) {
-    super(useHttpOnConnect, jsonAuthorization);
+  public ListAndDescribeRegionDUnitTest(boolean useHttpOnConnect, boolean enableAuth) {
+    super(useHttpOnConnect, enableAuth);
   }
 
   static class CacheListener2 extends CacheListenerAdapter {
@@ -88,7 +91,7 @@ public class ListAndDescribeRegionDUnitTest extends CliCommandTestBase {
 
   private void setupSystem() {
     final Properties managerProps = createProperties("Manager", "G1");
-    createDefaultSetup(managerProps);
+    setUpJmxManagerOnVm0ThenConnect(managerProps);
 
     final Properties server1Props = createProperties("Server1", "G2");
     final Host host = Host.getHost(0);

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/2322827b/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 356445d..3a9f29e 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
@@ -39,6 +39,8 @@ import com.gemstone.gemfire.test.dunit.VM;
 import com.gemstone.gemfire.test.junit.categories.DistributedTest;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
+import org.junit.runner.RunWith;
+import org.junit.runners.Parameterized;
 
 import java.io.Serializable;
 import java.util.ArrayList;
@@ -66,14 +68,15 @@ import static com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter;
  */
 @SuppressWarnings("unused")
 @Category(DistributedTest.class)
+@RunWith(Parameterized.class)
 public class ListIndexCommandDUnitTest extends CliCommandTestBase {
 
   protected static final int DEFAULT_REGION_INITIAL_CAPACITY = 10000;
 
   private final AtomicLong idGenerator = new AtomicLong(0l);
 
-  public ListIndexCommandDUnitTest(boolean useHttpOnConnect, String jsonAuthorization) {
-    super(useHttpOnConnect, jsonAuthorization);
+  public ListIndexCommandDUnitTest(boolean useHttpOnConnect, boolean enableAuth) {
+    super(useHttpOnConnect, enableAuth);
   }
 
   protected static String toString(final Result result) {
@@ -91,7 +94,7 @@ public class ListIndexCommandDUnitTest extends CliCommandTestBase {
 
   @Override
   public final void postSetUp() throws Exception {
-    createDefaultSetup(null);
+    setUpJmxManagerOnVm0ThenConnect(null);
     setupGemFire();
   }
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/2322827b/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 b9dcc41..24320ff 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
@@ -45,6 +45,8 @@ import com.gemstone.gemfire.test.junit.categories.FlakyTest;
 import org.junit.Ignore;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
+import org.junit.runner.RunWith;
+import org.junit.runners.Parameterized;
 
 import java.io.IOException;
 import java.util.List;
@@ -60,13 +62,14 @@ import static com.gemstone.gemfire.test.dunit.Wait.waitForCriterion;
  * Dunit class for testing gemfire function commands : GC, Shutdown
  */
 @Category({ DistributedTest.class, FlakyTest.class }) // see GEODE-1034
+@RunWith(Parameterized.class)
 public class MiscellaneousCommandsDUnitTest extends CliCommandTestBase {
 
   private static final long serialVersionUID = 1L;
   private static String cachedLogLevel;
 
-  public MiscellaneousCommandsDUnitTest(boolean useHttpOnConnect, String jsonAuthorization) {
-    super(useHttpOnConnect, jsonAuthorization);
+  public MiscellaneousCommandsDUnitTest(boolean useHttpOnConnect, boolean enableAuth) {
+    super(useHttpOnConnect, enableAuth);
   }
 
   @Override
@@ -86,7 +89,7 @@ public class MiscellaneousCommandsDUnitTest extends CliCommandTestBase {
     Properties localProps = new Properties();
     localProps.setProperty(DistributionConfig.NAME_NAME, "Manager");
     localProps.setProperty(DistributionConfig.GROUPS_NAME, "Group1");
-    createDefaultSetup(localProps);
+    setUpJmxManagerOnVm0ThenConnect(localProps);
     String command = "gc --group=Group1";
     CommandResult cmdResult = executeCommand(command);
     cmdResult.resetToFirstLine();
@@ -113,7 +116,7 @@ public class MiscellaneousCommandsDUnitTest extends CliCommandTestBase {
 
   @Test
   public void testGCForMemberID() {
-    createDefaultSetup(null);
+    setUpJmxManagerOnVm0ThenConnect(null);
     final VM vm1 = Host.getHost(0).getVM(1);
     final String vm1MemberId = (String) vm1.invoke(() -> getMemberId());
     String command = "gc --member=" + vm1MemberId;
@@ -140,7 +143,7 @@ public class MiscellaneousCommandsDUnitTest extends CliCommandTestBase {
     Properties props = new Properties();
     try {
       props.setProperty("log-file", "testShowLogDefault.log");
-      createDefaultSetup(props);
+      setUpJmxManagerOnVm0ThenConnect(props);
       final VM vm1 = Host.getHost(0).getVM(0);
       final String vm1MemberId = (String) vm1.invoke(() -> getMemberId());
       String command = "show log --member=" + vm1MemberId;
@@ -163,7 +166,7 @@ public class MiscellaneousCommandsDUnitTest extends CliCommandTestBase {
     Properties props = new Properties();
     props.setProperty("log-file", "testShowLogNumLines.log");
     try {
-      createDefaultSetup(props);
+      setUpJmxManagerOnVm0ThenConnect(props);
       final VM vm1 = Host.getHost(0).getVM(0);
       final String vm1MemberId = (String) vm1.invoke(() -> getMemberId());
       String command = "show log --member=" + vm1MemberId + " --lines=50";
@@ -210,7 +213,7 @@ public class MiscellaneousCommandsDUnitTest extends CliCommandTestBase {
     final VM vm2 = Host.getHost(0).getVM(2);
 
 
-    createDefaultSetup(null);
+    setUpJmxManagerOnVm0ThenConnect(null);
     vm1.invoke(new SerializableRunnable() {
       public void run() {
         // no need to close cache as it will be closed as part of teardown2
@@ -336,7 +339,7 @@ public class MiscellaneousCommandsDUnitTest extends CliCommandTestBase {
     final VM vm0 = Host.getHost(0).getVM(0);
     final VM vm1 = Host.getHost(0).getVM(1);
 
-    createDefaultSetup(null);
+    setUpJmxManagerOnVm0ThenConnect(null);
     vm1.invoke(new SerializableRunnable() {
       public void run() {
         // no need to close cache as it will be closed as part of teardown2
@@ -356,7 +359,7 @@ public class MiscellaneousCommandsDUnitTest extends CliCommandTestBase {
     final VM vm1 = Host.getHost(0).getVM(1);
 
     System.setProperty(CliStrings.IGNORE_INTERCEPTORS, "true");
-    createDefaultSetup(null);
+    setUpJmxManagerOnVm0ThenConnect(null);
     vm1.invoke(new SerializableRunnable() {
       public void run() {
         // no need to close cache as it will be closed as part of teardown2
@@ -462,7 +465,7 @@ public class MiscellaneousCommandsDUnitTest extends CliCommandTestBase {
     final String grp1 = "Group1";
     final String grp2 = "Group2";
 
-    createDefaultSetup(localProps);
+    setUpJmxManagerOnVm0ThenConnect(localProps);
 
     String vm1id = (String) vm1.invoke(new SerializableCallable() {
       @Override

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/2322827b/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 0ce955d..07e33e8 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
@@ -30,6 +30,8 @@ import com.gemstone.gemfire.test.dunit.VM;
 import com.gemstone.gemfire.test.junit.categories.DistributedTest;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
+import org.junit.runner.RunWith;
+import org.junit.runners.Parameterized;
 
 import java.io.File;
 import java.io.IOException;
@@ -44,17 +46,18 @@ import static com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter;
  * Dunit class for testing gemfire function commands : export logs
  */
 @Category(DistributedTest.class)
+@RunWith(Parameterized.class)
 public class MiscellaneousCommandsExportLogsPart1DUnitTest extends CliCommandTestBase {
 
   private static final long serialVersionUID = 1L;
 
-  public MiscellaneousCommandsExportLogsPart1DUnitTest(boolean useHttpOnConnect, String jsonAuthorization) {
-    super(useHttpOnConnect, jsonAuthorization);
+  public MiscellaneousCommandsExportLogsPart1DUnitTest(boolean useHttpOnConnect, boolean enableAuth) {
+    super(useHttpOnConnect, enableAuth);
   }
 
   void setupForExportLogs() {
     final VM vm1 = Host.getHost(0).getVM(1);
-    createDefaultSetup(null);
+    setUpJmxManagerOnVm0ThenConnect(null);
 
     vm1.invoke(new SerializableRunnable() {
       public void run() {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/2322827b/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 55d8b06..c515f3a 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
@@ -30,6 +30,8 @@ import com.gemstone.gemfire.test.dunit.VM;
 import com.gemstone.gemfire.test.junit.categories.DistributedTest;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
+import org.junit.runner.RunWith;
+import org.junit.runners.Parameterized;
 
 import java.io.File;
 import java.io.IOException;
@@ -44,18 +46,19 @@ import static com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter;
  * Dunit class for testing gemfire function commands : export logs
  */
 @Category(DistributedTest.class)
+@RunWith(Parameterized.class)
 public class MiscellaneousCommandsExportLogsPart2DUnitTest extends CliCommandTestBase {
 
   private static final long serialVersionUID = 1L;
 
-  public MiscellaneousCommandsExportLogsPart2DUnitTest(boolean useHttpOnConnect, String jsonAuthorization) {
-    super(useHttpOnConnect, jsonAuthorization);
+  public MiscellaneousCommandsExportLogsPart2DUnitTest(boolean useHttpOnConnect, boolean enableAuth) {
+    super(useHttpOnConnect, enableAuth);
   }
 
 
   void setupForExportLogs() {
     final VM vm1 = Host.getHost(0).getVM(1);
-    createDefaultSetup(null);
+    setUpJmxManagerOnVm0ThenConnect(null);
 
     vm1.invoke(new SerializableRunnable() {
       public void run() {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/2322827b/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 63f3ceb..684d647 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
@@ -31,6 +31,8 @@ import com.gemstone.gemfire.test.dunit.VM;
 import com.gemstone.gemfire.test.junit.categories.DistributedTest;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
+import org.junit.runner.RunWith;
+import org.junit.runners.Parameterized;
 
 import java.io.File;
 import java.io.IOException;
@@ -46,12 +48,13 @@ import static com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter;
  * Dunit class for testing gemfire function commands : export logs
  */
 @Category(DistributedTest.class)
+@RunWith(Parameterized.class)
 public class MiscellaneousCommandsExportLogsPart3DUnitTest extends CliCommandTestBase {
 
   private static final long serialVersionUID = 1L;
 
-  public MiscellaneousCommandsExportLogsPart3DUnitTest(boolean useHttpOnConnect, String jsonAuthorization) {
-    super(useHttpOnConnect, jsonAuthorization);
+  public MiscellaneousCommandsExportLogsPart3DUnitTest(boolean useHttpOnConnect, boolean enableAuth) {
+    super(useHttpOnConnect, enableAuth);
   }
 
   public String getMemberId() {
@@ -61,7 +64,7 @@ public class MiscellaneousCommandsExportLogsPart3DUnitTest extends CliCommandTes
 
   void setupForExportLogs() {
     final VM vm1 = Host.getHost(0).getVM(1);
-    createDefaultSetup(null);
+    setUpJmxManagerOnVm0ThenConnect(null);
 
     vm1.invoke(new SerializableRunnable() {
       public void run() {
@@ -89,7 +92,7 @@ public class MiscellaneousCommandsExportLogsPart3DUnitTest extends CliCommandTes
     Properties localProps = new Properties();
     localProps.setProperty(DistributionConfig.NAME_NAME, "Manager");
     localProps.setProperty(DistributionConfig.GROUPS_NAME, "Group1");
-    createDefaultSetup(localProps);
+    setUpJmxManagerOnVm0ThenConnect(localProps);
     String dir = getCurrentTimeString();
 
     Date startDate = new Date(System.currentTimeMillis() - 2 * 60 * 1000);
@@ -122,7 +125,7 @@ public class MiscellaneousCommandsExportLogsPart3DUnitTest extends CliCommandTes
 
   @Test
   public void testExportLogsForMember() throws IOException {
-    createDefaultSetup(null);
+    setUpJmxManagerOnVm0ThenConnect(null);
 
     Date startDate = new Date(System.currentTimeMillis() - 2 * 60 * 1000);
     SimpleDateFormat sf = new SimpleDateFormat("yyyy/MM/dd");

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/2322827b/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 4015033..3b6918b 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
@@ -30,6 +30,8 @@ import com.gemstone.gemfire.test.dunit.VM;
 import com.gemstone.gemfire.test.junit.categories.DistributedTest;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
+import org.junit.runner.RunWith;
+import org.junit.runners.Parameterized;
 
 import java.io.File;
 import java.io.IOException;
@@ -44,17 +46,18 @@ import static com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter;
  * Dunit class for testing gemfire function commands : export logs
  */
 @Category(DistributedTest.class)
+@RunWith(Parameterized.class)
 public class MiscellaneousCommandsExportLogsPart4DUnitTest extends CliCommandTestBase {
 
   private static final long serialVersionUID = 1L;
 
-  public MiscellaneousCommandsExportLogsPart4DUnitTest(boolean useHttpOnConnect, String jsonAuthorization) {
-    super(useHttpOnConnect, jsonAuthorization);
+  public MiscellaneousCommandsExportLogsPart4DUnitTest(boolean useHttpOnConnect, boolean enableAuth) {
+    super(useHttpOnConnect, enableAuth);
   }
 
   void setupForExportLogs() {
     final VM vm1 = Host.getHost(0).getVM(1);
-    createDefaultSetup(null);
+    setUpJmxManagerOnVm0ThenConnect(null);
 
     vm1.invoke(new SerializableRunnable() {
       public void run() {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/2322827b/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 4d23535..0bcbd59 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
@@ -36,6 +36,8 @@ import com.gemstone.gemfire.test.dunit.WaitCriterion;
 import com.gemstone.gemfire.test.junit.categories.DistributedTest;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
+import org.junit.runner.RunWith;
+import org.junit.runners.Parameterized;
 
 import java.io.File;
 import java.io.FileOutputStream;
@@ -55,13 +57,14 @@ import static com.gemstone.gemfire.test.dunit.Wait.waitForCriterion;
  * @since 8.0
  */
 @Category(DistributedTest.class)
+@RunWith(Parameterized.class)
 public class QueueCommandsDUnitTest extends CliCommandTestBase {
 
   private static final long serialVersionUID = 1L;
 
   final List<String> filesToBeDeleted = new CopyOnWriteArrayList<String>();
 
-  public QueueCommandsDUnitTest(boolean useHttpOnConnect, String jsonAuthorization) {
+  public QueueCommandsDUnitTest(boolean useHttpOnConnect, boolean jsonAuthorization) {
     super(useHttpOnConnect, jsonAuthorization);
   }
 
@@ -78,7 +81,7 @@ public class QueueCommandsDUnitTest extends CliCommandTestBase {
 
     Properties localProps = new Properties();
     localProps.setProperty(DistributionConfig.GROUPS_NAME, "Group0");
-    createDefaultSetup(localProps);
+    setUpJmxManagerOnVm0ThenConnect(localProps);
 
     CommandResult cmdResult = executeCommand(CliStrings.LIST_ASYNC_EVENT_QUEUES);
     assertEquals(Result.Status.OK, cmdResult.getStatus());
@@ -288,7 +291,7 @@ public class QueueCommandsDUnitTest extends CliCommandTestBase {
     Properties managerProps = new Properties();
     managerProps.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
     managerProps.setProperty(DistributionConfig.LOCATORS_NAME, "localhost:" + locatorPort);
-    createDefaultSetup(managerProps);
+    setUpJmxManagerOnVm0ThenConnect(managerProps);
 
     // Create a cache in VM 1
     VM vm = Host.getHost(0).getVM(1);

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/2322827b/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 6407897..36da880 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
@@ -43,6 +43,8 @@ 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 org.junit.runner.RunWith;
+import org.junit.runners.Parameterized;
 
 import java.io.File;
 import java.io.IOException;
@@ -60,6 +62,7 @@ import static com.gemstone.gemfire.test.dunit.Wait.waitForCriterion;
  */
 @Category(DistributedTest.class)
 @SuppressWarnings("unchecked")
+@RunWith(Parameterized.class)
 public class SharedConfigurationCommandsDUnitTest extends CliCommandTestBase {
 
   private static final long serialVersionUID = 1L;
@@ -69,8 +72,8 @@ public class SharedConfigurationCommandsDUnitTest extends CliCommandTestBase {
   File newDeployableJarFile = new File("DeployCommandsDUnit1.jar");
   private transient ClassBuilder classBuilder = new ClassBuilder();
 
-  public SharedConfigurationCommandsDUnitTest(boolean useHttpOnConnect, String jsonAuthorization) {
-    super(useHttpOnConnect, jsonAuthorization);
+  public SharedConfigurationCommandsDUnitTest(boolean useHttpOnConnect, boolean enableAuth) {
+    super(useHttpOnConnect, enableAuth);
   }
 
   @Test
@@ -86,7 +89,7 @@ public class SharedConfigurationCommandsDUnitTest extends CliCommandTestBase {
     final String startArchiveFileName = "stats.gfs";
     final int[] ports = AvailablePortHelper.getRandomAvailableTCPPorts(3);
 
-    // TODO Sourabh - the code below is similar to CliCommandTestBase.createDefaultSetup(..); we may want to consider
+    // TODO Sourabh - the code below is similar to CliCommandTestBase.setUpJmxManagerOnVm0ThenConnect(..); we may want to consider
     // refactoring this and combine the duplicate code blocks using either the Template Method and/or Strategy design
     // patterns.  We can talk about this.
     // Start the Locator and wait for shared configuration to be available

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/2322827b/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 23ec0a1..b8efc15 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
@@ -31,6 +31,8 @@ import com.gemstone.gemfire.management.internal.cli.util.CommandStringBuilder;
 import com.gemstone.gemfire.test.junit.categories.DistributedTest;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
+import org.junit.runner.RunWith;
+import org.junit.runners.Parameterized;
 
 import java.io.File;
 import java.util.concurrent.TimeUnit;
@@ -39,12 +41,13 @@ import static com.gemstone.gemfire.test.dunit.Assert.*;
 import static com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter;
 
 @Category(DistributedTest.class)
+@RunWith(Parameterized.class)
 public class ShellCommandsDUnitTest extends CliCommandTestBase {
 
   private static final long serialVersionUID = 1L;
 
-  public ShellCommandsDUnitTest(boolean useHttpOnConnect, String jsonAuthorization) {
-    super(useHttpOnConnect, jsonAuthorization);
+  public ShellCommandsDUnitTest(boolean useHttpOnConnect, boolean enableAuth) {
+    super(useHttpOnConnect, enableAuth);
   }
 
   @Override

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/2322827b/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 f7c32bc..e20ccf0 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
@@ -43,6 +43,8 @@ import com.gemstone.gemfire.test.dunit.WaitCriterion;
 import com.gemstone.gemfire.test.junit.categories.DistributedTest;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
+import org.junit.runner.RunWith;
+import org.junit.runners.Parameterized;
 
 import javax.management.ObjectName;
 import java.io.File;
@@ -56,12 +58,13 @@ import static com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter;
 import static com.gemstone.gemfire.test.dunit.Wait.waitForCriterion;
 
 @Category(DistributedTest.class)
+@RunWith(Parameterized.class)
 public class ShowMetricsDUnitTest extends CliCommandTestBase {
 
   private static final long serialVersionUID = 1L;
 
-  public ShowMetricsDUnitTest(boolean useHttpOnConnect, String jsonAuthorization) {
-    super(useHttpOnConnect, jsonAuthorization);
+  public ShowMetricsDUnitTest(boolean useHttpOnConnect, boolean enableAuth) {
+    super(useHttpOnConnect, enableAuth);
   }
 
   private void createLocalSetUp() {
@@ -79,7 +82,7 @@ public class ShowMetricsDUnitTest extends CliCommandTestBase {
    */
   @Test
   public void testShowMetricsDefault() {
-    createDefaultSetup(null);
+    setUpJmxManagerOnVm0ThenConnect(null);
     createLocalSetUp();
     final VM vm1 = Host.getHost(0).getVM(1);
     final String vm1Name = "VM" + vm1.getPid();
@@ -122,7 +125,7 @@ public class ShowMetricsDUnitTest extends CliCommandTestBase {
   }
 
   public void systemSetUp() {
-    createDefaultSetup(null);
+    setUpJmxManagerOnVm0ThenConnect(null);
     createLocalSetUp();
     final VM vm1 = Host.getHost(0).getVM(1);
     final String vm1Name = "VM" + vm1.getPid();

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/2322827b/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 89a6a17..6d585a0 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
@@ -27,6 +27,8 @@ import com.gemstone.gemfire.test.dunit.VM;
 import com.gemstone.gemfire.test.junit.categories.DistributedTest;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
+import org.junit.runner.RunWith;
+import org.junit.runners.Parameterized;
 
 import java.io.File;
 import java.io.IOException;
@@ -40,12 +42,13 @@ import static com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter;
  * DUnit test for 'show stack-trace' command
  */
 @Category(DistributedTest.class)
+@RunWith(Parameterized.class)
 public class ShowStackTraceDUnitTest extends CliCommandTestBase {
 
   private static final long serialVersionUID = 1L;
 
-  public ShowStackTraceDUnitTest(boolean useHttpOnConnect, String jsonAuthorization) {
-    super(useHttpOnConnect, jsonAuthorization);
+  public ShowStackTraceDUnitTest(boolean useHttpOnConnect, boolean enableAuth) {
+    super(useHttpOnConnect, enableAuth);
   }
 
   private void createCache(Properties props) {
@@ -75,7 +78,7 @@ public class ShowStackTraceDUnitTest extends CliCommandTestBase {
     final Properties propsManager = createProperties(host, "Manager", "G1");
     final Properties propsServer2 = createProperties(host, "Server", "G2");
 
-    createDefaultSetup(propsManager);
+    setUpJmxManagerOnVm0ThenConnect(propsManager);
 
     servers[1].invoke(new SerializableRunnable("Create cache for server1") {
       public void run() {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/2322827b/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 a9d670d..7e3ddde 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
@@ -28,6 +28,8 @@ import com.gemstone.gemfire.test.dunit.SerializableRunnable;
 import com.gemstone.gemfire.test.junit.categories.DistributedTest;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
+import org.junit.runner.RunWith;
+import org.junit.runners.Parameterized;
 
 import java.io.File;
 import java.io.FileOutputStream;
@@ -42,6 +44,7 @@ import static com.gemstone.gemfire.test.dunit.Assert.assertEquals;
  * @since 8.0
  */
 @Category(DistributedTest.class)
+@RunWith(Parameterized.class)
 public class UserCommandsDUnitTest extends CliCommandTestBase {
 
   private static final long serialVersionUID = 1L;
@@ -51,8 +54,8 @@ public class UserCommandsDUnitTest extends CliCommandTestBase {
   final File jarFile = new File(this.jarDirectory, "UserCommandsDUnit.jar");
   boolean deleteJarDirectory = false;
 
-  public UserCommandsDUnitTest(boolean useHttpOnConnect, String jsonAuthorization) {
-    super(useHttpOnConnect, jsonAuthorization);
+  public UserCommandsDUnitTest(boolean useHttpOnConnect, boolean enableAuth) {
+    super(useHttpOnConnect, enableAuth);
   }
 
   @Override
@@ -134,7 +137,7 @@ public class UserCommandsDUnitTest extends CliCommandTestBase {
       }
     });
 
-    createDefaultSetup(null);
+    setUpJmxManagerOnVm0ThenConnect(null);
 
     CommandResult cmdResult = executeCommand("ucdunitcmd");
     assertEquals(Result.Status.OK, cmdResult.getStatus());
@@ -159,7 +162,7 @@ public class UserCommandsDUnitTest extends CliCommandTestBase {
 
     Properties properties = new Properties();
     properties.setProperty(DistributionConfig.USER_COMMAND_PACKAGES, "junit.ucdunit");
-    createDefaultSetup(properties);
+    setUpJmxManagerOnVm0ThenConnect(properties);
 
     CommandResult cmdResult = executeCommand("ucdunitcmd");
     assertEquals(Result.Status.OK, cmdResult.getStatus());

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/2322827b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/CacheServerMBeanAuthenticationJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/CacheServerMBeanAuthenticationJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/CacheServerMBeanAuthenticationJUnitTest.java
index 728fc28..6a12d70 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/CacheServerMBeanAuthenticationJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/CacheServerMBeanAuthenticationJUnitTest.java
@@ -43,7 +43,7 @@ public class CacheServerMBeanAuthenticationJUnitTest {
     bean = connectionRule.getProxyMBean(CacheServerMXBean.class, "GemFire:service=CacheServer,*");
   }
 
-  @Test
+  @Test()
   @JMXConnectionConfiguration(user = "data-admin", password = "1234567")
   public void testAllAccess() throws Exception {
     bean.removeIndex("foo");

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/2322827b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/GfshCommandsSecurityTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/GfshCommandsSecurityTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/GfshCommandsSecurityTest.java
new file mode 100644
index 0000000..3170793
--- /dev/null
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/GfshCommandsSecurityTest.java
@@ -0,0 +1,40 @@
+package com.gemstone.gemfire.management.internal.security;
+
+import com.gemstone.gemfire.internal.AvailablePortHelper;
+import com.gemstone.gemfire.management.internal.cli.HeadlessGfsh;
+import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import org.junit.Before;
+import org.junit.ClassRule;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
+@Category(IntegrationTest.class)
+public class GfshCommandsSecurityTest {
+  private static int[] ports = AvailablePortHelper.getRandomAvailableTCPPorts(2);
+  private static int jmxPort = ports[0];
+  private static int httpPort = ports[1];
+
+  private HeadlessGfsh gfsh = null;
+
+  @ClassRule
+  public static JsonAuthorizationCacheStartRule serverRule = new JsonAuthorizationCacheStartRule(
+      jmxPort, httpPort, "cacheServer.json");
+
+  @Rule
+  public GfshShellConnectionRule gfshConnection = new GfshShellConnectionRule(jmxPort, httpPort, false);
+
+
+  @Before
+  public void before(){
+    gfsh = gfshConnection.getGfsh();
+  }
+
+ // @Test(expected=SecurityException.class)
+  @Test
+  @JMXConnectionConfiguration(user = "data-admin", password = "1234567")
+  public void test() throws Exception {
+
+  }
+
+}



Mime
View raw message