chia7712 commented on code in PR #17855:
URL: https://github.com/apache/kafka/pull/17855#discussion_r1854416691


##########
streams/src/test/java/org/apache/kafka/streams/state/internals/AbstractDualSchemaRocksDBSegmentedBytesStoreTest.java:
##########
@@ -251,7 +250,7 @@ public void shouldPutAndFetch() {
             // all records expired as actual from is 59001 and to is 1000
             final List<KeyValue<Windowed<String>, Long>> expected = 
Collections.emptyList();
 
-            assertEquals(expected, toList(values));
+            assertEquals(expected, toListAndCloseIterator(values));

Review Comment:
   Maybe we could remove the try-with-resources to match the style used in 
AbstractRocksDBWindowStoreTest. For example:
   ```
           // For all tests, actualFrom is computed using observedStreamTime - 
retention + 1.
           // so actualFrom = 60000(observedStreamTime) - 1000(retention) + 1 = 
59001
           // all records expired as actual from is 59001 and to is 1000
           assertEquals(Collections.emptyList(), 
toListAndCloseIterator(bytesStore.fetch(
                   Bytes.wrap(keyA.getBytes()), 0, windows[2].start())));
   
           // all records expired as actual from is 59001 and to is 1000
           assertEquals(Collections.emptyList(), 
toListAndCloseIterator(bytesStore.fetch(
                   Bytes.wrap(keyA.getBytes()), Bytes.wrap(keyB.getBytes()), 0, 
windows[2].start())));
   ```



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to