diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/util/TestCoprocessorScanPolicy.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/util/TestCoprocessorScanPolicy.java index 4aad86ee6cd..fad685dc049 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/util/TestCoprocessorScanPolicy.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/util/TestCoprocessorScanPolicy.java @@ -90,12 +90,14 @@ public class TestCoprocessorScanPolicy { p.add(F, tableName, Bytes.toBytes(2)); t.put(p); + long now = EnvironmentEdgeManager.currentTimeMillis(); + // insert 2 versions p = new Put(R); - p.add(F, Q, Q); + p.add(F, Q, now, Q); t.put(p); p = new Put(R); - p.add(F, Q, Q); + p.add(F, Q, now+1, Q); t.put(p); Get g = new Get(R); g.setMaxVersions(10); @@ -113,7 +115,7 @@ public class TestCoprocessorScanPolicy { // insert a 3rd version p = new Put(R); - p.add(F, Q, Q); + p.add(F, Q, now+2, Q); t.put(p); g = new Get(R); g.setMaxVersions(10);