From f2ae20a5c10c1f518a07b61d6c0e41daef41146a Mon Sep 17 00:00:00 2001 From: Ken Huang Date: Mon, 30 Dec 2024 02:20:10 +0800 Subject: [PATCH] KAFKA-18316 Fix to Kraft or remove tests associate with Zk Broker config in ConnectionQuotasTest (#18279) Reviewers: Chia-Ping Tsai --- .../test/scala/unit/kafka/network/ConnectionQuotasTest.scala | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/core/src/test/scala/unit/kafka/network/ConnectionQuotasTest.scala b/core/src/test/scala/unit/kafka/network/ConnectionQuotasTest.scala index 41c08d32968e5..20a48bb5099d4 100644 --- a/core/src/test/scala/unit/kafka/network/ConnectionQuotasTest.scala +++ b/core/src/test/scala/unit/kafka/network/ConnectionQuotasTest.scala @@ -66,11 +66,12 @@ class ConnectionQuotasTest { } def brokerPropsWithDefaultConnectionLimits: Properties = { - val props = TestUtils.createBrokerConfig(0, TestUtils.MockZkConnect, port = 0) + val props = TestUtils.createBrokerConfig(0, null, port = 0) props.put(SocketServerConfigs.LISTENERS_CONFIG, "EXTERNAL://localhost:0,REPLICATION://localhost:1,ADMIN://localhost:2") // ConnectionQuotas does not limit inter-broker listener even when broker-wide connection limit is reached props.put(ReplicationConfigs.INTER_BROKER_LISTENER_NAME_CONFIG, "REPLICATION") - props.put(SocketServerConfigs.LISTENER_SECURITY_PROTOCOL_MAP_CONFIG, "EXTERNAL:PLAINTEXT,REPLICATION:PLAINTEXT,ADMIN:PLAINTEXT") + props.put(SocketServerConfigs.ADVERTISED_LISTENERS_CONFIG, "REPLICATION://localhost:1") + props.put(SocketServerConfigs.LISTENER_SECURITY_PROTOCOL_MAP_CONFIG, "PLAINTEXT:PLAINTEXT,CONTROLLER:PLAINTEXT,EXTERNAL:PLAINTEXT,REPLICATION:PLAINTEXT,ADMIN:PLAINTEXT") props.put(QuotaConfig.NUM_QUOTA_SAMPLES_CONFIG, numQuotaSamples.toString) props.put(QuotaConfig.QUOTA_WINDOW_SIZE_SECONDS_CONFIG, quotaWindowSizeSeconds.toString) props