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 2019/05/28 09:27:56 UTC

[hbase] branch branch-2.0 updated: HBASE-22003 Fix flaky test TestVerifyReplication.testHBase14905

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

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


The following commit(s) were added to refs/heads/branch-2.0 by this push:
     new f7dff8e  HBASE-22003 Fix flaky test TestVerifyReplication.testHBase14905
f7dff8e is described below

commit f7dff8e499ac07688ef50c09d6fb811979ba98f1
Author: Guanghao <zg...@apache.org>
AuthorDate: Tue May 28 17:22:53 2019 +0800

    HBASE-22003 Fix flaky test TestVerifyReplication.testHBase14905
---
 .../hadoop/hbase/replication/TestVerifyReplication.java       | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/hbase-mapreduce/src/test/java/org/apache/hadoop/hbase/replication/TestVerifyReplication.java b/hbase-mapreduce/src/test/java/org/apache/hadoop/hbase/replication/TestVerifyReplication.java
index e1fda4e..d72379c 100644
--- a/hbase-mapreduce/src/test/java/org/apache/hadoop/hbase/replication/TestVerifyReplication.java
+++ b/hbase-mapreduce/src/test/java/org/apache/hadoop/hbase/replication/TestVerifyReplication.java
@@ -229,11 +229,12 @@ public class TestVerifyReplication extends TestReplicationBase {
     // normal Batch tests
     byte[] qualifierName = Bytes.toBytes("f1");
     Put put = new Put(Bytes.toBytes("r1"));
-    put.addColumn(famName, qualifierName, Bytes.toBytes("v1002"));
+    long ts = System.currentTimeMillis();
+    put.addColumn(famName, qualifierName, ts + 1, Bytes.toBytes("v1002"));
     htable1.put(put);
-    put.addColumn(famName, qualifierName, Bytes.toBytes("v1001"));
+    put.addColumn(famName, qualifierName, ts + 2, Bytes.toBytes("v1001"));
     htable1.put(put);
-    put.addColumn(famName, qualifierName, Bytes.toBytes("v1112"));
+    put.addColumn(famName, qualifierName, ts + 3, Bytes.toBytes("v1112"));
     htable1.put(put);
 
     Scan scan = new Scan();
@@ -268,9 +269,9 @@ public class TestVerifyReplication extends TestReplicationBase {
       }
     }
 
-    put.addColumn(famName, qualifierName, Bytes.toBytes("v1111"));
+    put.addColumn(famName, qualifierName, ts + 4, Bytes.toBytes("v1111"));
     htable2.put(put);
-    put.addColumn(famName, qualifierName, Bytes.toBytes("v1112"));
+    put.addColumn(famName, qualifierName, ts + 5, Bytes.toBytes("v1112"));
     htable2.put(put);
 
     scan = new Scan();