Repository: geode Updated Branches: refs/heads/develop 33f421819 -> 11a0b34cd
Revert "GEODE-3277: Fix error path constructors of inner State classes of the Launchers" This reverts commit 6fb2ca8 Project: http://git-wip-us.apache.org/repos/asf/geode/repo Commit: http://git-wip-us.apache.org/repos/asf/geode/commit/11a0b34c Tree: http://git-wip-us.apache.org/repos/asf/geode/tree/11a0b34c Diff: http://git-wip-us.apache.org/repos/asf/geode/diff/11a0b34c Branch: refs/heads/develop Commit: 11a0b34cd4c15903a9b9fd649329ddbafc428ad8 Parents: 33f4218 Author: Ken Howe <kh...@pivotal.io> Authored: Wed Aug 9 09:26:52 2017 -0700 Committer: Ken Howe <kh...@pivotal.io> Committed: Wed Aug 9 09:26:52 2017 -0700 ---------------------------------------------------------------------- .../cli/commands/StatusLocatorRealGfshTest.java | 45 ++----------- .../geode/distributed/LocatorLauncher.java | 66 ++++++++++++++++---- .../geode/distributed/ServerLauncher.java | 6 +- .../lifecycle/StatusLocatorCommand.java | 5 +- .../commands/lifecycle/StatusServerCommand.java | 2 +- .../LocatorLauncherRemoteIntegrationTest.java | 65 ++++++++++--------- .../dunit/rules/GfshShellConnectionRule.java | 4 +- 7 files changed, 100 insertions(+), 93 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/geode/blob/11a0b34c/geode-assembly/src/test/java/org/apache/geode/management/internal/cli/commands/StatusLocatorRealGfshTest.java ---------------------------------------------------------------------- diff --git a/geode-assembly/src/test/java/org/apache/geode/management/internal/cli/commands/StatusLocatorRealGfshTest.java b/geode-assembly/src/test/java/org/apache/geode/management/internal/cli/commands/StatusLocatorRealGfshTest.java index a6d3a6f..3a98373 100644 --- a/geode-assembly/src/test/java/org/apache/geode/management/internal/cli/commands/StatusLocatorRealGfshTest.java +++ b/geode-assembly/src/test/java/org/apache/geode/management/internal/cli/commands/StatusLocatorRealGfshTest.java @@ -14,67 +14,30 @@ */ package org.apache.geode.management.internal.cli.commands; -import static org.assertj.core.api.Assertions.assertThat; - -import static org.apache.geode.internal.AvailablePort.SOCKET; -import static org.apache.geode.internal.AvailablePort.getRandomAvailablePort; - -import org.apache.geode.management.internal.cli.util.CommandStringBuilder; - -import org.junit.Before; import org.junit.Rule; import org.junit.Test; import org.junit.experimental.categories.Category; -import org.junit.rules.TestName; -import org.apache.geode.test.dunit.rules.gfsh.GfshExecution; import org.apache.geode.test.dunit.rules.gfsh.GfshRule; import org.apache.geode.test.dunit.rules.gfsh.GfshScript; import org.apache.geode.test.junit.categories.AcceptanceTest; -import java.util.concurrent.TimeUnit; @Category(AcceptanceTest.class) public class StatusLocatorRealGfshTest { - private int port; - - @Rule - public TestName testName = new TestName(); - @Rule public GfshRule gfshRule = new GfshRule(); - @Before - public void setup() { - port = getRandomAvailablePort(SOCKET); - } - @Test public void statusLocatorSucceedsWhenConnected() throws Exception { - GfshScript.of("start locator --name=locator1 --port=" + Integer.valueOf(port)) - .execute(gfshRule); + GfshScript.of("start locator --name=locator1").execute(gfshRule); - GfshScript.of("connect --locator=192.168.1.66[" + Integer.valueOf(port) + "]", - "status locator --name=locator1").execute(gfshRule); + GfshScript.of("connect", "status locator --name=locator1").execute(gfshRule); } @Test - public void multilineStatusLocatorByNameWhenNotConnected() throws Exception { - CommandStringBuilder csb = - new CommandStringBuilder("status locator").addNewLine().addOption("name", "locator1"); - - GfshScript.of("start locator --name=locator1 --port=" + Integer.valueOf(port)) - .awaitAtMost(1, TimeUnit.MINUTES).execute(gfshRule); - - GfshScript.of(csb.toString()).awaitAtMost(1, TimeUnit.MINUTES).expectFailure() - .execute(gfshRule); + public void statusLocatorFailsWhenNotConnected() throws Exception { + GfshScript.of("start locator --name=locator1").withName("start locator").execute(gfshRule); - } - - @Test - public void statusLocatorByNameFailsWhenNotConnected() throws Exception { - GfshExecution gfshExecution = - GfshScript.of("start locator --name=locator1 --port=" + Integer.valueOf(port)) - .withName("start locator").execute(gfshRule); GfshScript.of("status locator --name=locator1").withName("status locator").expectFailure() .execute(gfshRule); } http://git-wip-us.apache.org/repos/asf/geode/blob/11a0b34c/geode-core/src/main/java/org/apache/geode/distributed/LocatorLauncher.java ---------------------------------------------------------------------- diff --git a/geode-core/src/main/java/org/apache/geode/distributed/LocatorLauncher.java b/geode-core/src/main/java/org/apache/geode/distributed/LocatorLauncher.java index 9400088..c5a2de8 100644 --- a/geode-core/src/main/java/org/apache/geode/distributed/LocatorLauncher.java +++ b/geode-core/src/main/java/org/apache/geode/distributed/LocatorLauncher.java @@ -55,6 +55,7 @@ import java.io.File; import java.io.FileNotFoundException; import java.io.IOException; import java.lang.management.ManagementFactory; +import java.net.ConnectException; import java.net.InetAddress; import java.net.UnknownHostException; import java.util.Arrays; @@ -683,7 +684,8 @@ public class LocatorLauncher extends AbstractLauncher<String> { @Override protected Properties getDistributedSystemProperties() { - return super.getDistributedSystemProperties(getProperties()); + Properties properties = super.getDistributedSystemProperties(getProperties()); + return properties; } /** @@ -740,6 +742,9 @@ public class LocatorLauncher extends AbstractLauncher<String> { Thread.currentThread().interrupt(); t = e; debug(e); + } catch (RuntimeException e) { + t = e; + throw e; } catch (Throwable e) { t = e; throw e; @@ -890,15 +895,24 @@ public class LocatorLauncher extends AbstractLauncher<String> { } catch (ConnectionFailedException e) { // failed to attach to locator JVM return createNoResponseState(e, "Failed to connect to locator with process id " + getPid()); - } catch (IOException | MBeanInvocationFailedException | UnableToControlProcessException - | TimeoutException e) { + } catch (IOException e) { // failed to open or read file or dir return createNoResponseState(e, "Failed to communicate with locator with process id " + getPid()); + } catch (MBeanInvocationFailedException e) { + // MBean either doesn't exist or method or attribute don't exist + return createNoResponseState(e, + "Failed to communicate with locator with process id " + getPid()); + } catch (UnableToControlProcessException e) { + return createNoResponseState(e, + "Failed to communicate with locator with process id " + getPid()); } catch (InterruptedException e) { Thread.currentThread().interrupt(); return createNoResponseState(e, "Interrupted while trying to communicate with locator with process id " + getPid()); + } catch (TimeoutException e) { + return createNoResponseState(e, + "Failed to communicate with locator with process id " + getPid()); } } @@ -937,19 +951,28 @@ public class LocatorLauncher extends AbstractLauncher<String> { // could not find pid file return createNoResponseState(e, "Failed to find process file " + ProcessType.LOCATOR.getPidFileName() + " in " + getWorkingDirectory()); - } catch (IOException | MBeanInvocationFailedException | UnableToControlProcessException - | TimeoutException e) { + } catch (IOException e) { // failed to open or read file or dir return createNoResponseState(e, "Failed to communicate with locator with process id " + parsedPid); + } catch (MBeanInvocationFailedException e) { + // MBean either doesn't exist or method or attribute don't exist + return createNoResponseState(e, + "Failed to communicate with locator with process id " + parsedPid); } catch (PidUnavailableException e) { // couldn't determine pid from within locator JVM return createNoResponseState(e, "Failed to find usable process id within file " + ProcessType.LOCATOR.getPidFileName() + " in " + getWorkingDirectory()); + } catch (UnableToControlProcessException e) { + return createNoResponseState(e, + "Failed to communicate with locator with process id " + parsedPid); } catch (InterruptedException e) { Thread.currentThread().interrupt(); return createNoResponseState(e, "Interrupted while trying to communicate with locator with process id " + parsedPid); + } catch (TimeoutException e) { + return createNoResponseState(e, + "Failed to communicate with locator with process id " + parsedPid); } } @@ -1033,10 +1056,17 @@ public class LocatorLauncher extends AbstractLauncher<String> { } catch (ConnectionFailedException e) { // failed to attach to locator JVM return createNoResponseState(e, "Failed to connect to locator with process id " + getPid()); - } catch (IOException | MBeanInvocationFailedException | UnableToControlProcessException e) { + } catch (IOException e) { // failed to open or read file or dir return createNoResponseState(e, "Failed to communicate with locator with process id " + getPid()); + } catch (MBeanInvocationFailedException e) { + // MBean either doesn't exist or method or attribute don't exist + return createNoResponseState(e, + "Failed to communicate with locator with process id " + getPid()); + } catch (UnableToControlProcessException e) { + return createNoResponseState(e, + "Failed to communicate with locator with process id " + getPid()); } } @@ -1066,7 +1096,7 @@ public class LocatorLauncher extends AbstractLauncher<String> { // could not find pid file return createNoResponseState(e, "Failed to find process file " + ProcessType.LOCATOR.getPidFileName() + " in " + getWorkingDirectory()); - } catch (IOException | MBeanInvocationFailedException | UnableToControlProcessException e) { + } catch (IOException e) { // failed to open or read file or dir return createNoResponseState(e, "Failed to communicate with locator with process id " + parsedPid); @@ -1074,6 +1104,10 @@ public class LocatorLauncher extends AbstractLauncher<String> { Thread.currentThread().interrupt(); return createNoResponseState(e, "Interrupted while trying to communicate with locator with process id " + parsedPid); + } catch (MBeanInvocationFailedException e) { + // MBean either doesn't exist or method or attribute don't exist + return createNoResponseState(e, + "Failed to communicate with locator with process id " + parsedPid); } catch (PidUnavailableException e) { // couldn't determine pid from within locator JVM return createNoResponseState(e, "Failed to find usable process id within file " @@ -1081,11 +1115,15 @@ public class LocatorLauncher extends AbstractLauncher<String> { } catch (TimeoutException e) { return createNoResponseState(e, "Timed out trying to find usable process id within file " + ProcessType.LOCATOR.getPidFileName() + " in " + getWorkingDirectory()); + } catch (UnableToControlProcessException e) { + return createNoResponseState(e, + "Failed to communicate with locator with process id " + parsedPid); } } private LocatorState createNoResponseState(final Exception cause, final String errorMessage) { debug(cause); + // info(errorMessage); return new LocatorState(this, Status.NOT_RESPONDING, errorMessage); } @@ -1129,7 +1167,9 @@ public class LocatorLauncher extends AbstractLauncher<String> { public ObjectName getNamePattern() { try { return ObjectName.getInstance("GemFire:type=Member,*"); - } catch (MalformedObjectNameException | NullPointerException e) { + } catch (MalformedObjectNameException e) { + return null; + } catch (NullPointerException e) { return null; } } @@ -1974,17 +2014,17 @@ public class LocatorLauncher extends AbstractLauncher<String> { this(status, // status errorMessage, // statusMessage System.currentTimeMillis(), // timestamp - launcher.getId(), // locatorLocation + null, // locatorLocation null, // pid 0L, // uptime launcher.getWorkingDirectory(), // workingDirectory - ManagementFactory.getRuntimeMXBean().getInputArguments(), // jvmArguments + Collections.<String>emptyList(), // jvmArguments null, // classpath GemFireVersion.getGemFireVersion(), // gemfireVersion - System.getProperty("java.version"), // javaVersion + null, // javaVersion null, // logFile - launcher.getBindAddressAsString(), // host - launcher.getPortAsString(), // port + null, // host + null, // port null);// memberName } http://git-wip-us.apache.org/repos/asf/geode/blob/11a0b34c/geode-core/src/main/java/org/apache/geode/distributed/ServerLauncher.java ---------------------------------------------------------------------- diff --git a/geode-core/src/main/java/org/apache/geode/distributed/ServerLauncher.java b/geode-core/src/main/java/org/apache/geode/distributed/ServerLauncher.java index 4f96942..158e7bf 100755 --- a/geode-core/src/main/java/org/apache/geode/distributed/ServerLauncher.java +++ b/geode-core/src/main/java/org/apache/geode/distributed/ServerLauncher.java @@ -2644,7 +2644,7 @@ public class ServerLauncher extends AbstractLauncher<String> { this(status, // status errorMessage, // statusMessage System.currentTimeMillis(), // timestamp - launcher.getId(), // serverLocation + null, // serverLocation null, // pid 0L, // uptime launcher.getWorkingDirectory(), // workingDirectory @@ -2653,8 +2653,8 @@ public class ServerLauncher extends AbstractLauncher<String> { GemFireVersion.getGemFireVersion(), // gemfireVersion null, // javaVersion null, // logFile - launcher.getServerBindAddressAsString(), // host - launcher.getServerPortAsString(), // port + null, // host + null, // port null);// memberName } http://git-wip-us.apache.org/repos/asf/geode/blob/11a0b34c/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/lifecycle/StatusLocatorCommand.java ---------------------------------------------------------------------- diff --git a/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/lifecycle/StatusLocatorCommand.java b/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/lifecycle/StatusLocatorCommand.java index f2281e9..06f8350 100644 --- a/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/lifecycle/StatusLocatorCommand.java +++ b/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/lifecycle/StatusLocatorCommand.java @@ -26,6 +26,7 @@ import org.springframework.shell.core.annotation.CliOption; import org.apache.geode.SystemFailure; import org.apache.geode.distributed.AbstractLauncher; import org.apache.geode.distributed.LocatorLauncher; +import org.apache.geode.internal.lang.StringUtils; import org.apache.geode.internal.lang.SystemUtils; import org.apache.geode.management.MemberMXBean; import org.apache.geode.management.cli.CliMetaData; @@ -37,8 +38,6 @@ import org.apache.geode.management.internal.cli.result.InfoResultData; import org.apache.geode.management.internal.cli.result.ResultBuilder; import org.apache.geode.management.internal.configuration.utils.ClusterConfigurationStatusRetriever; -import org.apache.commons.lang.StringUtils; - public class StatusLocatorCommand implements GfshCommand { @CliCommand(value = CliStrings.STATUS_LOCATOR, help = CliStrings.STATUS_LOCATOR__HELP) @CliMetaData(shellOnly = true, @@ -86,7 +85,7 @@ public class StatusLocatorCommand implements GfshCommand { return createStatusLocatorResult(status); } } catch (IllegalArgumentException | IllegalStateException e) { - return ResultBuilder.createUserErrorResult(e.toString()); + return ResultBuilder.createUserErrorResult(e.getMessage()); } catch (VirtualMachineError e) { SystemFailure.initiateFailure(e); throw e; http://git-wip-us.apache.org/repos/asf/geode/blob/11a0b34c/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/lifecycle/StatusServerCommand.java ---------------------------------------------------------------------- diff --git a/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/lifecycle/StatusServerCommand.java b/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/lifecycle/StatusServerCommand.java index 6f859cf..43374ab 100644 --- a/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/lifecycle/StatusServerCommand.java +++ b/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/lifecycle/StatusServerCommand.java @@ -80,7 +80,7 @@ public class StatusServerCommand implements GfshCommand { } } catch (IllegalArgumentException | IllegalStateException e) { - return ResultBuilder.createUserErrorResult(e.toString()); + return ResultBuilder.createUserErrorResult(e.getMessage()); } catch (VirtualMachineError e) { SystemFailure.initiateFailure(e); throw e; http://git-wip-us.apache.org/repos/asf/geode/blob/11a0b34c/geode-core/src/test/java/org/apache/geode/distributed/LocatorLauncherRemoteIntegrationTest.java ---------------------------------------------------------------------- diff --git a/geode-core/src/test/java/org/apache/geode/distributed/LocatorLauncherRemoteIntegrationTest.java b/geode-core/src/test/java/org/apache/geode/distributed/LocatorLauncherRemoteIntegrationTest.java index 989b10e..47e512a 100755 --- a/geode-core/src/test/java/org/apache/geode/distributed/LocatorLauncherRemoteIntegrationTest.java +++ b/geode-core/src/test/java/org/apache/geode/distributed/LocatorLauncherRemoteIntegrationTest.java @@ -30,6 +30,7 @@ import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.PrintStream; import java.lang.management.ManagementFactory; +import java.net.InetAddress; import java.util.ArrayList; import java.util.List; import java.util.concurrent.atomic.AtomicBoolean; @@ -457,7 +458,18 @@ public class LocatorLauncherRemoteIntegrationTest this.errorCollector.addError(e); } - checkLocatorStatus(dirLauncher); + try { + // check the status + final LocatorState locatorState = dirLauncher.status(); + assertNotNull(locatorState); + assertEquals(Status.NOT_RESPONDING, locatorState.getStatus()); + + final String logFileName = getUniqueName() + ".log"; + assertFalse("Log file should exist: " + logFileName, + new File(this.temporaryFolder.getRoot(), logFileName).exists()); + } catch (Throwable e) { + this.errorCollector.addError(e); + } // if the following fails, then the SHORTER_TIMEOUT is too short for slow machines // or this test needs to use MainLauncher in ProcessWrapper @@ -477,21 +489,6 @@ public class LocatorLauncherRemoteIntegrationTest is(equalTo(getExpectedStopStatusForNotRunning()))); } - private void checkLocatorStatus(LocatorLauncher dirLauncher) { - try { - // check the status - final LocatorState locatorState = dirLauncher.status(); - assertNotNull(locatorState); - assertEquals(Status.NOT_RESPONDING, locatorState.getStatus()); - - final String logFileName = getUniqueName() + ".log"; - assertFalse("Log file should exist: " + logFileName, - new File(this.temporaryFolder.getRoot(), logFileName).exists()); - } catch (Throwable e) { - this.errorCollector.addError(e); - } - } - @Test public void testStartWithDefaultPortInUseFails() throws Throwable { String expectedString = "java.net.BindException"; @@ -544,7 +541,19 @@ public class LocatorLauncherRemoteIntegrationTest this.errorCollector.addError(e); } - checkLocatorStatus(dirLauncher); + try { + // check the status + final LocatorState locatorState = dirLauncher.status(); + assertNotNull(locatorState); + assertEquals(Status.NOT_RESPONDING, locatorState.getStatus()); + + // creation of log file seems to be random -- look into why sometime + final String logFileName = getUniqueName() + ".log"; + assertFalse("Log file should exist: " + logFileName, + new File(this.temporaryFolder.getRoot(), logFileName).exists()); + } catch (Throwable e) { + this.errorCollector.addError(e); + } // if the following fails, then the SHORTER_TIMEOUT might be too short for slow machines // or this test needs to use MainLauncher in ProcessWrapper @@ -635,7 +644,7 @@ public class LocatorLauncherRemoteIntegrationTest public void testStatusUsingPid() throws Throwable { final List<String> jvmArguments = getJvmArguments(); - final List<String> command = new ArrayList<>(); + final List<String> command = new ArrayList<String>(); command .add(new File(new File(System.getProperty("java.home"), "bin"), "java").getCanonicalPath()); for (String jvmArgument : jvmArguments) { @@ -696,9 +705,7 @@ public class LocatorLauncherRemoteIntegrationTest assertEquals(System.getProperty("java.version"), actualStatus.getJavaVersion()); assertEquals(this.temporaryFolder.getRoot().getCanonicalPath() + File.separator + getUniqueName() + ".log", actualStatus.getLogFile()); - // Deleting the assertion on host. Assertions using InetAddress.getLocalHost can be flaky - // because some systems return "localhost" instead of the localhost's IP address as a string. - // assertEquals(InetAddress.getLocalHost().getCanonicalHostName(), actualStatus.getHost()); + assertEquals(InetAddress.getLocalHost().getCanonicalHostName(), actualStatus.getHost()); assertEquals(getUniqueName(), actualStatus.getMemberName()); } catch (Throwable e) { this.errorCollector.addError(e); @@ -724,7 +731,7 @@ public class LocatorLauncherRemoteIntegrationTest public void testStatusUsingWorkingDirectory() throws Throwable { final List<String> jvmArguments = getJvmArguments(); - final List<String> command = new ArrayList<>(); + final List<String> command = new ArrayList<String>(); command .add(new File(new File(System.getProperty("java.home"), "bin"), "java").getCanonicalPath()); for (String jvmArgument : jvmArguments) { @@ -781,9 +788,7 @@ public class LocatorLauncherRemoteIntegrationTest assertEquals(System.getProperty("java.version"), actualStatus.getJavaVersion()); assertEquals(this.temporaryFolder.getRoot().getCanonicalPath() + File.separator + getUniqueName() + ".log", actualStatus.getLogFile()); - // Deleting the assertion on host. Assertions using InetAddress.getLocalHost can be flaky - // because some systems return "localhost" instead of the localhost's IP address as a string. - // assertEquals(InetAddress.getLocalHost().getCanonicalHostName(), actualStatus.getHost()); + assertEquals(InetAddress.getLocalHost().getCanonicalHostName(), actualStatus.getHost()); assertEquals(getUniqueName(), actualStatus.getMemberName()); } catch (Throwable e) { this.errorCollector.addError(e); @@ -814,7 +819,7 @@ public class LocatorLauncherRemoteIntegrationTest is(equalTo(this.temporaryFolder.getRoot().getCanonicalPath()))); assertThat(actualStatus.getClasspath(), is(nullValue())); assertThat(actualStatus.getGemFireVersion(), is(equalTo(GemFireVersion.getGemFireVersion()))); - assertThat(actualStatus.getJavaVersion(), is(equalTo(System.getProperty("java.version")))); + assertThat(actualStatus.getJavaVersion(), is(nullValue())); assertThat(actualStatus.getLogFile(), is(nullValue())); assertThat(actualStatus.getHost(), is(nullValue())); assertThat(actualStatus.getMemberName(), is(nullValue())); @@ -846,7 +851,7 @@ public class LocatorLauncherRemoteIntegrationTest is(equalTo(this.temporaryFolder.getRoot().getCanonicalPath()))); assertThat(actualStatus.getClasspath(), is(nullValue())); assertThat(actualStatus.getGemFireVersion(), is(equalTo(GemFireVersion.getGemFireVersion()))); - assertThat(actualStatus.getJavaVersion(), is(equalTo(System.getProperty("java.version")))); + assertThat(actualStatus.getJavaVersion(), is(nullValue())); assertThat(actualStatus.getLogFile(), is(nullValue())); assertThat(actualStatus.getHost(), is(nullValue())); assertThat(actualStatus.getMemberName(), is(nullValue())); @@ -856,7 +861,7 @@ public class LocatorLauncherRemoteIntegrationTest public void testStopUsingPid() throws Throwable { final List<String> jvmArguments = getJvmArguments(); - final List<String> command = new ArrayList<>(); + final List<String> command = new ArrayList<String>(); command .add(new File(new File(System.getProperty("java.home"), "bin"), "java").getCanonicalPath()); for (String jvmArgument : jvmArguments) { @@ -937,7 +942,7 @@ public class LocatorLauncherRemoteIntegrationTest public void testStopUsingWorkingDirectory() throws Throwable { final List<String> jvmArguments = getJvmArguments(); - final List<String> command = new ArrayList<>(); + final List<String> command = new ArrayList<String>(); command .add(new File(new File(System.getProperty("java.home"), "bin"), "java").getCanonicalPath()); for (String jvmArgument : jvmArguments) { @@ -1008,7 +1013,7 @@ public class LocatorLauncherRemoteIntegrationTest final int port = Integer.parseInt(args[0]); // launch LocatorLauncher - List<String> command = new ArrayList<>(); + List<String> command = new ArrayList<String>(); command.add( new File(new File(System.getProperty("java.home"), "bin"), "java").getAbsolutePath()); command.add("-cp"); http://git-wip-us.apache.org/repos/asf/geode/blob/11a0b34c/geode-core/src/test/java/org/apache/geode/test/dunit/rules/GfshShellConnectionRule.java ---------------------------------------------------------------------- diff --git a/geode-core/src/test/java/org/apache/geode/test/dunit/rules/GfshShellConnectionRule.java b/geode-core/src/test/java/org/apache/geode/test/dunit/rules/GfshShellConnectionRule.java index dc17d03..e7f17ef 100644 --- a/geode-core/src/test/java/org/apache/geode/test/dunit/rules/GfshShellConnectionRule.java +++ b/geode-core/src/test/java/org/apache/geode/test/dunit/rules/GfshShellConnectionRule.java @@ -44,12 +44,12 @@ import org.apache.geode.test.junit.rules.DescribedExternalResource; * * you can use this as Rule * - * @Rule GfshShellConnectionRule rule = new GfshShellConnectionRule(); then after you connect to a + * @Rule GfshShellConnectionRule rule = new GfshSheelConnectionRule(); then after you connect to a * locator, you don't have to call disconnect() or close() at all, since the rule's after * takes care of it for you. * * Or as a ClassRule - * @ClassRule GfshShellConnectionRule rule = new GfshShellConnectionRule(); When using as a + * @ClassRule GfshShellConnectionRule rule = new GfshSheelConnectionRule(); When using as a * ClassRule, if you call connect in a test, you will need to call disconnect after the * test as well. See NetstatDUnitTest for example. *