You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@geode.apache.org by kh...@apache.org on 2017/09/20 21:37:35 UTC

[geode] branch develop updated (0869f06 -> 6c2d900)

This is an automated email from the ASF dual-hosted git repository.

khowe pushed a change to branch develop
in repository https://gitbox.apache.org/repos/asf/geode.git.


    from 0869f06  GEODE-3629: Old versions will be pulled from the Apache Maven Repo (#790)
     new d41dcdf  GEODE-3590: Prevent NPE during scripted disconnect.
     new 6c2d900  Added test, ran spotless

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../cli/shell/GfshDisconnectWithinScript.java      | 35 ++++++++++------------
 .../internal/cli/commands/ShellCommands.java       |  4 ++-
 2 files changed, 19 insertions(+), 20 deletions(-)
 copy geode-core/src/test/java/org/apache/geode/distributed/internal/membership/InternalRoleJUnitTest.java => geode-assembly/src/test/java/org/apache/geode/management/internal/cli/shell/GfshDisconnectWithinScript.java (62%)

-- 
To stop receiving notification emails like this one, please contact
['"commits@geode.apache.org" <co...@geode.apache.org>'].

[geode] 02/02: Added test, ran spotless

Posted by kh...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

khowe pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/geode.git

commit 6c2d90089ff29e68d236303aa27d9a8e4c583718
Author: Patrick Rhomberg <pr...@pivotal.io>
AuthorDate: Thu Sep 14 16:15:29 2017 -0700

    Added test, ran spotless
---
 .../cli/shell/GfshDisconnectWithinScript.java      | 41 ++++++++++++++++++++++
 .../internal/cli/commands/ShellCommands.java       |  2 +-
 2 files changed, 42 insertions(+), 1 deletion(-)

diff --git a/geode-assembly/src/test/java/org/apache/geode/management/internal/cli/shell/GfshDisconnectWithinScript.java b/geode-assembly/src/test/java/org/apache/geode/management/internal/cli/shell/GfshDisconnectWithinScript.java
new file mode 100644
index 0000000..d25b23e
--- /dev/null
+++ b/geode-assembly/src/test/java/org/apache/geode/management/internal/cli/shell/GfshDisconnectWithinScript.java
@@ -0,0 +1,41 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
+ * agreements. See the NOTICE file distributed with this work for additional information regarding
+ * copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the License. You may obtain a
+ * copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
+ */
+package org.apache.geode.management.internal.cli.shell;
+
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
+import org.apache.geode.test.dunit.rules.gfsh.GfshRule;
+import org.apache.geode.test.junit.categories.AcceptanceTest;
+
+@Category(AcceptanceTest.class)
+public class GfshDisconnectWithinScript {
+
+  @Rule
+  public GfshRule gfsh = new GfshRule();
+
+
+  @Before
+  public void setup() {
+    gfsh.execute("start locator");
+  }
+
+  @Test
+  public void disconnectInScriptDoesNotRaiseNPE() {
+    gfsh.execute("connect", "disconnect", "echo \"Disconnect command resolved without issue.\"");
+  }
+}
diff --git a/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/ShellCommands.java b/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/ShellCommands.java
index f28e989..399b2d9 100644
--- a/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/ShellCommands.java
+++ b/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/ShellCommands.java
@@ -196,7 +196,7 @@ public class ShellCommands implements GfshCommand {
               operationInvoker.toString()));
           LogWrapper.getInstance().info(CliStrings.format(CliStrings.DISCONNECT__MSG__DISCONNECTED,
               operationInvoker.toString()));
-          if (!gfshInstance.isHeadlessMode()){
+          if (!gfshInstance.isHeadlessMode()) {
             gfshInstance.setPromptPath(RegionPathConverter.DEFAULT_APP_CONTEXT_PATH);
           }
         } else {

-- 
To stop receiving notification emails like this one, please contact
"commits@geode.apache.org" <co...@geode.apache.org>.

[geode] 01/02: GEODE-3590: Prevent NPE during scripted disconnect.

Posted by kh...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

khowe pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/geode.git

commit d41dcdfa9f36267f2526f24c71dac1862400b62b
Author: Patrick Rhomberg <pr...@pivotal.io>
AuthorDate: Thu Sep 14 15:41:50 2017 -0700

    GEODE-3590: Prevent NPE during scripted disconnect.
---
 .../apache/geode/management/internal/cli/commands/ShellCommands.java  | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/ShellCommands.java b/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/ShellCommands.java
index fca84a7..f28e989 100644
--- a/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/ShellCommands.java
+++ b/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/ShellCommands.java
@@ -196,7 +196,9 @@ public class ShellCommands implements GfshCommand {
               operationInvoker.toString()));
           LogWrapper.getInstance().info(CliStrings.format(CliStrings.DISCONNECT__MSG__DISCONNECTED,
               operationInvoker.toString()));
-          gfshInstance.setPromptPath(RegionPathConverter.DEFAULT_APP_CONTEXT_PATH);
+          if (!gfshInstance.isHeadlessMode()){
+            gfshInstance.setPromptPath(RegionPathConverter.DEFAULT_APP_CONTEXT_PATH);
+          }
         } else {
           infoResultData.addLine(CliStrings.DISCONNECT__MSG__NOTCONNECTED);
         }

-- 
To stop receiving notification emails like this one, please contact
"commits@geode.apache.org" <co...@geode.apache.org>.