chia7712 commented on code in PR #21101:
URL: https://github.com/apache/kafka/pull/21101#discussion_r2605106744
##########
core/src/test/scala/unit/kafka/server/MetadataRequestTest.scala:
##########
@@ -24,35 +24,44 @@ import
org.apache.kafka.common.errors.UnsupportedVersionException
import org.apache.kafka.common.internals.Topic
import org.apache.kafka.common.protocol.Errors
import org.apache.kafka.common.requests.{MetadataRequest, MetadataResponse}
+import org.apache.kafka.common.test.ClusterInstance
+import org.apache.kafka.common.test.api.{ClusterConfigProperty, ClusterTest,
ClusterTestDefaults, Type}
+import org.apache.kafka.coordinator.group.GroupCoordinatorConfig
import org.apache.kafka.metadata.BrokerState
+import org.apache.kafka.server.config.ReplicationConfigs
import org.apache.kafka.test.TestUtils.isValidClusterId
import org.junit.jupiter.api.Assertions._
-import org.junit.jupiter.api.{BeforeEach, Test, TestInfo}
import scala.collection.Seq
import scala.jdk.CollectionConverters._
-class MetadataRequestTest extends AbstractMetadataRequestTest {
-
- @BeforeEach
- override def setUp(testInfo: TestInfo): Unit = {
- doSetup(testInfo, createOffsetsTopic = false)
- }
-
- @Test
+@ClusterTestDefaults(
+ types = Array(Type.KRAFT, Type.CO_KRAFT),
+ brokers = 3,
+ serverProperties = Array(
+ new ClusterConfigProperty(key =
GroupCoordinatorConfig.OFFSETS_TOPIC_PARTITIONS_CONFIG, value = "5"),
+ new ClusterConfigProperty(key =
GroupCoordinatorConfig.OFFSETS_TOPIC_REPLICATION_FACTOR_CONFIG, value = "1"),
+ new ClusterConfigProperty(id = 0, key = "broker.rack", value = "rack/0"),
+ new ClusterConfigProperty(id = 1, key = "broker.rack", value = "rack/1"),
+ new ClusterConfigProperty(id = 2, key = "broker.rack", value = "rack/2")
+ )
+)
+class MetadataRequestTest(cluster: ClusterInstance) extends
AbstractMetadataRequestTest(cluster) {
Review Comment:
please rewrite it by java. Also, please move it to server module
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]