diff --git a/streams/src/test/java/org/apache/kafka/streams/state/internals/RocksDBStoreTest.java b/streams/src/test/java/org/apache/kafka/streams/state/internals/RocksDBStoreTest.java index db458eb7734..c9dde779957 100644 --- a/streams/src/test/java/org/apache/kafka/streams/state/internals/RocksDBStoreTest.java +++ b/streams/src/test/java/org/apache/kafka/streams/state/internals/RocksDBStoreTest.java @@ -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 {