Should close filter in RocksDBStoreTest as well
Forgot to also close the filter in RocksDBStoreTest in time.
Reviewers: Bill Bejeck
@@ -67,6 +67,7 @@ public class RocksDBStoreTest {
InternalMockProcessorContext context;
RocksDBStore rocksDBStore;
+ private static BloomFilter filter;
@Before
public void setUp() {
@@ -78,6 +79,7 @@ public class RocksDBStoreTest {
Serdes.String(),
Serdes.String(),
new StreamsConfig(props));
+ filter = new BloomFilter();
}
RocksDBStore getRocksDBStore() {
@@ -86,6 +88,7 @@ public class RocksDBStoreTest {
@After
public void tearDown() {
+ filter.close();
rocksDBStore.close();
}
@@ -495,7 +498,7 @@ public class RocksDBStoreTest {
tableConfig.setBlockCacheSize(50 * 1024 * 1024L);
tableConfig.setBlockSize(4096L);
if (enableBloomFilters) {
- tableConfig.setFilter(new BloomFilter());
+ tableConfig.setFilter(filter);
options.optimizeFiltersForHits();
bloomFiltersSet = true;
} else {
