HBASE-25361 [Flakey Tests] branch-2 TestMetaRegionLocationCache.testStandByMetaLocations (#2736)

Addendum; Reset counter so we actually wait in the new loop added by the
above.
This commit is contained in:
stack 2020-12-05 14:00:18 -08:00
parent 6791b29771
commit 7d0a687e57
1 changed files with 2 additions and 0 deletions

View File

@ -99,6 +99,7 @@ public class TestMetaRegionLocationCache {
ZKWatcher zk = master.getZooKeeper(); ZKWatcher zk = master.getZooKeeper();
List<String> metaZnodes = zk.getMetaReplicaNodes(); List<String> metaZnodes = zk.getMetaReplicaNodes();
// Wait till all replicas available. // Wait till all replicas available.
retries = 0;
while (master.getMetaRegionLocationCache().getMetaRegionLocations().get().size() != while (master.getMetaRegionLocationCache().getMetaRegionLocations().get().size() !=
metaZnodes.size()) { metaZnodes.size()) {
Thread.sleep(1000); Thread.sleep(1000);
@ -119,6 +120,7 @@ public class TestMetaRegionLocationCache {
@Test public void testStandByMetaLocations() throws Exception { @Test public void testStandByMetaLocations() throws Exception {
HMaster standBy = TEST_UTIL.getMiniHBaseCluster().startMaster().getMaster(); HMaster standBy = TEST_UTIL.getMiniHBaseCluster().startMaster().getMaster();
standBy.isInitialized();
verifyCachedMetaLocations(standBy); verifyCachedMetaLocations(standBy);
} }