mjsax commented on code in PR #17855:
URL: https://github.com/apache/kafka/pull/17855#discussion_r1847639466
##########
streams/src/test/java/org/apache/kafka/streams/state/internals/AbstractSessionBytesStoreTest.java:
##########
@@ -747,10 +749,11 @@ public void testIteratorPeek() {
sessionStore.put(new Windowed<>("aa", new SessionWindow(10, 20)), 4L);
try (final KeyValueIterator<Windowed<String>, Long> iterator =
sessionStore.findSessions("a", 0L, 20)) {
-
- assertEquals(iterator.peekNextKey(), new Windowed<>("a", new
SessionWindow(0L, 0L)));
- assertEquals(iterator.peekNextKey(), iterator.next().key);
- assertEquals(iterator.peekNextKey(), iterator.next().key);
+ assertEquals(new Windowed<>("a", new SessionWindow(0L, 0L)),
iterator.peekNextKey());
+ final Windowed<String> k1 = iterator.peekNextKey();
+ assertEquals(iterator.next().key, k1);
+ final Windowed<String> k2 = iterator.peekNextKey();
+ assertEquals(iterator.next().key, k2);
Review Comment:
Swapping parameters, because "expected" should be first, and "actual" should
be second. Need to add variable `k1` and `k2` to call `peekNextKey` first to
not change test semantics.
(Same below)
--
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]