public class OptionsTest {
@ClassRule
- public static final RocksMemoryResource rocksMemoryResource =
- new RocksMemoryResource();
+ public static final RocksNativeLibraryResource ROCKS_NATIVE_LIBRARY_RESOURCE =
+ new RocksNativeLibraryResource();
public static final Random rand = PlatformRandomHelper.
getPlatformSpecificRandomFactory();
}
}
+ @SuppressWarnings("deprecated")
@Test
public void baseBackgroundCompactions() {
try (final Options opt = new Options()) {
}
}
+ @SuppressWarnings("deprecated")
@Test
public void maxBackgroundCompactions() {
try (final Options opt = new Options()) {
}
}
+ @SuppressWarnings("deprecated")
@Test
public void maxBackgroundFlushes() {
try (final Options opt = new Options()) {
}
}
+ @Test
+ public void statsPersistPeriodSec() {
+ try (final Options opt = new Options()) {
+ final int intValue = rand.nextInt();
+ opt.setStatsPersistPeriodSec(intValue);
+ assertThat(opt.statsPersistPeriodSec()).isEqualTo(intValue);
+ }
+ }
+
+ @Test
+ public void statsHistoryBufferSize() {
+ try (final Options opt = new Options()) {
+ final long longValue = rand.nextLong();
+ opt.setStatsHistoryBufferSize(longValue);
+ assertThat(opt.statsHistoryBufferSize()).isEqualTo(longValue);
+ }
+ }
+
@Test
public void adviseRandomOnOpen() {
try (final Options opt = new Options()) {
}
}
+ @Test
+ public void strictBytesPerSync() {
+ try (final Options opt = new Options()) {
+ assertThat(opt.strictBytesPerSync()).isFalse();
+ opt.setStrictBytesPerSync(true);
+ assertThat(opt.strictBytesPerSync()).isTrue();
+ }
+ }
+
@Test
public void enableThreadTracking() {
try (final Options opt = new Options()) {
}
}
+ @Test
+ public void unordredWrite() {
+ try(final Options opt = new Options()) {
+ assertThat(opt.unorderedWrite()).isFalse();
+ opt.setUnorderedWrite(true);
+ assertThat(opt.unorderedWrite()).isTrue();
+ }
+ }
+
@Test
public void allowConcurrentMemtableWrite() {
try (final Options opt = new Options()) {