You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by hu...@apache.org on 2020/04/02 21:56:13 UTC

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

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

huaxiangsun 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 37aa669  HBASE-24080 [flakey test] TestRegionReplicaFailover.testSecondaryRegionKill fails. (#1421)
37aa669 is described below

commit 37aa6690b5ef95e110e30c77056708fdefc909b4
Author: huaxiangsun <hu...@apache.org>
AuthorDate: Thu Apr 2 14:55:55 2020 -0700

    HBASE-24080 [flakey test] TestRegionReplicaFailover.testSecondaryRegionKill fails. (#1421)
    
    Signed-off-by: stack <st...@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 8907c8c..c119026 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
@@ -42,7 +42,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;
@@ -238,9 +237,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);
     }