[ https://issues.apache.org/jira/browse/GEODE-3539?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16270140#comment-16270140 ]
ASF GitHub Bot commented on GEODE-3539: --------------------------------------- jinmeiliao closed pull request #1094: GEODE-3539: add ability to stop a vm without clean out the working dir URL: https://github.com/apache/geode/pull/1094 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/test/java/org/apache/geode/management/internal/configuration/ImportClusterConfigDistributedTest.java b/geode-core/src/test/java/org/apache/geode/management/internal/configuration/ImportClusterConfigDistributedTest.java index 46d1f7a83e..11795f7a50 100644 --- a/geode-core/src/test/java/org/apache/geode/management/internal/configuration/ImportClusterConfigDistributedTest.java +++ b/geode-core/src/test/java/org/apache/geode/management/internal/configuration/ImportClusterConfigDistributedTest.java @@ -75,8 +75,8 @@ public void exportClusterConfig() throws Exception { .statusIsSuccess(); gfsh.disconnect(); - locator.stopMember(); - server.stopMember(); + locator.stopMember(true); + server.stopMember(true); assertThat(this.exportedClusterConfig).exists(); assertThat(this.exportedClusterConfig.length()).isGreaterThan(100); diff --git a/geode-core/src/test/java/org/apache/geode/test/dunit/rules/LocatorServerStartupRule.java b/geode-core/src/test/java/org/apache/geode/test/dunit/rules/LocatorServerStartupRule.java index a3c2944898..c9e2c8337c 100644 --- a/geode-core/src/test/java/org/apache/geode/test/dunit/rules/LocatorServerStartupRule.java +++ b/geode-core/src/test/java/org/apache/geode/test/dunit/rules/LocatorServerStartupRule.java @@ -301,10 +301,14 @@ public MemberVM startServerAsEmbededLocator(int index, Properties properties) th } public void stopVM(int index) { + stopVM(index, true); + } + + public void stopVM(int index, boolean cleanWorkingDir) { MemberVM member = members.get(index); // user has started a server/locator in this VM if (member != null) { - member.stopMember(); + member.stopMember(cleanWorkingDir); } // user may have used this VM as a client VM else { diff --git a/geode-core/src/test/java/org/apache/geode/test/dunit/rules/MemberVM.java b/geode-core/src/test/java/org/apache/geode/test/dunit/rules/MemberVM.java index 4e04b8eb8b..a61fabb5e3 100644 --- a/geode-core/src/test/java/org/apache/geode/test/dunit/rules/MemberVM.java +++ b/geode-core/src/test/java/org/apache/geode/test/dunit/rules/MemberVM.java @@ -101,8 +101,12 @@ public int getEmbeddedLocatorPort() { return ((Server) member).getEmbeddedLocatorPort(); } - public void stopMember() { + public void stopMember(boolean cleanWorkingDir) { this.invoke(LocatorServerStartupRule::stopMemberInThisVM); + if (!cleanWorkingDir) { + return; + } + if (tempWorkingDir) { /* * this temporary workingDir will dynamically change the "user.dir". system property to point ---------------------------------------------------------------- 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: us...@infra.apache.org > Add more test coverage for p2p commands > --------------------------------------- > > Key: GEODE-3539 > URL: https://issues.apache.org/jira/browse/GEODE-3539 > Project: Geode > Issue Type: Improvement > Components: gfsh > Reporter: Jinmei Liao > > Add more command tests that would eventually get rid of the legacy tests. -- This message was sent by Atlassian JIRA (v6.4.14#64029)