GEODE-3328: fix testAddGemFirePropertyFileToCommandLine on Windows Modification of ca4b81 committed by Jinmei Liao
Project: http://git-wip-us.apache.org/repos/asf/geode/repo Commit: http://git-wip-us.apache.org/repos/asf/geode/commit/e07b5c1c Tree: http://git-wip-us.apache.org/repos/asf/geode/tree/e07b5c1c Diff: http://git-wip-us.apache.org/repos/asf/geode/diff/e07b5c1c Branch: refs/heads/feature/GEODE-3249 Commit: e07b5c1c6531b7ad57c5e455fa0a31ce61f3b25f Parents: bc655eb Author: Kirk Lund <kl...@apache.org> Authored: Tue Aug 15 11:47:58 2017 -0700 Committer: Kirk Lund <kl...@apache.org> Committed: Tue Aug 15 14:57:24 2017 -0700 ---------------------------------------------------------------------- .../internal/cli/commands/GfshCommandJUnitTest.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/geode/blob/e07b5c1c/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/GfshCommandJUnitTest.java ---------------------------------------------------------------------- diff --git a/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/GfshCommandJUnitTest.java b/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/GfshCommandJUnitTest.java index da60c7a..f6c7cae 100644 --- a/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/GfshCommandJUnitTest.java +++ b/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/GfshCommandJUnitTest.java @@ -409,13 +409,16 @@ public class GfshCommandJUnitTest { @Test public void testAddGemFirePropertyFileToCommandLine() { - final List<String> commandLine = new ArrayList<>(); + List<String> commandLine = new ArrayList<>(); assertTrue(commandLine.isEmpty()); + StartMemberUtils.addGemFirePropertyFile(commandLine, null); assertTrue(commandLine.isEmpty()); - StartMemberUtils.addGemFirePropertyFile(commandLine, new File("/path/to/gemfire.properties")); + + File file = new File("/path/to/gemfire.properties"); + StartMemberUtils.addGemFirePropertyFile(commandLine, file); assertFalse(commandLine.isEmpty()); - assertTrue(commandLine.contains("-DgemfirePropertyFile=/path/to/gemfire.properties")); + assertTrue(commandLine.contains("-DgemfirePropertyFile=" + file.getAbsolutePath())); } @Test