machi1990 commented on code in PR #13665: URL: https://github.com/apache/kafka/pull/13665#discussion_r1230916909
########## clients/src/test/java/org/apache/kafka/clients/consumer/internals/ConsumerCoordinatorTest.java: ########## @@ -2521,11 +2524,36 @@ 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); + Map<TopicPartition, OffsetAndMetadata> cache = coordinator.committedOffsetsCache(); + assertTrue(cache.isEmpty()); coordinator.commitOffsetsAsync(offsets, callback(offsets, success)); coordinator.invokeCompletedOffsetCommitCallbacks(); assertTrue(success.get()); assertEquals(coordinator.inFlightAsyncCommits.get(), 0); Review Comment: You are right. I should've have dealt with this as well earlier! I'll push a change to fix this! -- 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