cmccabe commented on a change in pull request #8527:
URL: https://github.com/apache/kafka/pull/8527#discussion_r413718893



##########
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:
       There should be a "get" here to ensure that we actually create the 
partitions before shutting down, right?




----------------------------------------------------------------
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


Reply via email to