You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kafka.apache.org by js...@apache.org on 2022/04/25 22:11:25 UTC

[kafka] branch trunk updated: MINOR; enable KRaft in ConfigCommandIntegrationTest (#11732)

This is an automated email from the ASF dual-hosted git repository.

jsancio pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/kafka.git


The following commit(s) were added to refs/heads/trunk by this push:
     new 2a7fdd7670 MINOR; enable KRaft in ConfigCommandIntegrationTest (#11732)
2a7fdd7670 is described below

commit 2a7fdd76703189e6b081cfaf21b22945d1c59f8c
Author: Alyssa Huang <ah...@confluent.io>
AuthorDate: Mon Apr 25 15:11:14 2022 -0700

    MINOR; enable KRaft in ConfigCommandIntegrationTest (#11732)
    
    Adding KRaft and ZK params to ConfigCommandIntegrationTest wherever appropriate.
    
    Reviewers: Kvicii <42...@users.noreply.github.com>, dengziming <de...@gmail.com>, José Armando García Sancio <js...@users.noreply.github.com>
---
 .../kafka/admin/ConfigCommandIntegrationTest.scala   | 20 ++++++++++++--------
 1 file changed, 12 insertions(+), 8 deletions(-)

diff --git a/core/src/test/scala/integration/kafka/admin/ConfigCommandIntegrationTest.scala b/core/src/test/scala/integration/kafka/admin/ConfigCommandIntegrationTest.scala
index db7ab91729..b47a7194c9 100644
--- a/core/src/test/scala/integration/kafka/admin/ConfigCommandIntegrationTest.scala
+++ b/core/src/test/scala/integration/kafka/admin/ConfigCommandIntegrationTest.scala
@@ -20,21 +20,23 @@ import kafka.admin.ConfigCommand.ConfigCommandOptions
 import kafka.api.ApiVersion
 import kafka.cluster.{Broker, EndPoint}
 import kafka.server.{ConfigEntityName, KafkaConfig, QuorumTestHarness}
-import kafka.utils.{Exit, Logging}
+import kafka.utils.{Exit, Logging, TestInfoUtils}
 import kafka.zk.{AdminZkClient, BrokerInfo}
 import org.apache.kafka.common.config.ConfigException
 import org.apache.kafka.common.network.ListenerName
 import org.apache.kafka.common.security.auth.SecurityProtocol
 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.collection.Seq
 import scala.jdk.CollectionConverters._
 
 class ConfigCommandIntegrationTest extends QuorumTestHarness with Logging {
 
-  @Test
-  def shouldExitWithNonZeroStatusOnUpdatingUnallowedConfigViaZk(): Unit = {
+  @ParameterizedTest(name = TestInfoUtils.TestWithParameterizedQuorumName)
+  @ValueSource(strings = Array("zk"))
+  def shouldExitWithNonZeroStatusOnUpdatingUnallowedConfigViaZk(quorum: String): Unit = {
     assertNonZeroStatusExit(Array(
       "--zookeeper", zkConnect,
       "--entity-name", "1",
@@ -43,8 +45,9 @@ class ConfigCommandIntegrationTest extends QuorumTestHarness with Logging {
       "--add-config", "security.inter.broker.protocol=PLAINTEXT"))
   }
 
-  @Test
-  def shouldExitWithNonZeroStatusOnZkCommandAlterUserQuota(): Unit = {
+  @ParameterizedTest(name = TestInfoUtils.TestWithParameterizedQuorumName)
+  @ValueSource(strings = Array("zk"))
+  def shouldExitWithNonZeroStatusOnZkCommandAlterUserQuota(quorum: String): Unit = {
     assertNonZeroStatusExit(Array(
       "--zookeeper", zkConnect,
       "--entity-type", "users",
@@ -70,8 +73,9 @@ class ConfigCommandIntegrationTest extends QuorumTestHarness with Logging {
     assertEquals(Some(1), exitStatus)
   }
 
-  @Test
-  def testDynamicBrokerConfigUpdateUsingZooKeeper(): Unit = {
+  @ParameterizedTest(name = TestInfoUtils.TestWithParameterizedQuorumName)
+  @ValueSource(strings = Array("zk"))
+  def testDynamicBrokerConfigUpdateUsingZooKeeper(quorum: String): Unit = {
     val brokerId = "1"
     val adminZkClient = new AdminZkClient(zkClient)
     val alterOpts = Array("--zookeeper", zkConnect, "--entity-type", "brokers", "--alter")