HBASE-15206 Fix flakey testSplitDaughtersNotInMeta (Huaxiang Sun)

This commit is contained in:
Jonathan M Hsieh 2016-02-02 16:40:48 -08:00
parent 1bf58675c7
commit b69b8aced6
1 changed files with 5 additions and 0 deletions

View File

@ -1791,6 +1791,10 @@ public class TestHBaseFsck {
HRegionInfo hri = location.getRegionInfo(); HRegionInfo hri = location.getRegionInfo();
// Disable CatalogJanitor to prevent it from cleaning up the parent region
// after split.
admin.enableCatalogJanitor(false);
// do a regular split // do a regular split
byte[] regionName = location.getRegionInfo().getRegionName(); byte[] regionName = location.getRegionInfo().getRegionName();
admin.splitRegion(location.getRegionInfo().getRegionName(), Bytes.toBytes("BM")); admin.splitRegion(location.getRegionInfo().getRegionName(), Bytes.toBytes("BM"));
@ -1839,6 +1843,7 @@ public class TestHBaseFsck {
assertEquals(tbl.getStartKeys().length, SPLITS.length + 1 + 1); //SPLITS + 1 is # regions pre-split. assertEquals(tbl.getStartKeys().length, SPLITS.length + 1 + 1); //SPLITS + 1 is # regions pre-split.
assertNoErrors(doFsck(conf, false)); //should be fixed by now assertNoErrors(doFsck(conf, false)); //should be fixed by now
} finally { } finally {
admin.enableCatalogJanitor(true);
meta.close(); meta.close();
cleanupTable(table); cleanupTable(table);
} }