You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@geode.apache.org by sa...@apache.org on 2018/08/28 19:53:07 UTC
[geode] branch develop updated: GEODE-5650: Improve
ClusterStartupRule tear down (#2392)
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 8382f8c GEODE-5650: Improve ClusterStartupRule tear down (#2392)
8382f8c is described below
commit 8382f8cff8120076fa9af7816e8454575c3a189c
Author: Sai Boorlagadda <sa...@gmail.com>
AuthorDate: Tue Aug 28 12:53:00 2018 -0700
GEODE-5650: Improve ClusterStartupRule tear down (#2392)
---
.../geode/test/dunit/rules/ClusterStartupRule.java | 44 +++++++++++-----------
1 file changed, 23 insertions(+), 21 deletions(-)
diff --git a/geode-dunit/src/main/java/org/apache/geode/test/dunit/rules/ClusterStartupRule.java b/geode-dunit/src/main/java/org/apache/geode/test/dunit/rules/ClusterStartupRule.java
index de71e7b..d4f434e 100644
--- a/geode-dunit/src/main/java/org/apache/geode/test/dunit/rules/ClusterStartupRule.java
+++ b/geode-dunit/src/main/java/org/apache/geode/test/dunit/rules/ClusterStartupRule.java
@@ -148,27 +148,29 @@ public class ClusterStartupRule extends ExternalResource implements Serializable
@Override
protected void after() {
- try {
- DUnitLauncher.closeAndCheckForSuspects();
- } finally {
- MemberStarterRule.disconnectDSIfAny();
-
- // stop all the members in the order of clients, servers and locators
- List<VMProvider> vms = new ArrayList<>();
- vms.addAll(
- occupiedVMs.values().stream().filter(x -> x.isClient()).collect(Collectors.toSet()));
- vms.addAll(
- occupiedVMs.values().stream().filter(x -> x.isServer()).collect(Collectors.toSet()));
- vms.addAll(
- occupiedVMs.values().stream().filter(x -> x.isLocator()).collect(Collectors.toSet()));
- vms.forEach(x -> x.stop());
-
- // delete any file under root dir
- Arrays.stream(getWorkingDirRoot().listFiles()).filter(File::isFile)
- .forEach(FileUtils::deleteQuietly);
-
- restoreSystemProperties.after();
- }
+
+ MemberStarterRule.disconnectDSIfAny();
+
+ // stop all the members in the order of clients, servers and locators
+ List<VMProvider> vms = new ArrayList<>();
+ vms.addAll(
+ occupiedVMs.values().stream().filter(x -> x.isClient()).collect(Collectors.toSet()));
+ vms.addAll(
+ occupiedVMs.values().stream().filter(x -> x.isServer()).collect(Collectors.toSet()));
+ vms.addAll(
+ occupiedVMs.values().stream().filter(x -> x.isLocator()).collect(Collectors.toSet()));
+ vms.forEach(x -> x.stop());
+
+ // delete any file under root dir
+ Arrays.stream(getWorkingDirRoot().listFiles()).filter(File::isFile)
+ .forEach(FileUtils::deleteQuietly);
+
+ restoreSystemProperties.after();
+
+ // close suspect string at the end of tear down
+ // any background thread can fill the dunit_suspect.log
+ // after its been truncated if we do it before closing cache
+ DUnitLauncher.closeAndCheckForSuspects();
}
public MemberVM startLocatorVM(int index, int... locatorPort) {