public static void deleteTable(HBaseTestingUtil testUtil, TableName tableName) throws Exception {
    // NOTE: We need a latch because admin is not sync,
    // so the postOp coprocessor method may be called after the admin operation returned.
    MasterSyncObserver observer = testUtil.getHBaseCluster().getMaster().getMasterCoprocessorHost()
      .findCoprocessor(MasterSyncObserver.class);
    observer.tableDeletionLatch = new CountDownLatch(1);
    Admin admin = testUtil.getAdmin();
    try {
      admin.disableTable(tableName);
    } catch (Exception e) {
      LOG.debug("Table: " + tableName + " already disabled, so just deleting it.");
    }
    admin.deleteTable(tableName);
    observer.tableDeletionLatch.await();
    observer.tableDeletionLatch = null;
  }
We were only clearing rows that had a hregioninfo column in hbase:meta. Mangled rows that were
missing the hregioninfo because of error were being left behind messing up any subsequent table
made with the same name. HBASE-12980
hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestEnableTable.java