Uploaded image for project: 'Geode'
  1. Geode
  2. GEODE-5650

Improve ClusterStartupRule tear down

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 1.7.0
    • tests

    Description

      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.

        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();
          }
        }
      

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              sboorlagadda Sai Boorlagadda
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 20m
                  20m