Skip to content

Commit 9709056

Browse files
authored
HBASE-22003 Fix flaky test TestVerifyReplication.testHBase14905
1 parent 1c1638f commit 9709056

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

hbase-mapreduce/src/test/java/org/apache/hadoop/hbase/replication/TestVerifyReplication.java

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -252,11 +252,12 @@ public void testHBase14905() throws Exception {
252252
// normal Batch tests
253253
byte[] qualifierName = Bytes.toBytes("f1");
254254
Put put = new Put(Bytes.toBytes("r1"));
255-
put.addColumn(famName, qualifierName, Bytes.toBytes("v1002"));
255+
long ts = System.currentTimeMillis();
256+
put.addColumn(famName, qualifierName, ts + 1, Bytes.toBytes("v1002"));
256257
htable1.put(put);
257-
put.addColumn(famName, qualifierName, Bytes.toBytes("v1001"));
258+
put.addColumn(famName, qualifierName, ts + 2, Bytes.toBytes("v1001"));
258259
htable1.put(put);
259-
put.addColumn(famName, qualifierName, Bytes.toBytes("v1112"));
260+
put.addColumn(famName, qualifierName, ts + 3, Bytes.toBytes("v1112"));
260261
htable1.put(put);
261262

262263
Scan scan = new Scan();
@@ -291,9 +292,9 @@ public void testHBase14905() throws Exception {
291292
}
292293
}
293294

294-
put.addColumn(famName, qualifierName, Bytes.toBytes("v1111"));
295+
put.addColumn(famName, qualifierName, ts + 4, Bytes.toBytes("v1111"));
295296
htable2.put(put);
296-
put.addColumn(famName, qualifierName, Bytes.toBytes("v1112"));
297+
put.addColumn(famName, qualifierName, ts + 5, Bytes.toBytes("v1112"));
297298
htable2.put(put);
298299

299300
scan = new Scan();

0 commit comments

Comments
 (0)