shekhar-rajak commented on code in PR #12739:
URL: https://github.com/apache/kafka/pull/12739#discussion_r994465503


##########
streams/src/test/java/org/apache/kafka/streams/state/internals/TimeOrderedCachingPersistentWindowStoreTest.java:
##########
@@ -138,51 +144,69 @@ public void setUp() {
 
     @After
     public void closeStore() {
-        cachingStore.close();
+        try {
+            cachingStore.close();
+        } catch (final RuntimeException runtimeException) {
+           /*
+           It will reach here for the testcases like
+           shouldCloseCacheAndWrappedStoreAfterErrorDuringCacheFlush(),
+           shouldCloseWrappedStoreAfterErrorDuringCacheClose(),
+           shouldCloseCacheAfterErrorDuringStateStoreClose()
+
+           In these testcases we have set the doThrow for the cache#close
+           cache#flush, underlyingStore#close method.
+            */
+        }
+
     }
 
     @SuppressWarnings("deprecation")
     @Test
     public void shouldDelegateDeprecatedInit() {
-        final RocksDBTimeOrderedWindowStore inner = 
EasyMock.mock(RocksDBTimeOrderedWindowStore.class);
-        EasyMock.expect(inner.hasIndex()).andReturn(hasIndex);
-        EasyMock.replay(inner);
-        final TimeOrderedCachingWindowStore outer = new 
TimeOrderedCachingWindowStore(inner, WINDOW_SIZE, SEGMENT_INTERVAL);
+        final RocksDBTimeOrderedWindowStore inner = 
mock(RocksDBTimeOrderedWindowStore.class);
+        when(inner.hasIndex()).thenReturn(hasIndex);
+
+        final TimeOrderedCachingWindowStore outer =

Review Comment:
   Thanks! Updated.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: jira-unsubscr...@kafka.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to