break;
}
}
// Disable the table in ZK
ZKTable zkTable = am.getZKTable();
zkTable.setDisablingTable(table);
ZKAssign.createNodeClosing(master.getZooKeeper(), closingRegion, serverName);
// Stop the master
abortMaster(cluster);
master = startMasterAndWaitTillMetaRegionAssignment(cluster);
deadRS.kill();
deadRS.join();
waitUntilMasterIsInitialized(master);
am = cluster.getMaster().getAssignmentManager();
zkTable = am.getZKTable();
// wait for no more RIT
ZKAssign.blockUntilNoRIT(master.getZooKeeper());
while (!master.getAssignmentManager().getZKTable().isDisabledTable(table)) {
Thread.sleep(10);
}
assertTrue("Table should be disabled state.", zkTable.isDisabledTable(table));
HBaseAdmin admin = new HBaseAdmin(master.getConfiguration());
admin.deleteTable(table);
}