You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by GitBox <gi...@apache.org> on 2022/05/11 06:09:02 UTC

[GitHub] [kafka] dengziming commented on a diff in pull request #12141: MINOR; DeleteTopics version tests

dengziming commented on code in PR #12141:
URL: https://github.com/apache/kafka/pull/12141#discussion_r869904211


##########
core/src/test/scala/unit/kafka/server/DeleteTopicsRequestTest.scala:
##########
@@ -17,24 +17,28 @@
 
 package kafka.server
 
-import java.util.{Arrays, Collections}
-
+import java.util.Arrays
+import java.util.Collections
 import kafka.network.SocketServer
 import kafka.utils._
 import org.apache.kafka.common.Uuid
 import org.apache.kafka.common.message.DeleteTopicsRequestData
 import org.apache.kafka.common.message.DeleteTopicsRequestData.DeleteTopicState
 import org.apache.kafka.common.protocol.Errors
-import org.apache.kafka.common.requests.{DeleteTopicsRequest, DeleteTopicsResponse, MetadataRequest, MetadataResponse}
+import org.apache.kafka.common.requests.DeleteTopicsRequest
+import org.apache.kafka.common.requests.DeleteTopicsResponse
+import org.apache.kafka.common.requests.MetadataRequest
+import org.apache.kafka.common.requests.MetadataResponse
 import org.junit.jupiter.api.Assertions._
-import org.junit.jupiter.api.Test
-
+import org.junit.jupiter.params.ParameterizedTest
+import org.junit.jupiter.params.provider.ValueSource
 import scala.jdk.CollectionConverters._
 
-class DeleteTopicsRequestTest extends BaseRequestTest {
+class DeleteTopicsRequestTest extends BaseRequestTest with Logging {
 
-  @Test
-  def testValidDeleteTopicRequests(): Unit = {
+  @ParameterizedTest(name = TestInfoUtils.TestWithParameterizedQuorumName)
+  @ValueSource(strings = Array("zk", "kraft"))
+  def testValidDeleteTopicRequests(quorum: String): Unit = {

Review Comment:
   It seems this is flaky in KRaft mode, we have a `TestUtils.ensureConsistentKRaftMetadata` to fix this kind of flakiness, which waits until the brokers have caught up to the controller metadata topic end offset.



-- 
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-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org