Index: src/test/java/org/apache/hadoop/hbase/coprocessor/TestMasterObserver.java =================================================================== --- src/test/java/org/apache/hadoop/hbase/coprocessor/TestMasterObserver.java (revision 1205795) +++ src/test/java/org/apache/hadoop/hbase/coprocessor/TestMasterObserver.java (working copy) @@ -644,7 +644,9 @@ cp.resetStates(); HTable table = UTIL.createTable(TEST_TABLE, TEST_FAMILY); - UTIL.createMultiRegions(table, TEST_FAMILY); + int countOfRegions = UTIL.createMultiRegions(table, TEST_FAMILY); + UTIL.waitUntilAllRegionsAssigned(countOfRegions); + NavigableMap regions = table.getRegionLocations(); Map.Entry firstGoodPair = null; for (Map.Entry e: regions.entrySet()) {