showuon commented on a change in pull request #10794: URL: https://github.com/apache/kafka/pull/10794#discussion_r642196090
########## File path: core/src/main/scala/kafka/server/BrokerToControllerChannelManager.scala ########## @@ -239,18 +244,34 @@ class BrokerToControllerChannelManagerImpl( * * @param request The request to be sent. * @param callback Request completion callback. + * @param requestHeader The request header to be sent, used for parsing the envelop response */ def sendRequest( request: AbstractRequest.Builder[_ <: AbstractRequest], - callback: ControllerRequestCompletionHandler + callback: ControllerRequestCompletionHandler, + requestHeader: RequestHeader ): Unit = { requestThread.enqueue(BrokerToControllerQueueItem( time.milliseconds(), request, - callback + callback, + requestHeader )) } + /** + * Send request to the controller. + * + * @param request The request to be sent. + * @param callback Request completion callback. + */ + def sendRequest( + request: AbstractRequest.Builder[_ <: AbstractRequest], + callback: ControllerRequestCompletionHandler, Review comment: Use the method overloading because the scala default parameter value doesn't work well in Mockito. ref: https://stackoverflow.com/questions/32975379/why-mockito-doesnt-handle-default-scala-parameters-properly -- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org