chia7712 commented on code in PR #16852: URL: https://github.com/apache/kafka/pull/16852#discussion_r1735873872
########## core/src/test/java/kafka/test/ClusterInstance.java: ########## @@ -186,6 +187,12 @@ default Set<GroupProtocol> supportedGroupProtocols() { default void waitTopicDeletion(String topic) throws InterruptedException { waitForTopic(topic, 0); } + + default void createTopic(String topicName, int partitions, short replicas) { + try (Admin admin = createAdminClient()) { + admin.createTopics(Collections.singletonList(new NewTopic(topicName, partitions, replicas))); Review Comment: This is a "helper" method, so I feel a little sugar is good to users. We can add comments to this helper to remind users that this method is blocked until metadata get synced. -- 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