dongnuo123 commented on code in PR #14781:
URL: https://github.com/apache/kafka/pull/14781#discussion_r1396159332


##########
core/src/test/scala/integration/kafka/api/PlaintextConsumerTest.scala:
##########
@@ -1805,16 +1865,19 @@ class PlaintextConsumerTest extends BaseConsumerTest {
         s"The current assignment is ${consumer.assignment()}")
   }
 
-  @Test
-  def testConsumingWithNullGroupId(): Unit = {
+  @ParameterizedTest(name = TestInfoUtils.TestWithParameterizedQuorumName)
+  @ValueSource(strings = Array("zk", "kraft", "kraft+kip848"))
+  def testConsumingWithNullGroupId(quorum: String): Unit = {
     val topic = "test_topic"
     val partition = 0;
     val tp = new TopicPartition(topic, partition)
     createTopic(topic, 1, 1)
 
-    TestUtils.waitUntilTrue(() => {
-      this.zkClient.topicExists(topic)
-    }, "Failed to create topic")
+    if (!isKRaftTest()) {
+      TestUtils.waitUntilTrue(() => {
+        this.zkClientOrNull.topicExists(topic)
+      }, "Failed to create topic")
+    }

Review Comment:
   Ah, we don't need to check if the topic exists for kraft. In `createTopic`, 
we already uses `TestUtils.createTopicWithAdmin` which contains checking topic 
existence.
   ```
       if (isKRaftTest()) {
         resource(createAdminClient(brokers, listenerName, adminClientConfig)) 
{ admin =>
           TestUtils.createTopicWithAdmin(
             admin = admin,
             topic = topic,
             brokers = brokers,
             controllers = controllerServers,
             numPartitions = numPartitions,
             replicationFactor = replicationFactor,
             topicConfig = topicConfig
           )
         }
       } ...
   ```



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