Permalink
Browse files

Add a test to verify the suspend/resume compactions calls work.

  • Loading branch information...
1 parent 44a7d64 commit 2e028fb9228b50e461713b8db147efa1cf733f41 @chirino chirino committed Nov 1, 2012
Showing with 10 additions and 0 deletions.
  1. +10 −0 leveldbjni/src/test/java/org/fusesource/leveldbjni/test/DBTest.java
@@ -416,6 +416,16 @@ public void testCompactRanges() throws IOException, InterruptedException, DBExce
db.close();
}
+ @Test
+ public void testSuspendAndResumeCompactions() throws Exception {
+ Options options = new Options().createIfMissing(true);
+ File path = getTestDirectory(getName());
+ DB db = factory.open(path, options);
+ db.suspendCompactions();
+ db.resumeCompactions();
+ db.close();
+ }
+
public void assertEquals(byte[] arg1, byte[] arg2) {
assertTrue(Arrays.equals(arg1, arg2));
}

0 comments on commit 2e028fb

Please sign in to comment.