jolshan commented on code in PR #15155: URL: https://github.com/apache/kafka/pull/15155#discussion_r1449238660
########## group-coordinator/src/test/java/org/apache/kafka/coordinator/group/OffsetMetadataManagerTest.java: ########## @@ -1963,6 +2080,75 @@ public void testFetchAllOffsetsAtDifferentCommittedOffset() { ), context.fetchAllOffsets("group", Long.MAX_VALUE)); } + @Test + public void testFetchAllOffsetsWithPendingTransactionalOffsets() { + OffsetMetadataManagerTestContext context = new OffsetMetadataManagerTestContext.Builder().build(); + + context.groupMetadataManager.getOrMaybeCreateConsumerGroup("group", true); + + context.commitOffset("group", "foo", 0, 100L, 1); + context.commitOffset("group", "foo", 1, 110L, 1); + context.commitOffset("group", "bar", 0, 200L, 1); + + context.commit(); + + assertEquals(3, context.lastWrittenOffset); + assertEquals(3, context.lastCommittedOffset); + + context.commitOffset(10L, "group", "foo", 1, 111L, 1, context.time.milliseconds()); + context.commitOffset(10L, "group", "bar", 0, 201L, 1, context.time.milliseconds()); Review Comment: Oh interesting. Is it worth testing that we don't return it for now and update it if we plan to change the behavior? -- 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: jira-unsubscr...@kafka.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org