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? One use Java and another change to use 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: jira-unsubscr...@kafka.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org