From 97090560a5a53ef5f0feaa267e39e5305d60552e Mon Sep 17 00:00:00 2001 From: Guanghao Date: Tue, 28 May 2019 17:22:53 +0800 Subject: [PATCH] HBASE-22003 Fix flaky test TestVerifyReplication.testHBase14905 --- .../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 4ef1214e636..7d12cbcc6b0 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();