@After
  public void tearDown() throws Exception {
    try {
      if (cache != null && !cache.isClosed()) {
        for (final Region<?, ?> region : cache.rootRegions()) {
          Region root = (Region) region;
          // String name = root.getName();
          if (root.isDestroyed() || root instanceof HARegion) {
            continue;
          }
          try {
            root.localDestroyRegion("teardown");
          } catch (VirtualMachineError e) { // TODO: remove all this error handling
            SystemFailure.initiateFailure(e);
            throw e;
          } catch (Throwable t) {
            cache.getLogger().error(t);
          }
        }
      }
    } finally {
      try {
        closeCache();
      } catch (VirtualMachineError e) { // TODO: remove all this error handling
        SystemFailure.initiateFailure(e);
        throw e;
      } catch (Throwable t) {
        cache.getLogger().error("Error in closing the cache ", t);

      }
    }
  }
Test methods to ensure that disk Clear is apparently atomic to region clear.

Data on disk should reflect data in memory. A put while clear is going on should wait for clear
and if it is successfully recorded in memory than it should be recorded on disk. Else if not
successfully recorded in memory than should not be recorded on disk

TODO: use DiskRegionTestingBase and DiskRegionHelperFactory
geode-core/src/integrationTest/java/org/apache/geode/internal/cache/DiskRegionClearJUnitTest.java