geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sai_boorlaga...@apache.org
Subject [geode] branch develop updated: GEODE-5212: use Paths instead of hardcoded file separator (#2444)
Date Mon, 10 Sep 2018 15:59:52 GMT
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/develop by this push:
     new e95a673  GEODE-5212: use Paths instead of hardcoded file separator (#2444)
e95a673 is described below

commit e95a673fa53590cc0ef4e221b28c329cb3431d06
Author: Sai Boorlagadda <sai.boorlagadda@gmail.com>
AuthorDate: Mon Sep 10 08:59:44 2018 -0700

    GEODE-5212: use Paths instead of hardcoded file separator (#2444)
---
 .../internal/cli/commands/StartLocatorCommandDUnitTest.java    |  7 +++++--
 .../internal/cli/commands/StartServerCommandDUnitTest.java     | 10 +++++++---
 2 files changed, 12 insertions(+), 5 deletions(-)

diff --git a/geode-assembly/src/distributedTest/java/org/apache/geode/management/internal/cli/commands/StartLocatorCommandDUnitTest.java
b/geode-assembly/src/distributedTest/java/org/apache/geode/management/internal/cli/commands/StartLocatorCommandDUnitTest.java
index 0e0bf18..c9f22ad 100644
--- a/geode-assembly/src/distributedTest/java/org/apache/geode/management/internal/cli/commands/StartLocatorCommandDUnitTest.java
+++ b/geode-assembly/src/distributedTest/java/org/apache/geode/management/internal/cli/commands/StartLocatorCommandDUnitTest.java
@@ -30,6 +30,7 @@ import java.io.IOException;
 import java.lang.management.ManagementFactory;
 import java.net.InetSocketAddress;
 import java.net.Socket;
+import java.nio.file.Paths;
 import java.text.MessageFormat;
 
 import org.junit.AfterClass;
@@ -117,7 +118,8 @@ public class StartLocatorCommandDUnitTest {
 
   @Test
   public void testWithMissingGemFirePropertiesFile() throws IOException {
-    final String missingPropertiesPath = "/path/to/missing/gemfire.properties";
+    final String missingPropertiesPath =
+        Paths.get("missing", "gemfire.properties").toAbsolutePath().toString();
     final String memberName = "testWithMissingGemFirePropertiesFile-locator";
     final String expectedError =
         MessageFormat.format(GEODE_0_PROPERTIES_1_NOT_FOUND_MESSAGE, "", missingPropertiesPath);
@@ -137,7 +139,8 @@ public class StartLocatorCommandDUnitTest {
 
   @Test
   public void testWithMissingGemFireSecurityPropertiesFile() throws IOException {
-    final String missingSecurityPropertiesPath = "/path/to/missing/gemfire-security.properties";
+    final String missingSecurityPropertiesPath = Paths
+        .get("missing", "gemfire-security.properties").toAbsolutePath().toString();
     final String memberName = "testWithMissingGemFireSecurityPropertiesFile-locator";
     final String expectedError = MessageFormat.format(GEODE_0_PROPERTIES_1_NOT_FOUND_MESSAGE,
         "Security ", missingSecurityPropertiesPath);
diff --git a/geode-assembly/src/distributedTest/java/org/apache/geode/management/internal/cli/commands/StartServerCommandDUnitTest.java
b/geode-assembly/src/distributedTest/java/org/apache/geode/management/internal/cli/commands/StartServerCommandDUnitTest.java
index dd96e99..064d76b 100644
--- a/geode-assembly/src/distributedTest/java/org/apache/geode/management/internal/cli/commands/StartServerCommandDUnitTest.java
+++ b/geode-assembly/src/distributedTest/java/org/apache/geode/management/internal/cli/commands/StartServerCommandDUnitTest.java
@@ -40,6 +40,7 @@ import java.io.IOException;
 import java.lang.management.ManagementFactory;
 import java.net.InetSocketAddress;
 import java.net.Socket;
+import java.nio.file.Paths;
 
 import org.junit.AfterClass;
 import org.junit.Before;
@@ -103,7 +104,8 @@ public class StartServerCommandDUnitTest {
   @Test
   public void testWithMissingCacheXml() throws IOException {
     final Integer serverPort = AvailablePortHelper.getRandomAvailableTCPPort();
-    final String missingCacheXmlPath = "/missing/cache.xml";
+    final String missingCacheXmlPath =
+        Paths.get("missing", "cache.xml").toAbsolutePath().toString();
     final String memberName = "testWithMissingCacheXml-server";
     final String expectedError =
         CliStrings.format(CACHE_XML_NOT_FOUND_MESSAGE, missingCacheXmlPath);
@@ -125,7 +127,8 @@ public class StartServerCommandDUnitTest {
   @Test
   public void testWithMissingGemFirePropertiesFile() throws IOException {
     final Integer serverPort = AvailablePortHelper.getRandomAvailableTCPPort();
-    final String missingGemfirePropertiesPath = "/missing/gemfire.properties";
+    final String missingGemfirePropertiesPath =
+        Paths.get("missing", "gemfire.properties").toAbsolutePath().toString();
     final String memberName = "testWithMissingGemFirePropertiesFile-server";
     final String expectedError =
         CliStrings.format(GEODE_0_PROPERTIES_1_NOT_FOUND_MESSAGE, "", missingGemfirePropertiesPath);
@@ -167,7 +170,8 @@ public class StartServerCommandDUnitTest {
   @Test
   public void testWithMissingSecurityPropertiesFile() throws IOException {
     final Integer serverPort = AvailablePortHelper.getRandomAvailableTCPPort();
-    final String missingSecurityPropertiesPath = "/missing/security.properties";
+    final String missingSecurityPropertiesPath =
+        Paths.get("missing", "security.properties").toAbsolutePath().toString();
     final String memberName = "testWithMissingSecurityPropertiesFile-server";
     final String expectedError = CliStrings.format(GEODE_0_PROPERTIES_1_NOT_FOUND_MESSAGE,
         "Security ", missingSecurityPropertiesPath);


Mime
View raw message