machi1990 commented on code in PR #13665: URL: https://github.com/apache/kafka/pull/13665#discussion_r1230614601
########## clients/src/test/java/org/apache/kafka/clients/consumer/internals/ConsumerCoordinatorTest.java: ########## @@ -2521,11 +2521,34 @@ public void testCommitOffsetMetadata() { AtomicBoolean success = new AtomicBoolean(false); - Map<TopicPartition, OffsetAndMetadata> offsets = singletonMap(t1p, new OffsetAndMetadata(100L, "hello")); + OffsetAndMetadata offsetAndMetadata = new OffsetAndMetadata(100L, "hello"); + Map<TopicPartition, OffsetAndMetadata> offsets = singletonMap(t1p, offsetAndMetadata); coordinator.commitOffsetsAsync(offsets, callback(offsets, success)); coordinator.invokeCompletedOffsetCommitCallbacks(); assertTrue(success.get()); assertEquals(coordinator.inFlightAsyncCommits.get(), 0); + Map<TopicPartition, OffsetAndMetadata> cache = coordinator.committedOffsetsCache(); + assertEquals(cache.size(), 1); + assertEquals(cache.get(t1p), offsetAndMetadata); Review Comment: Thanks, I like the suggested improvements. I'll adjust! -- 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