You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by st...@apache.org on 2020/12/05 16:57:17 UTC
[hbase] branch master updated: HBASE-25361 [Flakey Tests] branch-2
TestMetaRegionLocationCache.testStandByMetaLocations (#2736)
This is an automated email from the ASF dual-hosted git repository.
stack pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hbase.git
The following commit(s) were added to refs/heads/master by this push:
new 6791b29 HBASE-25361 [Flakey Tests] branch-2 TestMetaRegionLocationCache.testStandByMetaLocations (#2736)
6791b29 is described below
commit 6791b29771892dff7ae8d16de2c99502162f2e69
Author: Michael Stack <sa...@users.noreply.github.com>
AuthorDate: Sat Dec 5 08:55:59 2020 -0800
HBASE-25361 [Flakey Tests] branch-2 TestMetaRegionLocationCache.testStandByMetaLocations (#2736)
Add a bit of a wait before testing if online replicas match the zk count. It might take a
while for all replicas to come online.
Signed-off-by: huaxiangsun <hu...@apache.org>
---
.../apache/hadoop/hbase/client/TestMetaRegionLocationCache.java | 8 ++++++++
1 file changed, 8 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 d42c124..577e15c 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
@@ -98,6 +98,14 @@ public class TestMetaRegionLocationCache {
assertFalse(metaHRLs.isEmpty());
ZKWatcher zk = master.getZooKeeper();
List<String> metaZnodes = zk.getMetaReplicaNodes();
+ // Wait till all replicas available.
+ while (master.getMetaRegionLocationCache().getMetaRegionLocations().get().size() !=
+ metaZnodes.size()) {
+ Thread.sleep(1000);
+ if (++retries == 10) {
+ break;
+ }
+ }
assertEquals(metaZnodes.size(), metaHRLs.size());
List<HRegionLocation> actualHRLs = getCurrentMetaLocations(zk);
Collections.sort(metaHRLs);