@@ -20,7 +20,6 @@ package kafka.server
20
20
import java .net .InetSocketAddress
21
21
import java .util
22
22
import java .util .{Arrays , Collections , Properties }
23
- import kafka .cluster .EndPoint
24
23
import kafka .utils .TestUtils .assertBadConfigContainingMessage
25
24
import kafka .utils .{CoreUtils , TestUtils }
26
25
import org .apache .kafka .common .Node
@@ -36,6 +35,7 @@ import org.apache.kafka.coordinator.group.GroupCoordinatorConfig
36
35
import org .apache .kafka .coordinator .group .modern .share .ShareGroupConfig
37
36
import org .apache .kafka .coordinator .transaction .{TransactionLogConfig , TransactionStateManagerConfig }
38
37
import org .apache .kafka .network .SocketServerConfigs
38
+ import org .apache .kafka .network .EndPoint
39
39
import org .apache .kafka .raft .QuorumConfig
40
40
import org .apache .kafka .server .common .MetadataVersion
41
41
import org .apache .kafka .server .config .{DelegationTokenManagerConfigs , KRaftConfigs , QuotaConfig , ReplicationConfigs , ServerConfigs , ServerLogConfigs , ServerTopicConfigSynonyms }
@@ -344,7 +344,7 @@ class KafkaConfigTest {
344
344
345
345
val config = KafkaConfig .fromProps(props)
346
346
assertEquals(
347
- Seq (EndPoint (" lb1.example.com" , 9000 , ListenerName .normalised(" CONTROLLER" ), SecurityProtocol .PLAINTEXT )),
347
+ Seq (new EndPoint (" lb1.example.com" , 9000 , ListenerName .normalised(" CONTROLLER" ), SecurityProtocol .PLAINTEXT )),
348
348
config.effectiveAdvertisedControllerListeners
349
349
)
350
350
}
@@ -360,7 +360,7 @@ class KafkaConfigTest {
360
360
361
361
val config = KafkaConfig .fromProps(props)
362
362
assertEquals(
363
- Seq (EndPoint (" localhost" , 9093 , ListenerName .normalised(" CONTROLLER" ), SecurityProtocol .PLAINTEXT )),
363
+ Seq (new EndPoint (" localhost" , 9093 , ListenerName .normalised(" CONTROLLER" ), SecurityProtocol .PLAINTEXT )),
364
364
config.effectiveAdvertisedControllerListeners
365
365
)
366
366
}
@@ -378,8 +378,8 @@ class KafkaConfigTest {
378
378
val config = KafkaConfig .fromProps(props)
379
379
assertEquals(
380
380
Seq (
381
- EndPoint (" lb1.example.com" , 9000 , ListenerName .normalised(" CONTROLLER" ), SecurityProtocol .PLAINTEXT ),
382
- EndPoint (" localhost" , 9094 , ListenerName .normalised(" CONTROLLER_NEW" ), SecurityProtocol .PLAINTEXT )
381
+ new EndPoint (" lb1.example.com" , 9000 , ListenerName .normalised(" CONTROLLER" ), SecurityProtocol .PLAINTEXT ),
382
+ new EndPoint (" localhost" , 9094 , ListenerName .normalised(" CONTROLLER_NEW" ), SecurityProtocol .PLAINTEXT )
383
383
),
384
384
config.effectiveAdvertisedControllerListeners
385
385
)
@@ -508,9 +508,9 @@ class KafkaConfigTest {
508
508
props.setProperty(ReplicationConfigs .INTER_BROKER_LISTENER_NAME_CONFIG , " REPLICATION" )
509
509
val config = KafkaConfig .fromProps(props)
510
510
val expectedListeners = Seq (
511
- EndPoint (" localhost" , 9091 , new ListenerName (" CLIENT" ), SecurityProtocol .SSL ),
512
- EndPoint (" localhost" , 9092 , new ListenerName (" REPLICATION" ), SecurityProtocol .SSL ),
513
- EndPoint (" localhost" , 9093 , new ListenerName (" INTERNAL" ), SecurityProtocol .PLAINTEXT ))
511
+ new EndPoint (" localhost" , 9091 , new ListenerName (" CLIENT" ), SecurityProtocol .SSL ),
512
+ new EndPoint (" localhost" , 9092 , new ListenerName (" REPLICATION" ), SecurityProtocol .SSL ),
513
+ new EndPoint (" localhost" , 9093 , new ListenerName (" INTERNAL" ), SecurityProtocol .PLAINTEXT ))
514
514
assertEquals(expectedListeners, config.listeners)
515
515
assertEquals(expectedListeners, config.effectiveAdvertisedBrokerListeners)
516
516
val expectedSecurityProtocolMap = Map (
@@ -537,14 +537,14 @@ class KafkaConfigTest {
537
537
val config = KafkaConfig .fromProps(props)
538
538
539
539
val expectedListeners = Seq (
540
- EndPoint (" localhost" , 9091 , new ListenerName (" EXTERNAL" ), SecurityProtocol .SSL ),
541
- EndPoint (" localhost" , 9093 , new ListenerName (" INTERNAL" ), SecurityProtocol .PLAINTEXT )
540
+ new EndPoint (" localhost" , 9091 , new ListenerName (" EXTERNAL" ), SecurityProtocol .SSL ),
541
+ new EndPoint (" localhost" , 9093 , new ListenerName (" INTERNAL" ), SecurityProtocol .PLAINTEXT )
542
542
)
543
543
assertEquals(expectedListeners, config.listeners)
544
544
545
545
val expectedAdvertisedListeners = Seq (
546
- EndPoint (" lb1.example.com" , 9000 , new ListenerName (" EXTERNAL" ), SecurityProtocol .SSL ),
547
- EndPoint (" host1" , 9093 , new ListenerName (" INTERNAL" ), SecurityProtocol .PLAINTEXT )
546
+ new EndPoint (" lb1.example.com" , 9000 , new ListenerName (" EXTERNAL" ), SecurityProtocol .SSL ),
547
+ new EndPoint (" host1" , 9093 , new ListenerName (" INTERNAL" ), SecurityProtocol .PLAINTEXT )
548
548
)
549
549
assertEquals(expectedAdvertisedListeners, config.effectiveAdvertisedBrokerListeners)
550
550
0 commit comments