@Override
      public void beforeGoingToCompact() {
        try {
          // wait for operations to get over
          awaitLatch(allowCompactorLatch);

          DiskRegion diskRegion = getDiskRegion(region);
          oplogSizeBeforeRolling = diskRegion.getOplogIdToOplog().size();
          assertThat(oplogSizeBeforeRolling).isGreaterThan(0);

          closeRegionFuture.set(executorServiceRule.runAsync(() -> {
            closingRegionLatch.countDown();
            DiskStoreImpl diskStoreImpl = getDiskStore(region);
            region.close();
            diskStoreImpl.close();
          }));

          // wait for th to call afterSignallingCompactor
          awaitLatch(compactorSignalledLatch);
        } catch (AssertionError | Exception e) {
          errorCollector.addError(e);
        }
      }
If IOException occurs while initializing a region, then the cache servers should not be
stopped
geode-core/src/integrationTest/java/org/apache/geode/internal/cache/DiskRegionJUnitTest.java