public static void createTable(HBaseTestingUtil testUtil, TableDescriptor tableDescriptor,
    byte[][] splitKeys) 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.tableCreationLatch = new CountDownLatch(1);
    Admin admin = testUtil.getAdmin();
    if (splitKeys != null) {
      admin.createTable(tableDescriptor, splitKeys);
    } else {
      admin.createTable(tableDescriptor);
    }
    observer.tableCreationLatch.await();
    observer.tableCreationLatch = null;
    testUtil.waitUntilAllRegionsAssigned(tableDescriptor.getTableName());
  }
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