@After
  public void tearDown() throws Exception {
    try {
      beforeGoingToCompactLatch.countDown();
      cache.close();
    } finally {
      CacheObserverHolder.setInstance(null);
      DiskStoreImpl.SET_IGNORE_PREALLOCATE = false;
      LocalRegion.ISSUE_CALLBACKS_TO_CACHE_OBSERVER = false;
      disconnectAllFromDS();
    }
  }
Extracted {@code testCompactorClose} from {@link DiskRegionJUnitTest}.
geode-core/src/integrationTest/java/org/apache/geode/internal/cache/DiskRegionCompactorCloseIntegrationTest.java