You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by zg...@apache.org on 2020/05/14 04:11:29 UTC

[hbase] branch branch-2.2 updated: HBASE-24080 [flakey test] TestRegionReplicaFailover.testSecondaryRegionKill fails. (#1421) (#1423) (#1706)

This is an automated email from the ASF dual-hosted git repository.

zghao pushed a commit to branch branch-2.2
in repository https://gitbox.apache.org/repos/asf/hbase.git


The following commit(s) were added to refs/heads/branch-2.2 by this push:
     new b0c46bc  HBASE-24080 [flakey test] TestRegionReplicaFailover.testSecondaryRegionKill fails. (#1421) (#1423) (#1706)
b0c46bc is described below

commit b0c46bc74d029b00cc20a7d2e5735bf74ada2a5d
Author: Guanghao Zhang <zg...@apache.org>
AuthorDate: Thu May 14 12:11:18 2020 +0800

    HBASE-24080 [flakey test] TestRegionReplicaFailover.testSecondaryRegionKill fails. (#1421) (#1423) (#1706)
    
    Signed-off-by: stack <st...@apache.org>
    Co-authored-by: huaxiangsun <hu...@apache.org>
---
 .../hadoop/hbase/regionserver/TestRegionReplicaFailover.java      | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestRegionReplicaFailover.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestRegionReplicaFailover.java
index cd9e1a5..8a2123e 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestRegionReplicaFailover.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestRegionReplicaFailover.java
@@ -41,7 +41,6 @@ import org.apache.hadoop.hbase.testclassification.LargeTests;
 import org.apache.hadoop.hbase.util.Bytes;
 import org.apache.hadoop.hbase.util.JVMClusterUtil.RegionServerThread;
 import org.apache.hadoop.hbase.util.ServerRegionReplicaUtil;
-import org.apache.hadoop.hbase.util.Threads;
 import org.junit.After;
 import org.junit.Before;
 import org.junit.ClassRule;
@@ -235,9 +234,10 @@ public class TestRegionReplicaFailover {
       }
       assertTrue(aborted);
 
-      Threads.sleep(5000);
-
-      HTU.verifyNumericRows(table, fam, 0, 1000, 1);
+      // It takes extra time for replica region is ready for read as during
+      // region open process, it needs to ask primary region to do a flush and replica region
+      // can open newly flushed hfiles to avoid data out-of-sync.
+      verifyNumericRowsWithTimeout(table, fam, 0, 1000, 1, 30000);
       HTU.verifyNumericRows(table, fam, 0, 1000, 2);
     }