apoorvmittal10 commented on code in PR #16711:
URL: https://github.com/apache/kafka/pull/16711#discussion_r1695129816


##########
core/src/test/java/kafka/server/share/SharePartitionManagerTest.java:
##########
@@ -1720,6 +1722,44 @@ public void 
testProcessFetchResponseWithLsoMovementForTopicPartition() {
         Mockito.verify(sp1, times(0)).updateCacheAndOffsets(any(Long.class));
     }
 
+    @Test
+    public void testFetchQueueProcessingWhenFrontItemIsEmpty() {
+        String groupId = "grp";
+        String memberId = Uuid.randomUuid().toString();
+        FetchParams fetchParams = new 
FetchParams(ApiKeys.SHARE_FETCH.latestVersion(), 
FetchRequest.ORDINARY_CONSUMER_ID, -1, 0,
+            1, 1024 * 1024, FetchIsolation.HIGH_WATERMARK, Optional.empty());
+        TopicIdPartition tp0 = new TopicIdPartition(Uuid.randomUuid(), new 
TopicPartition("foo", 0));
+        Map<TopicIdPartition, Integer> partitionMaxBytes = new HashMap<>();
+        partitionMaxBytes.put(tp0, PARTITION_MAX_BYTES);
+
+        final Time time = new MockTime(0, System.currentTimeMillis(), 0);

Review Comment:
   nit: why do we require this against `final Time time = new MockTime();`? Do 
we really need to reset `currentHighResTimeNs`?



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