geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kl...@apache.org
Subject [36/45] geode git commit: GEODE-2138: Replaced Gemfire with Geode in the output of start locator and start server command. Added test to verify the same.
Date Wed, 11 Jan 2017 00:00:36 GMT
GEODE-2138: Replaced Gemfire with Geode in the output of start locator and start server command.
Added test to verify the same.

* this closes #328


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

Branch: refs/heads/feature/GEODE-1930-2
Commit: bfa76e96d38ccd978313805232c90c6e697a783e
Parents: f03925e
Author: Nilkanth Patel <npatel@apache.org>
Authored: Fri Dec 23 14:38:15 2016 +0530
Committer: Jinmei Liao <jiliao@pivotal.io>
Committed: Tue Jan 10 10:46:31 2017 -0800

----------------------------------------------------------------------
 .../LauncherLifecycleCommandsDUnitTest.java     | 51 ++++++++++++++++++++
 .../geode/internal/i18n/LocalizedStrings.java   |  4 +-
 2 files changed, 53 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/geode/blob/bfa76e96/geode-assembly/src/test/java/org/apache/geode/management/internal/cli/commands/LauncherLifecycleCommandsDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-assembly/src/test/java/org/apache/geode/management/internal/cli/commands/LauncherLifecycleCommandsDUnitTest.java
b/geode-assembly/src/test/java/org/apache/geode/management/internal/cli/commands/LauncherLifecycleCommandsDUnitTest.java
index 4f42cb0..5277e57 100644
--- a/geode-assembly/src/test/java/org/apache/geode/management/internal/cli/commands/LauncherLifecycleCommandsDUnitTest.java
+++ b/geode-assembly/src/test/java/org/apache/geode/management/internal/cli/commands/LauncherLifecycleCommandsDUnitTest.java
@@ -392,6 +392,57 @@ public class LauncherLifecycleCommandsDUnitTest extends CliCommandTestBase
{
                 StringUtils.EMPTY_STRING, gemfirePropertiesPathname)));
   }
 
+  /**
+   * Test to verify GEODE-2138
+   * 
+   * @throws IOException
+   */
+  @Test
+  public void testVersionTitleForStartServerAndLocator() throws IOException {
+    final int locatorPort = AvailablePortHelper.getRandomAvailableTCPPort();
+
+    String pathname = (getClass().getSimpleName() + "_" + getTestMethodName());
+    String pathnameLoc = pathname + "_loc";
+    String pathnameSer = pathname + "_ser";
+
+    File workingDirectoryLoc = temporaryFolder.newFolder(pathnameLoc);
+    File workingDirectorySer = temporaryFolder.newFolder(pathnameSer);
+
+    assertTrue(workingDirectoryLoc.isDirectory() || workingDirectoryLoc.mkdir());
+    assertTrue(workingDirectorySer.isDirectory() || workingDirectorySer.mkdir());
+
+    try {
+      // verify the start locator output does not contain string "gemfire"
+      CommandStringBuilder locCommand = new CommandStringBuilder(CliStrings.START_LOCATOR);
+      locCommand.addOption(CliStrings.START_LOCATOR__MEMBER_NAME, pathnameLoc);
+      locCommand.addOption(CliStrings.START_LOCATOR__CONNECT, Boolean.FALSE.toString());
+      locCommand.addOption(CliStrings.START_LOCATOR__DIR, workingDirectoryLoc.getCanonicalPath());
+      locCommand.addOption(CliStrings.START_LOCATOR__PORT, String.valueOf(locatorPort));
+
+      CommandResult locResult = executeCommand(locCommand.toString());
+      assertNotNull(locResult);
+      assertEquals(Result.Status.OK, locResult.getStatus());
+      String locatorOutput = toString(locResult);
+      assertNotNull(locatorOutput);
+      assertTrue("Locator output was: " + locatorOutput, !locatorOutput.contains("Gemfire"));
+
+      // verify the start server output does not contain string "gemfire"
+      CommandStringBuilder serCommand = new CommandStringBuilder(CliStrings.START_SERVER);
+      serCommand.addOption(CliStrings.START_SERVER__NAME, pathnameSer);
+      serCommand.addOption(CliStrings.START_SERVER__DIR, workingDirectorySer.getCanonicalPath());
+
+      CommandResult serResult = executeCommand(serCommand.toString());
+      assertNotNull(serResult);
+      assertEquals(Result.Status.OK, serResult.getStatus());
+      String serverOutput = toString(serResult);
+
+      assertTrue("Server start output was: " + serverOutput, !serverOutput.contains("Gemfire"));
+    } finally {
+      stopLocator(workingDirectoryLoc);
+      stopServer(IOUtils.tryGetCanonicalPathElseGetAbsolutePath(workingDirectorySer));
+    }
+  }
+
   @Test
   public void test002StartLocatorFailsFastOnMissingGemFireSecurityPropertiesFile()
       throws IOException {

http://git-wip-us.apache.org/repos/asf/geode/blob/bfa76e96/geode-core/src/main/java/org/apache/geode/internal/i18n/LocalizedStrings.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/internal/i18n/LocalizedStrings.java
b/geode-core/src/main/java/org/apache/geode/internal/i18n/LocalizedStrings.java
index 26a41ec..c616031 100755
--- a/geode-core/src/main/java/org/apache/geode/internal/i18n/LocalizedStrings.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/i18n/LocalizedStrings.java
@@ -7117,9 +7117,9 @@ public class LocalizedStrings {
   public static final StringId Launcher_Command_START_PID_UNAVAILABLE_ERROR_MESSAGE = new
StringId(
       5249, "The process ID could not be determined while starting {0} {1} in {2}: {3}");
   public static final StringId Launcher_ServiceStatus_STARTING_MESSAGE = new StringId(5250,
-      "Starting {0} in {1} on {2} as {3} at {4}\nProcess ID: {5}\nGemFire Version: {6}\nJava
Version: {7}\nLog File: {8}\nJVM Arguments: {9}\nClass-Path: {10}");
+      "Starting {0} in {1} on {2} as {3} at {4}\nProcess ID: {5}\nGeode Version: {6}\nJava
Version: {7}\nLog File: {8}\nJVM Arguments: {9}\nClass-Path: {10}");
   public static final StringId Launcher_ServiceStatus_RUNNING_MESSAGE = new StringId(5251,
-      "{0} in {1} on {2} as {3} is currently {4}.\nProcess ID: {5}\nUptime: {6}\nGemFire
Version: {7}\nJava Version: {8}\nLog File: {9}\nJVM Arguments: {10}\nClass-Path: {11}");
+      "{0} in {1} on {2} as {3} is currently {4}.\nProcess ID: {5}\nUptime: {6}\nGeode Version:
{7}\nJava Version: {8}\nLog File: {9}\nJVM Arguments: {10}\nClass-Path: {11}");
   public static final StringId Launcher_ServiceStatus_STOPPED_MESSAGE =
       new StringId(5252, "{0} in {1} on {2} has been requested to stop.");
   public static final StringId Launcher_ServiceStatus_MESSAGE =


Mime
View raw message