KAFKA-18359 Set zkConnect to null in LocalLeaderEndPointTest, HighwatermarkPersistenceTest, IsrExpirationTest, ReplicaManagerQuotasTest, OffsetsForLeaderEpochTest (#18344)

Reviewers: TaiJuWu <tjwu1217@gmail.com>, Chia-Ping Tsai <chia7712@gmail.com>
This commit is contained in:
PoAn Yang 2024-12-29 18:23:42 +08:00 committed by GitHub
parent be4d1a6277
commit 91a2b58616
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 5 additions and 5 deletions

View File

@ -56,7 +56,7 @@ class LocalLeaderEndPointTest extends Logging {
@BeforeEach @BeforeEach
def setUp(): Unit = { def setUp(): Unit = {
val props = TestUtils.createBrokerConfig(sourceBroker.id, TestUtils.MockZkConnect, port = sourceBroker.port) val props = TestUtils.createBrokerConfig(sourceBroker.id, null, port = sourceBroker.port)
val config = KafkaConfig.fromProps(props) val config = KafkaConfig.fromProps(props)
val mockLogMgr = TestUtils.createLogManager(config.logDirs.map(new File(_))) val mockLogMgr = TestUtils.createLogManager(config.logDirs.map(new File(_)))
val alterPartitionManager = mock(classOf[AlterPartitionManager]) val alterPartitionManager = mock(classOf[AlterPartitionManager])

View File

@ -32,7 +32,7 @@ import org.apache.kafka.storage.internals.log.{CleanerConfig, LogDirFailureChann
class HighwatermarkPersistenceTest { class HighwatermarkPersistenceTest {
val configs = TestUtils.createBrokerConfigs(2, TestUtils.MockZkConnect).map(KafkaConfig.fromProps) val configs = TestUtils.createBrokerConfigs(2, null).map(KafkaConfig.fromProps)
val topic = "foo" val topic = "foo"
val configRepository = new MockConfigRepository() val configRepository = new MockConfigRepository()
val logManagers = configs map { config => val logManagers = configs map { config =>

View File

@ -47,7 +47,7 @@ class IsrExpirationTest {
val overridingProps = new Properties() val overridingProps = new Properties()
overridingProps.put(ReplicationConfigs.REPLICA_LAG_TIME_MAX_MS_CONFIG, replicaLagTimeMaxMs.toString) overridingProps.put(ReplicationConfigs.REPLICA_LAG_TIME_MAX_MS_CONFIG, replicaLagTimeMaxMs.toString)
overridingProps.put(ReplicationConfigs.REPLICA_FETCH_WAIT_MAX_MS_CONFIG, replicaFetchWaitMaxMs.toString) overridingProps.put(ReplicationConfigs.REPLICA_FETCH_WAIT_MAX_MS_CONFIG, replicaFetchWaitMaxMs.toString)
val configs = TestUtils.createBrokerConfigs(2, TestUtils.MockZkConnect).map(KafkaConfig.fromProps(_, overridingProps)) val configs = TestUtils.createBrokerConfigs(2, null).map(KafkaConfig.fromProps(_, overridingProps))
val topic = "foo" val topic = "foo"
val time = new MockTime val time = new MockTime

View File

@ -42,7 +42,7 @@ import org.mockito.{AdditionalMatchers, ArgumentMatchers}
import scala.jdk.CollectionConverters._ import scala.jdk.CollectionConverters._
class ReplicaManagerQuotasTest { class ReplicaManagerQuotasTest {
val configs = TestUtils.createBrokerConfigs(2, TestUtils.MockZkConnect).map(KafkaConfig.fromProps(_, new Properties())) val configs = TestUtils.createBrokerConfigs(2, null).map(KafkaConfig.fromProps(_, new Properties()))
val time = new MockTime val time = new MockTime
val metrics = new Metrics val metrics = new Metrics
val record = new SimpleRecord("some-data-in-a-message".getBytes()) val record = new SimpleRecord("some-data-in-a-message".getBytes())

View File

@ -38,7 +38,7 @@ import org.mockito.Mockito.{mock, when}
import scala.jdk.CollectionConverters._ import scala.jdk.CollectionConverters._
class OffsetsForLeaderEpochTest { class OffsetsForLeaderEpochTest {
private val config = TestUtils.createBrokerConfigs(1, TestUtils.MockZkConnect).map(KafkaConfig.fromProps).head private val config = TestUtils.createBrokerConfigs(1, null).map(KafkaConfig.fromProps).head
private val time = new MockTime private val time = new MockTime
private val metrics = new Metrics private val metrics = new Metrics
private val alterIsrManager = TestUtils.createAlterIsrManager() private val alterIsrManager = TestUtils.createAlterIsrManager()