majialoong commented on code in PR #23428:
URL: https://github.com/apache/kafka/pull/23428#discussion_r3999568208
##########
streams/src/test/java/org/apache/kafka/streams/processor/internals/StreamsPartitionAssignorTest.java:
##########
@@ -1636,7 +1629,7 @@ public void
shouldGenerateTasksForAllCreatedPartitions(final Map<String, Object>
);
// check if we created a task for all expected topicPartitions.
- assertThat(new HashSet<>(assignment.get(client).partitions()),
equalTo(new HashSet<>(expectedAssignment)));
+ assertEquals(expectedAssignment, new
HashSet<>(assignment.get(client).partitions()));
Review Comment:
This also seems intended to check the assigned partitions without their
order.
After reading the code, I found they are sorted using
`PARTITION_COMPARATOR`, so a small test enhancement to verify that order seems
reasonable. I’ve sorted `expectedAssignment` and updated the assertion to
compare the lists directly.
--
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]