[ 
https://issues.apache.org/jira/browse/GEODE-5650?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Sai Boorlagadda closed GEODE-5650.
----------------------------------

> Improve ClusterStartupRule tear down
> ------------------------------------
>
>                 Key: GEODE-5650
>                 URL: https://issues.apache.org/jira/browse/GEODE-5650
>             Project: Geode
>          Issue Type: Improvement
>          Components: tests
>            Reporter: Sai Boorlagadda
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 1.7.0
>
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> in CSRule teardown if we close suspect buffer before closing cache can cause 
> some background threads (eg: client pool) to keep sending events and log 
> exceptions (if any) could result in the next test to fail for suspects. So 
> close the suspect buffer after closing cache in all VMs.
> {code:java}
>   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();
>     }
>   }
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to