dajac commented on code in PR #19790: URL: https://github.com/apache/kafka/pull/19790#discussion_r2108336679
########## group-coordinator/src/test/java/org/apache/kafka/coordinator/group/modern/consumer/ConsumerGroupTest.java: ########## @@ -1576,6 +1581,7 @@ public void testFromClassicGroup() { assertEquals(expectedConsumerGroup.groupEpoch(), consumerGroup.groupEpoch()); assertEquals(expectedConsumerGroup.state(), consumerGroup.state()); assertEquals(expectedConsumerGroup.preferredServerAssignor(), consumerGroup.preferredServerAssignor()); + assertEquals(Map.copyOf(expectedConsumerGroup.subscriptionMetadata()), Map.copyOf(consumerGroup.subscriptionMetadata())); Review Comment: Ah, I got it. The issue is that TimelineHashMap does not implement toString. Hence when the comparison fails, you get a cryptic error: ``` Expected :org.apache.kafka.timeline.TimelineHashMap@17c13 Actual :org.apache.kafka.timeline.TimelineHashMap@308d9 ``` However, it still uses `.equals` to compare the objects. I am fine with keeping the copy to make it better 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: jira-unsubscr...@kafka.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org