FrankYang0529 commented on code in PR #20002:
URL: https://github.com/apache/kafka/pull/20002#discussion_r2158377212
##########
core/src/test/scala/unit/kafka/server/AbstractApiVersionsRequestTest.scala:
##########
@@ -38,9 +38,9 @@ abstract class AbstractApiVersionsRequestTest(cluster:
ClusterInstance) {
def sendApiVersionsRequest(request: ApiVersionsRequest, listenerName:
ListenerName): ApiVersionsResponse = {
val socket = if (cluster.controllerListenerName() == listenerName) {
- cluster.controllerSocketServers().asScala.head
+
cluster.controllers().values().stream().map(_.socketServer).findFirst().get()
} else {
- cluster.brokerSocketServers().asScala.head
+ cluster.brokers().values().asScala.head.socketServer
Review Comment:
Could we follow same pattern to rewrite here? The controller uses Java, but
broker uses Scala.
--
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]