gaurav-narula commented on code in PR #23610:
URL: https://github.com/apache/kafka/pull/23610#discussion_r4249687363
##########
metadata/src/test/java/org/apache/kafka/metadata/migration/KRaftMigrationZkWriterTest.java:
##########
@@ -98,9 +98,66 @@ public void iterateTopics(EnumSet<TopicVisitorInterest>
interests, TopicVisitor
writer.handleSnapshot(image, (opType, opLog, operation) ->
operation.apply(ZkMigrationLeadershipState.EMPTY)
);
- assertEquals(topicClient.updatedTopics.get("foo").size(), 3);
+ assertEquals(3, topicClient.updatedTopics.get("foo").size());
+ assertEquals(topicClient.deletedTopicPartitions.get("foo"),
Collections.singleton(3));
+ // Partition 1 is missing from ZK, so it must be created rather than
updated
+ assertEquals(topicClient.newTopicPartitions.get("foo"),
Collections.singleton(1));
Review Comment:
Fixed the order
##########
metadata/src/test/java/org/apache/kafka/metadata/migration/KRaftMigrationZkWriterTest.java:
##########
@@ -98,9 +98,66 @@ public void iterateTopics(EnumSet<TopicVisitorInterest>
interests, TopicVisitor
writer.handleSnapshot(image, (opType, opLog, operation) ->
operation.apply(ZkMigrationLeadershipState.EMPTY)
);
- assertEquals(topicClient.updatedTopics.get("foo").size(), 3);
+ assertEquals(3, topicClient.updatedTopics.get("foo").size());
+ assertEquals(topicClient.deletedTopicPartitions.get("foo"),
Collections.singleton(3));
Review Comment:
Fixed as well
--
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]