@Override
    protected void refreshStoreSizeAndTotalBytes() throws IOException {
      if (r != null) {
        try {
          r.compactionsWaiting.countDown();
          r.compactionsBlocked.await();
        } catch (InterruptedException ex) {
          throw new IOException(ex);
        }
      }
      super.refreshStoreSizeAndTotalBytes();
    }
An override of HRegion that allows us park compactions in a holding pattern and then when
appropriate for the test, allow them proceed again. This allows the compaction entry to go the
WAL before blocking, but blocks afterwards
hbase-server/src/test/java/org/apache/hadoop/hbase/TestIOFencing.java