@@ -46,6 +46,8 @@ import org.junit.jupiter.api.Assertions._
46
46
import org .junit .jupiter .api .Test
47
47
import org .junit .jupiter .api .function .Executable
48
48
49
+ import org .apache .kafka .common .test .{TestUtils => JTestUtils }
50
+
49
51
import scala .jdk .CollectionConverters ._
50
52
51
53
class KafkaConfigTest {
@@ -594,8 +596,8 @@ class KafkaConfigTest {
594
596
props.setProperty(SocketServerConfigs .LISTENERS_CONFIG , " plaintext://localhost:9091,SsL://localhost:9092" )
595
597
props.setProperty(SocketServerConfigs .LISTENER_SECURITY_PROTOCOL_MAP_CONFIG , " PLAINTEXT:PLAINTEXT,SSL:SSL,CONTROLLER:PLAINTEXT" )
596
598
val config = KafkaConfig .fromProps(props)
597
- assertEquals(Some (" SSL://localhost:9092" ), config.listeners.find(_.listenerName.value == " SSL" ).map(_.connectionString ))
598
- assertEquals(Some (" PLAINTEXT://localhost:9091" ), config.listeners.find(_.listenerName.value == " PLAINTEXT" ).map(_.connectionString ))
599
+ assertEquals(Some (" SSL://localhost:9092" ), config.listeners.find(_.listenerName.value == " SSL" ).map(JTestUtils .endpointToString ))
600
+ assertEquals(Some (" PLAINTEXT://localhost:9091" ), config.listeners.find(_.listenerName.value == " PLAINTEXT" ).map(JTestUtils .endpointToString ))
599
601
}
600
602
601
603
private def listenerListToEndPoints (listenerList : String ,
@@ -1180,7 +1182,7 @@ class KafkaConfigTest {
1180
1182
1181
1183
val config = KafkaConfig .fromProps(defaults)
1182
1184
assertEquals(1 , config.brokerId)
1183
- assertEquals(Seq (" PLAINTEXT://127.0.0.1:1122" ), config.effectiveAdvertisedBrokerListeners.map(_.connectionString ))
1185
+ assertEquals(Seq (" PLAINTEXT://127.0.0.1:1122" ), config.effectiveAdvertisedBrokerListeners.map(JTestUtils .endpointToString ))
1184
1186
assertEquals(Map (" 127.0.0.1" -> 2 , " 127.0.0.2" -> 3 ), config.maxConnectionsPerIpOverrides)
1185
1187
assertEquals(List (" /tmp1" , " /tmp2" ), config.logDirs)
1186
1188
assertEquals(12 * 60L * 1000L * 60 , config.logRollTimeMillis)
0 commit comments