kafka-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bbej...@apache.org
Subject [kafka] branch 2.2 updated: Should close filter in RocksDBStoreTest as well (#6676)
Date Sat, 04 May 2019 15:04:30 GMT
This is an automated email from the ASF dual-hosted git repository.

bbejeck pushed a commit to branch 2.2
in repository https://gitbox.apache.org/repos/asf/kafka.git


The following commit(s) were added to refs/heads/2.2 by this push:
     new b334786  Should close filter in RocksDBStoreTest as well (#6676)
b334786 is described below

commit b334786b6609f6b9fd5d8069a636fe4ec5fee951
Author: A. Sophie Blee-Goldman <sophie@confluent.io>
AuthorDate: Sat May 4 07:52:53 2019 -0700

    Should close filter in RocksDBStoreTest as well (#6676)
    
    Forgot to also close the filter in RocksDBStoreTest in time.
    
    Reviewers: Bill Bejeck <bbejeck@gmail.com>
---
 .../org/apache/kafka/streams/state/internals/RocksDBStoreTest.java   | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

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 4785673..3cc1697 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 {


Mime
View raw message