lucasbru commented on code in PR #17414:
URL: https://github.com/apache/kafka/pull/17414#discussion_r1810540186


##########
clients/src/test/java/org/apache/kafka/clients/consumer/internals/FetchCollectorTest.java:
##########
@@ -620,10 +646,49 @@ public void 
testCollectFetchInitializationOffsetOutOfRangeErrorWithOffsetReset()
         final Fetch<String, String> fetch = 
fetchCollector.collectFetch(fetchBuffer);
 
         assertTrue(fetch.isEmpty());
+        assertEquals(0, fetch.nextOffsets().size());
         
verify(subscriptions).requestOffsetResetIfPartitionAssigned(topicPartition0);
         verify(fetchBuffer).setNextInLineFetch(null);
     }
 
+    @Test
+    public void testReadCommittedWithAbortedTransaction() {
+        buildDependencies(IsolationLevel.READ_COMMITTED);
+        int recordCount = 20;
+        assignAndSeek(topicAPartition0);
+
+
+        // Initial CompletedFetch
+        CompletedFetch initialCompletedFetch = completedFetchBuilder

Review Comment:
   I think you may want to also make the first completedFetch a transactional 
completed fetch. See `CompletedFetchTest` for an example. We should define the 
aborted transaction here.



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