@Test
  public void testCompact() throws Exception {
    compactionTest(TableName.valueOf("testCompact1"), 15, CompactionState.MINOR, false);
    compactionTest(TableName.valueOf("testCompact2"), 15, CompactionState.MINOR, true);

    // For major compaction, set up a higher hbase.hstore.compaction.min to avoid
    // minor compactions. It is a hack to avoid random delays introduced by Admins's
    // updateConfiguration() method.
    TEST_UTIL.getMiniHBaseCluster().getRegionServerThreads().forEach(thread -> {
      Configuration conf = thread.getRegionServer().getConfiguration();
      conf.setInt(CompactionConfiguration.HBASE_HSTORE_COMPACTION_MIN_KEY, 25);
    });

    compactionTest(TableName.valueOf("testCompact3"), 8, CompactionState.MAJOR, false);
    compactionTest(TableName.valueOf("testCompact4"), 8, CompactionState.MAJOR, true);

    // Restore to default
    TEST_UTIL.getMiniHBaseCluster().getRegionServerThreads().forEach(thread -> {
      Configuration conf = thread.getRegionServer().getConfiguration();
      conf.unset(CompactionConfiguration.HBASE_HSTORE_COMPACTION_MIN_KEY);
    });
  }
Class to test asynchronous region admin operations.
@see TestAsyncRegionAdminApi2 This test and it used to be joined it was taking longer than our
     ten minute timeout so they were split.
hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestAsyncRegionAdminApi.java