From de0fbf7137ef910af6b971d84b8ca957ab493d1a Mon Sep 17 00:00:00 2001 From: Justine Date: Fri, 14 Jun 2024 08:04:44 -0700 Subject: [PATCH 1/2] fixImports --- .../admin/AdminFenceProducersIntegrationTest.scala | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/core/src/test/scala/integration/kafka/admin/AdminFenceProducersIntegrationTest.scala b/core/src/test/scala/integration/kafka/admin/AdminFenceProducersIntegrationTest.scala index fdddbd1568eb3..5338c8a5407b5 100644 --- a/core/src/test/scala/integration/kafka/admin/AdminFenceProducersIntegrationTest.scala +++ b/core/src/test/scala/integration/kafka/admin/AdminFenceProducersIntegrationTest.scala @@ -18,12 +18,11 @@ package integration.kafka.admin import kafka.api.IntegrationTestHarness +import kafka.server.KafkaConfig import org.apache.kafka.clients.admin._ import org.apache.kafka.clients.producer.{KafkaProducer, ProducerConfig, ProducerRecord} import org.apache.kafka.common.errors.{InvalidProducerEpochException, ProducerFencedException} import org.apache.kafka.common.utils.Utils -import org.apache.kafka.coordinator.transaction.{TransactionLogConfigs, TransactionStateManagerConfigs} -import org.apache.kafka.server.config.ServerLogConfigs import org.junit.jupiter.api.Assertions.{assertInstanceOf, assertThrows, assertTrue, fail} import org.junit.jupiter.api.{AfterEach, BeforeEach, TestInfo} import org.junit.jupiter.params.ParameterizedTest @@ -57,12 +56,12 @@ class AdminFenceProducersIntegrationTest extends IntegrationTestHarness { def overridingProps(): Properties = { val props = new Properties() - props.put(ServerLogConfigs.AUTO_CREATE_TOPICS_ENABLE_CONFIG, false.toString) + props.put(KafkaConfig.AutoCreateTopicsEnableProp, false.toString) // Set a smaller value for the number of partitions for speed - props.put(TransactionLogConfigs.TRANSACTIONS_TOPIC_PARTITIONS_CONFIG, 1.toString) - props.put(TransactionLogConfigs.TRANSACTIONS_TOPIC_REPLICATION_FACTOR_CONFIG, 1.toString) - props.put(TransactionLogConfigs.TRANSACTIONS_TOPIC_MIN_ISR_CONFIG, 1.toString) - props.put(TransactionStateManagerConfigs.TRANSACTIONS_ABORT_TIMED_OUT_TRANSACTION_CLEANUP_INTERVAL_MS_CONFIG, "2000") + props.put(KafkaConfig.TransactionsTopicPartitionsProp, 1.toString) + props.put(KafkaConfig.TransactionsTopicReplicationFactorProp, 1.toString) + props.put(KafkaConfig.TransactionsTopicMinISRProp, 1.toString) + props.put(KafkaConfig.TransactionsAbortTimedOutTransactionCleanupIntervalMsProp, "2000") props } From 348e93a059dfa79bd0e84085e2632503eedd1edf Mon Sep 17 00:00:00 2001 From: Edoardo Comar Date: Thu, 13 Jun 2024 15:01:08 +0100 Subject: [PATCH 2/2] MINOR: Add integration tag to AdminFenceProducersIntegrationTest (#16326) Add @tag("integration") to AdminFenceProducersIntegrationTest Reviewers: Chris Egerton --- .../kafka/admin/AdminFenceProducersIntegrationTest.scala | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/src/test/scala/integration/kafka/admin/AdminFenceProducersIntegrationTest.scala b/core/src/test/scala/integration/kafka/admin/AdminFenceProducersIntegrationTest.scala index 5338c8a5407b5..25e85e10885ec 100644 --- a/core/src/test/scala/integration/kafka/admin/AdminFenceProducersIntegrationTest.scala +++ b/core/src/test/scala/integration/kafka/admin/AdminFenceProducersIntegrationTest.scala @@ -24,7 +24,7 @@ import org.apache.kafka.clients.producer.{KafkaProducer, ProducerConfig, Produce import org.apache.kafka.common.errors.{InvalidProducerEpochException, ProducerFencedException} import org.apache.kafka.common.utils.Utils import org.junit.jupiter.api.Assertions.{assertInstanceOf, assertThrows, assertTrue, fail} -import org.junit.jupiter.api.{AfterEach, BeforeEach, TestInfo} +import org.junit.jupiter.api.{AfterEach, BeforeEach, Tag, TestInfo} import org.junit.jupiter.params.ParameterizedTest import org.junit.jupiter.params.provider.ValueSource @@ -32,6 +32,7 @@ import java.util.concurrent.ExecutionException import java.util.{Collections, Properties} import scala.collection.Seq +@Tag("integration") class AdminFenceProducersIntegrationTest extends IntegrationTestHarness { override def brokerCount = 1