d8tltanc commented on a change in pull request #8527: URL: https://github.com/apache/kafka/pull/8527#discussion_r414945297
########## File path: core/src/test/scala/unit/kafka/admin/DeleteTopicTest.scala ########## @@ -227,8 +227,10 @@ class DeleteTopicTest extends ZooKeeperTestHarness { }, s"Not all replicas for topic $topic are in states of either ReplicaDeletionSuccessful or OfflineReplica") // increase the partition count for topic - val topicCommandOptions = new TopicCommand.TopicCommandOptions(Array("--zookeeper", zkConnect, "--alter", "--topic", topic, "--partitions", "2")) - new ZookeeperTopicService(zkClient).alterTopic(topicCommandOptions) + val props = new Properties() + props.setProperty(AdminClientConfig.BOOTSTRAP_SERVERS_CONFIG, TestUtils.getBrokerListStrFromServers(servers)) + val adminClient = Admin.create(props) + adminClient.createPartitions(Map(topic -> NewPartitions.increaseTo(2)).asJava) Review comment: Good catch. Although this will return an API exception (can't increase partition number during topic deletion), we still need to wait for the completion. ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org