HBASE-6507 [hbck] TestHBaseFsck ran into TableNotEnabledException
git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1369363 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
87a250924c
commit
ffe24f3c97
@ -312,6 +312,18 @@ public class TestHBaseFsck {
|
|||||||
}
|
}
|
||||||
tbl.put(puts);
|
tbl.put(puts);
|
||||||
tbl.flushCommits();
|
tbl.flushCommits();
|
||||||
|
long endTime = System.currentTimeMillis() + 60000;
|
||||||
|
while (!TEST_UTIL.getHBaseAdmin().isTableEnabled(tablename)) {
|
||||||
|
try {
|
||||||
|
if (System.currentTimeMillis() > endTime) {
|
||||||
|
fail("Failed to enable table " + tablename + " after waiting for 60 sec");
|
||||||
|
}
|
||||||
|
Thread.sleep(100);
|
||||||
|
} catch (InterruptedException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
fail("Interrupted when waiting table " + tablename + " to be enabled");
|
||||||
|
}
|
||||||
|
}
|
||||||
return tbl;
|
return tbl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user