diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestKeepDeletes.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestKeepDeletes.java index f4f3b34222b..758ed86dbc0 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestKeepDeletes.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestKeepDeletes.java @@ -789,7 +789,8 @@ public class TestKeepDeletes extends HBaseTestCase { private int countDeleteMarkers(HRegion region) throws IOException { Scan s = new Scan(); s.setRaw(true); - s.setMaxVersions(); + // use max versions from the store(s) + s.setMaxVersions(region.getStores().values().iterator().next().getScanInfo().getMaxVersions()); InternalScanner scan = region.getScanner(s); List kvs = new ArrayList(); int res = 0;