// Wait for atleast 3 full block reports from the datanode.
while (System.currentTimeMillis() - start <= MAX_WAIT_TIME) {
// This makes sure we trigger, redudant addStoredBlocks() on the NameNode.
for (DatanodeInfo dn : ns.datanodeReport(DatanodeReportType.ALL)) {
ns.unprotectedRemoveDatanode(ns.getDatanode(dn));
}
Thread.sleep(200);
}
// Verify atleast 3 full block reports took place.