@Test
  @Override
  public void testCloneLinksAfterDelete() throws IOException, InterruptedException {
    // delay the flush to make sure
    delayFlush = true;
    SnapshotTestingUtils.loadData(TEST_UTIL, tableName, 20, FAMILY);
    long tid = EnvironmentEdgeManager.currentTime();
    String snapshotName3 = "snaptb3-" + tid;
    TableName clonedTableName3 =
      TableName.valueOf(name.getMethodName() + EnvironmentEdgeManager.currentTime());
    admin.snapshot(snapshotName3, tableName);
    delayFlush = false;
    int snapshot3Rows = -1;
    try (Table table = TEST_UTIL.getConnection().getTable(tableName)) {
      snapshot3Rows = HBaseTestingUtil.countRows(table);
    }
    admin.cloneSnapshot(snapshotName3, clonedTableName3);
    admin.deleteSnapshot(snapshotName3);
    super.testCloneLinksAfterDelete();
    verifyRowCount(TEST_UTIL, clonedTableName3, snapshot3Rows);
    admin.disableTable(clonedTableName3);
    admin.deleteTable(clonedTableName3);
  }
This coprocessor is used to delay the flush.
hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestMobCloneSnapshotFromClientCloneLinksAfterDelete.java