cmccabe commented on code in PR #17780: URL: https://github.com/apache/kafka/pull/17780#discussion_r1841280326
########## core/src/test/scala/unit/kafka/server/ProduceRequestTest.scala: ########## @@ -84,14 +86,41 @@ class ProduceRequestTest extends BaseRequestTest { new SimpleRecord(System.currentTimeMillis(), "key2".getBytes, "value2".getBytes)), 1) } - @ParameterizedTest + private def getPartitionToLeader( + admin: Admin, + topic: String + ): Map[Int, Int] = { + var topicDescription: TopicDescription = null + TestUtils.waitUntilTrue(() => { + val topicMap = admin. + describeTopics(java.util.Arrays.asList(topic)). + allTopicNames().get(10, TimeUnit.MINUTES) + topicDescription = topicMap.get(topic) + topicDescription != null + }, "Timed out waiting to describe topic " + topic) + topicDescription.partitions().asScala.map(p => { + p.partition() -> p.leader().id() + }).toMap + } + + @ParameterizedTest(name = "quorum=kraft") Review Comment: the test name is what TestInfo.scala looks at to determine if the test is kraft. Changing the test name was just an easy way of getting it to be kraft -- 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