private Table setupTable(TableName tableName) throws Exception {
    TableDescriptorBuilder builder = TableDescriptorBuilder.newBuilder(tableName);
    // Flush many files, but do not compact immediately
    // Make sure that the region does not split
    builder.setMemStoreFlushSize(5000)
      .setRegionSplitPolicyClassName(ConstantSizeRegionSplitPolicy.class.getName())
      .setMaxFileSize(100 * 1024 * 1024).setValue("hbase.hstore.compactionThreshold", "250");

    TableDescriptor td = builder.build();
    byte[] fam = Bytes.toBytes("fam");
    Table table = TEST_UTIL.createTable(td, new byte[][] { fam }, TEST_UTIL.getConfiguration());
    TEST_UTIL.loadTable(table, fam);
    return table;
  }
Tests adding a region to the snapshot manifest while compactions are running on the region. The
idea is to slow down the process of adding a store file to the manifest while triggering
compactions on the region, allowing the store files to be marked for archival while snapshot
operation is running. This test checks for the correct behavior in such a case that the
compacted files should not be moved around if a snapshot operation is in progress. See
HBASE-18398
hbase-server/src/test/java/org/apache/hadoop/hbase/snapshot/TestRegionSnapshotTask.java