diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestMetaRegionLocationCache.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestMetaRegionLocationCache.java index 577e15cedfb..2bcddc9ea7f 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestMetaRegionLocationCache.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestMetaRegionLocationCache.java @@ -99,6 +99,7 @@ public class TestMetaRegionLocationCache { ZKWatcher zk = master.getZooKeeper(); List metaZnodes = zk.getMetaReplicaNodes(); // Wait till all replicas available. + retries = 0; while (master.getMetaRegionLocationCache().getMetaRegionLocations().get().size() != metaZnodes.size()) { Thread.sleep(1000); @@ -119,6 +120,7 @@ public class TestMetaRegionLocationCache { @Test public void testStandByMetaLocations() throws Exception { HMaster standBy = TEST_UTIL.getMiniHBaseCluster().startMaster().getMaster(); + standBy.isInitialized(); verifyCachedMetaLocations(standBy); }