showuon commented on code in PR #12110:
URL: https://github.com/apache/kafka/pull/12110#discussion_r875418603


##########
core/src/test/scala/integration/kafka/api/PlaintextAdminIntegrationTest.scala:
##########
@@ -154,26 +159,30 @@ class PlaintextAdminIntegrationTest extends 
BaseAdminIntegrationTest {
     waitForTopics(client, List(), topics)
   }
 
-  @Test
-  def testMetadataRefresh(): Unit = {
+  @ParameterizedTest(name = TestInfoUtils.TestWithParameterizedQuorumName)
+  @ValueSource(strings = Array("zk", "kraft"))
+  def testMetadataRefresh(quorum: String): Unit = {

Review Comment:
   As you said, we don't have controller for Kraft mode, I don't think it makes 
sense to enable it here since there's no test for Kraft. Could we create a JIRA 
ticket for this issue, that to add metadata refresh test for Kraft mode? This 
way, we won't forget it.



##########
core/src/test/scala/integration/kafka/api/PlaintextAdminIntegrationTest.scala:
##########
@@ -1437,13 +1480,24 @@ class PlaintextAdminIntegrationTest extends 
BaseAdminIntegrationTest {
     assertFalse(electResult.partitions.get.get(partition2).isPresent)
     TestUtils.assertLeader(client, partition2, 1)
 
+    def assertUnknownTopicOrPartition(
+      topicPartition: TopicPartition,
+      result: ElectLeadersResult
+    ): Unit = {
+      val exception = result.partitions.get.get(topicPartition).get
+      assertEquals(classOf[UnknownTopicOrPartitionException], 
exception.getClass)
+      if (isKRaftTest()) {
+        assertEquals("No such topic as topic-does-not-exist", 
exception.getMessage)

Review Comment:
   nit: assertEquals(s"No such topic as ${topicPartiion.topic}", 
exception.getMessage)



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

Reply via email to