mumrah commented on code in PR #17284: URL: https://github.com/apache/kafka/pull/17284#discussion_r1777688352
########## core/src/test/scala/unit/kafka/server/SaslApiVersionsRequestTest.scala: ########## @@ -1,139 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package kafka.server - -import kafka.api.{KafkaSasl, SaslSetup} -import kafka.security.JaasTestUtils -import kafka.server.SaslApiVersionsRequestTest.{kafkaClientSaslMechanism, kafkaServerSaslMechanisms} -import kafka.test.annotation.{ClusterTemplate, Type} -import kafka.test.junit.ClusterTestExtensions -import kafka.test.{ClusterConfig, ClusterInstance} -import org.apache.kafka.common.config.SaslConfigs -import org.apache.kafka.common.config.internals.BrokerSecurityConfigs -import org.apache.kafka.common.message.SaslHandshakeRequestData -import org.apache.kafka.common.protocol.{ApiKeys, Errors} -import org.apache.kafka.common.requests.{ApiVersionsRequest, ApiVersionsResponse, SaslHandshakeRequest, SaslHandshakeResponse} -import org.apache.kafka.common.security.auth.SecurityProtocol -import org.apache.kafka.network.SocketServerConfigs -import org.junit.jupiter.api.Assertions._ -import org.junit.jupiter.api.extension.ExtendWith -import org.junit.jupiter.api.{AfterEach, BeforeEach} - -import java.net.Socket -import java.util.Collections -import scala.jdk.CollectionConverters._ - -object SaslApiVersionsRequestTest { Review Comment: Has this test been ported to KRaft? ########## core/src/test/scala/integration/kafka/coordinator/transaction/ProducerIdsIntegrationTest.scala: ########## @@ -19,83 +19,35 @@ package kafka.coordinator.transaction import kafka.network.SocketServer import kafka.server.IntegrationTestUtils -import kafka.test.{ClusterConfig, ClusterInstance} -import kafka.test.annotation.{AutoStart, ClusterConfigProperty, ClusterTemplate, ClusterTest, ClusterTestDefaults, ClusterTests, Type} +import kafka.test.ClusterInstance +import kafka.test.annotation.{ClusterConfigProperty, ClusterTest, ClusterTestDefaults, ClusterTests, Type} import kafka.test.junit.ClusterTestExtensions 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.config.ReplicationConfigs import org.apache.kafka.server.common.MetadataVersion import org.junit.jupiter.api.Assertions.{assertEquals, assertTrue} import org.junit.jupiter.api.extension.ExtendWith -import org.junit.jupiter.api.{Disabled, Timeout} import java.util.stream.{Collectors, IntStream} import scala.concurrent.duration.DurationInt import scala.jdk.CollectionConverters._ -object ProducerIdsIntegrationTest { - def uniqueProducerIdsBumpIBP(): java.util.List[ClusterConfig] = { - val serverProperties = java.util.Collections.singletonMap(ReplicationConfigs.INTER_BROKER_PROTOCOL_VERSION_CONFIG, "2.8") - val perBrokerProperties: java.util.Map[Integer, java.util.Map[String, String]] = - java.util.Collections.singletonMap(0, - java.util.Collections.singletonMap(ReplicationConfigs.INTER_BROKER_PROTOCOL_VERSION_CONFIG, "3.0-IV0")) - - List(ClusterConfig.defaultBuilder() - .setTypes(Set(Type.ZK).asJava) - .setBrokers(3) - .setAutoStart(false) - .setServerProperties(serverProperties) - .setPerServerProperties(perBrokerProperties) - .build()).asJava - } -} - @ClusterTestDefaults(serverProperties = Array( new ClusterConfigProperty(key = "transaction.state.log.num.partitions", value = "1") )) @ExtendWith(value = Array(classOf[ClusterTestExtensions])) class ProducerIdsIntegrationTest { @ClusterTests(Array( - new ClusterTest(types = Array(Type.ZK), brokers = 3, metadataVersion = MetadataVersion.IBP_2_8_IV1), - new ClusterTest(types = Array(Type.ZK), brokers = 3, metadataVersion = MetadataVersion.IBP_3_0_IV0), new ClusterTest(types = Array(Type.KRAFT), brokers = 3, metadataVersion = MetadataVersion.IBP_3_3_IV0) )) def testUniqueProducerIds(clusterInstance: ClusterInstance): Unit = { verifyUniqueIds(clusterInstance) } - @ClusterTemplate("uniqueProducerIdsBumpIBP") Review Comment: Have these tests been ported? ########## core/src/test/scala/unit/kafka/server/ClientQuotasRequestTest.scala: ########## @@ -165,29 +163,6 @@ class ClientQuotasRequestTest(cluster: ClusterInstance) { )) } - @ClusterTest(types = Array(Type.ZK)) // No SCRAM for Raft yet - def testClientQuotasForScramUsers(): Unit = { Review Comment: We should make sure we have ported this test to KRaft. Does a KRaft version of this test exist anywhere? -- 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