diff --git a/java/src/test/java/org/rocksdb/RocksDBTest.java b/java/src/test/java/org/rocksdb/RocksDBTest.java index f4e03805b..ae83683d6 100644 --- a/java/src/test/java/org/rocksdb/RocksDBTest.java +++ b/java/src/test/java/org/rocksdb/RocksDBTest.java @@ -472,8 +472,9 @@ public class RocksDBTest { rand.nextBytes(b); db.put((String.valueOf(i)).getBytes(), b); } + db.flush(new FlushOptions().setWaitForFlush(true)); db.compactRange("0".getBytes(), "201".getBytes(), - true, 0, -1); + true, -1, 0); } finally { if (db != null) { db.close(); @@ -580,7 +581,7 @@ public class RocksDBTest { String.valueOf(i).getBytes(), b); } db.compactRange(columnFamilyHandles.get(1), "0".getBytes(), - "201".getBytes(), true, 0, -1); + "201".getBytes(), true, -1, 0); } finally { for (ColumnFamilyHandle handle : columnFamilyHandles) { handle.dispose();