showuon commented on code in PR #13037: URL: https://github.com/apache/kafka/pull/13037#discussion_r1058010957
########## core/src/test/scala/unit/kafka/utils/TestUtils.scala: ########## @@ -441,6 +441,17 @@ object TestUtils extends Logging { replicaAssignment.size } + def isTopicExistsAndHasSameNumPartitionsAndReplicationFactor(cause: Throwable): Boolean = { + // return true when: + // (1) the cause of exception is `TopicExistsException` + // (2) all partitions metadata are propagated + // (3) topic has the expected partitions number and replication factor Review Comment: Agree. Adding one comment: ``` wait until all partitions metadata are propagated before verifying partitions number and replication factor ``` and remove the others. I'll merge it tomorrow. Thanks. ########## core/src/test/scala/unit/kafka/utils/TestUtils.scala: ########## @@ -441,6 +441,17 @@ object TestUtils extends Logging { replicaAssignment.size } + def isTopicExistsAndHasSameNumPartitionsAndReplicationFactor(cause: Throwable): Boolean = { + // return true when: + // (1) the cause of exception is `TopicExistsException` + // (2) all partitions metadata are propagated + // (3) topic has the expected partitions number and replication factor Review Comment: Agree. Adding one comment: ``` wait until all partitions metadata are propagated before verifying partitions number and replication factor ``` and remove the others. I'll merge it tomorrow if you don't have other comments. Thanks. -- 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