add setMaxTableFilesSize Options unit test

main
Jesper Lundgren 10 years ago
parent d62b6ed838
commit dda74111ae
  1. 19
      java/src/test/java/org/rocksdb/ColumnFamilyOptionsTest.java
  2. 19
      java/src/test/java/org/rocksdb/OptionsTest.java

@ -723,4 +723,23 @@ public class ColumnFamilyOptionsTest {
}
}
}
@Test
public void maxTableFilesSizeFIFO() {
ColumnFamilyOptions opt = null;
try {
opt = new ColumnFamilyOptions();
long longValue = rand.nextLong();
// Size has to be positive
longValue = (longValue < 0) ? -longValue : longValue;
longValue = (longValue == 0) ? longValue + 1 : longValue;
opt.setMaxTableFilesSizeFIFO(longValue);
assertThat(opt.maxTableFilesSizeFIFO()).
isEqualTo(longValue);
} finally {
if (opt != null) {
opt.dispose();
}
}
}
}

@ -1108,6 +1108,25 @@ public class OptionsTest {
}
}
@Test
public void maxTableFilesSizeFIFO() {
Options opt = null;
try {
opt = new Options();
long longValue = rand.nextLong();
// Size has to be positive
longValue = (longValue < 0) ? -longValue : longValue;
longValue = (longValue == 0) ? longValue + 1 : longValue;
opt.setMaxTableFilesSizeFIFO(longValue);
assertThat(opt.maxTableFilesSizeFIFO()).
isEqualTo(longValue);
} finally {
if (opt != null) {
opt.dispose();
}
}
}
@Test
public void rateLimiterConfig() {
Options options = null;

Loading…
Cancel
Save