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:08 UTC

[hbase] branch branch-2.1 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.1
in repository https://gitbox.apache.org/repos/asf/hbase.git


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

commit c51ec42a44066d9a26849a71e6c56ce7bfbc0f0a
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 4ef1214..7d12cbc 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
@@ -252,11 +252,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();
@@ -291,9 +292,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();