Fix RocksJava test failure due to deprecation of table_cache_remove_scan_count_limit

Summary:
table_cache_remove_scan_count_limit is marked as deprecated in RocksDB C++.
(see rocksdb/options.h).  This patch made necessary changes on RocksJava
side.

Test Plan:
make rocksdbjava -j32
make jtest

Reviewers: rven, igor, fyrz, adamretter, ankgup87, sdong

Reviewed By: sdong

Subscribers: dhruba, leveldb

Differential Revision: https://reviews.facebook.net/D35355
main
Yueh-Hsuan Chiang 10 years ago
parent 51301b869f
commit f7ed654641
  1. 6
      java/src/main/java/org/rocksdb/DBOptionsInterface.java
  2. 16
      java/src/test/java/org/rocksdb/DBOptionsTest.java
  3. 16
      java/src/test/java/org/rocksdb/OptionsTest.java

@ -519,7 +519,10 @@ public interface DBOptionsInterface {
*
* @param limit scan count limit
* @return the instance of the current Object.
*
* @deprecated This function is depreciated.
*/
@Deprecated
Object setTableCacheRemoveScanCountLimit(int limit);
/**
@ -532,7 +535,10 @@ public interface DBOptionsInterface {
* order.
*
* @return scan count limit
*
* @deprecated This function is depreciated.
*/
@Deprecated
int tableCacheRemoveScanCountLimit();
/**

@ -367,22 +367,6 @@ public class DBOptionsTest {
}
}
@Test
public void tableCacheRemoveScanCountLimit() {
DBOptions opt = null;
try {
opt = new DBOptions();
int intValue = rand.nextInt();
opt.setTableCacheRemoveScanCountLimit(intValue);
assertThat(opt.tableCacheRemoveScanCountLimit()).
isEqualTo(intValue);
} finally {
if (opt != null) {
opt.dispose();
}
}
}
@Test
public void walSizeLimitMB() {
DBOptions opt = null;

@ -796,22 +796,6 @@ public class OptionsTest {
}
}
@Test
public void tableCacheRemoveScanCountLimit() {
Options opt = null;
try {
opt = new Options();
int intValue = rand.nextInt();
opt.setTableCacheRemoveScanCountLimit(intValue);
assertThat(opt.tableCacheRemoveScanCountLimit()).
isEqualTo(intValue);
} finally {
if (opt != null) {
opt.dispose();
}
}
}
@Test
public void walSizeLimitMB() {
Options opt = null;

Loading…
Cancel
Save