[ 
https://issues.apache.org/jira/browse/GEODE-3843?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16219661#comment-16219661
 ] 

ASF GitHub Bot commented on GEODE-3843:
---------------------------------------

jaredjstewart closed pull request #976: GEODE-3843 gfsh shutdown error message 
suggests non-existent option
URL: https://github.com/apache/geode/pull/976
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git 
a/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/ShutdownCommand.java
 
b/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/ShutdownCommand.java
index c89331a4c1..3ed8b406ad 100644
--- 
a/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/ShutdownCommand.java
+++ 
b/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/ShutdownCommand.java
@@ -60,6 +60,7 @@ public Result shutdown(
       @CliOption(key = CliStrings.SHUTDOWN__TIMEOUT, unspecifiedDefaultValue = 
DEFAULT_TIME_OUT,
           help = CliStrings.SHUTDOWN__TIMEOUT__HELP) int userSpecifiedTimeout,
       @CliOption(key = CliStrings.INCLUDE_LOCATORS, unspecifiedDefaultValue = 
"false",
+          specifiedDefaultValue = "true",
           help = CliStrings.INCLUDE_LOCATORS_HELP) boolean shutdownLocators) {
     try {
 
diff --git 
a/geode-core/src/test/java/org/apache/geode/management/internal/cli/GfshParserParsingTest.java
 
b/geode-core/src/test/java/org/apache/geode/management/internal/cli/GfshParserParsingTest.java
index 6d18a23b01..de48b4a05e 100644
--- 
a/geode-core/src/test/java/org/apache/geode/management/internal/cli/GfshParserParsingTest.java
+++ 
b/geode-core/src/test/java/org/apache/geode/management/internal/cli/GfshParserParsingTest.java
@@ -360,4 +360,11 @@ public void testMultiLineCommand() throws Exception {
     assertThat(result.getParamValueAsString("name")).isEqualTo("test");
     assertThat(result.getCommandName()).isEqualTo("start server");
   }
+
+  @Test
+  public void testShutdownWithOptionCommand() throws Exception {
+    String command = "shutdown --include-locators";
+    GfshParseResult result = parser.parse(command);
+    assertThat(result.getParamValue("include-locators")).isEqualTo(true);
+  }
 }


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


> gfsh shutdown error message suggests non-existent option
> --------------------------------------------------------
>
>                 Key: GEODE-3843
>                 URL: https://issues.apache.org/jira/browse/GEODE-3843
>             Project: Geode
>          Issue Type: Bug
>          Components: gfsh
>            Reporter: Dave Barnes
>            Assignee: Srikanth Manvi
>            Priority: Minor
>
> 1. Start gfsh.
> 2. Start a locator.
> 3. Issue the 'shutdown' command.
> gfsh prompts for 'do you really want to...', then issues an error message 
> alerting you to the lack of data nodes. OK so far.
> This is followed by a line recommending that you use '--shutdown-locators' to 
> stop your locator.
> Should be '--include-locators=true'.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to