chia7712 commented on code in PR #15676: URL: https://github.com/apache/kafka/pull/15676#discussion_r1557539944
########## core/src/test/scala/integration/kafka/coordinator/transaction/ProducerIdsIntegrationTest.scala: ########## @@ -19,30 +19,30 @@ package kafka.coordinator.transaction import kafka.network.SocketServer import kafka.server.{IntegrationTestUtils, KafkaConfig} +import kafka.test.ClusterInstance import kafka.test.annotation.{AutoStart, ClusterTest, ClusterTests, Type} import kafka.test.junit.ClusterTestExtensions -import kafka.test.{ClusterConfig, ClusterInstance} import org.apache.kafka.common.message.InitProducerIdRequestData import org.apache.kafka.common.network.ListenerName import org.apache.kafka.common.protocol.Errors import org.apache.kafka.common.record.RecordBatch import org.apache.kafka.common.requests.{InitProducerIdRequest, InitProducerIdResponse} import org.apache.kafka.server.common.MetadataVersion import org.junit.jupiter.api.Assertions.{assertEquals, assertTrue} -import org.junit.jupiter.api.{BeforeEach, Disabled, Timeout} import org.junit.jupiter.api.extension.ExtendWith +import org.junit.jupiter.api.{BeforeEach, Disabled, Timeout} import java.util.stream.{Collectors, IntStream} import scala.concurrent.duration.DurationInt import scala.jdk.CollectionConverters._ @ExtendWith(value = Array(classOf[ClusterTestExtensions])) -class ProducerIdsIntegrationTest { +class ProducerIdsIntegrationTest(private val cluster: ClusterInstance) { Review Comment: We can remove the cluster instance from all test cases now. ########## core/src/test/scala/integration/kafka/coordinator/transaction/ProducerIdsIntegrationTest.scala: ########## @@ -19,30 +19,30 @@ package kafka.coordinator.transaction import kafka.network.SocketServer import kafka.server.{IntegrationTestUtils, KafkaConfig} +import kafka.test.ClusterInstance import kafka.test.annotation.{AutoStart, ClusterTest, ClusterTests, Type} import kafka.test.junit.ClusterTestExtensions -import kafka.test.{ClusterConfig, ClusterInstance} import org.apache.kafka.common.message.InitProducerIdRequestData import org.apache.kafka.common.network.ListenerName import org.apache.kafka.common.protocol.Errors import org.apache.kafka.common.record.RecordBatch import org.apache.kafka.common.requests.{InitProducerIdRequest, InitProducerIdResponse} import org.apache.kafka.server.common.MetadataVersion import org.junit.jupiter.api.Assertions.{assertEquals, assertTrue} -import org.junit.jupiter.api.{BeforeEach, Disabled, Timeout} import org.junit.jupiter.api.extension.ExtendWith +import org.junit.jupiter.api.{BeforeEach, Disabled, Timeout} import java.util.stream.{Collectors, IntStream} import scala.concurrent.duration.DurationInt import scala.jdk.CollectionConverters._ @ExtendWith(value = Array(classOf[ClusterTestExtensions])) -class ProducerIdsIntegrationTest { +class ProducerIdsIntegrationTest(private val cluster: ClusterInstance) { @BeforeEach - def setup(clusterConfig: ClusterConfig): Unit = { - clusterConfig.serverProperties().put(KafkaConfig.TransactionsTopicPartitionsProp, "1") - clusterConfig.serverProperties().put(KafkaConfig.TransactionsTopicReplicationFactorProp, "3") + def setUp(): Unit = { + cluster.config().serverProperties().put(KafkaConfig.TransactionsTopicPartitionsProp, "1") + cluster.config().serverProperties().put(KafkaConfig.TransactionsTopicReplicationFactorProp, "3") Review Comment: We can remove this config as it is equal to default value -- 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