You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by GitBox <gi...@apache.org> on 2021/03/19 11:52:10 UTC

[GitHub] [kafka] vamossagar12 commented on a change in pull request #9779: KAFKA-10767: Adding test cases for all, reverseAll and reverseRange for ThreadCache

vamossagar12 commented on a change in pull request #9779:
URL: https://github.com/apache/kafka/pull/9779#discussion_r597617935



##########
File path: streams/src/test/java/org/apache/kafka/streams/state/internals/ThreadCacheTest.java
##########
@@ -243,6 +243,16 @@ public void shouldPeekNextKey() {
         assertEquals(theByte, iterator.peekNextKey());
     }
 
+    @Test
+    public void shouldPeekNextKeyReverseRange() {
+        final ThreadCache cache = new ThreadCache(logContext, 10000L, new MockStreamsMetrics(new Metrics()));
+        final Bytes theByte = Bytes.wrap(new byte[]{1});
+        cache.put(namespace, theByte, dirtyEntry(theByte.get()));
+        final ThreadCache.MemoryLRUCacheBytesIterator iterator = cache.reverseRange(namespace, Bytes.wrap(new byte[]{0}), theByte);
+        assertEquals(theByte, iterator.peekNextKey());
+        assertEquals(theByte, iterator.peekNextKey());

Review comment:
       done




-- 
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.

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