From 7d0a687e5798a2f4ca3190b409169f7e17a75b34 Mon Sep 17 00:00:00 2001 From: stack Date: Sat, 5 Dec 2020 14:00:18 -0800 Subject: [PATCH] HBASE-25361 [Flakey Tests] branch-2 TestMetaRegionLocationCache.testStandByMetaLocations (#2736) Addendum; Reset counter so we actually wait in the new loop added by the above. --- .../apache/hadoop/hbase/client/TestMetaRegionLocationCache.java | 2 ++ 1 file changed, 2 insertions(+) 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); }