cmccabe commented on code in PR #17780:
URL: https://github.com/apache/kafka/pull/17780#discussion_r1841283218
##########
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:
in this case, no, since we changed the test name directly. sorry I guess
that was a bit obscure :)
soon, we will have everything as kraft and we can get rid of this.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]