dengziming commented on a change in pull request #10535:
URL: https://github.com/apache/kafka/pull/10535#discussion_r624667493



##########
File path: core/src/test/scala/unit/kafka/server/BaseRequestTest.scala
##########
@@ -136,7 +135,7 @@ abstract class BaseRequestTest extends 
IntegrationTestHarness {
   }
 
   def sendWithHeader(request: AbstractRequest, header: RequestHeader, socket: 
Socket): Unit = {
-    val serializedBytes = 
Utils.toArray(RequestTestUtils.serializeRequestWithHeader(header, request))
+    val serializedBytes = Utils.toArray(request.serializeWithHeader(header))
     sendRequest(socket, serializedBytes)

Review comment:
       This is a great suggestion! I even found that the whole 
`BaseRequestTest` is a duplicate of `IntegrationTestUtils`, how about open 
another PR for this refactor since this would change a lot of classes and the 
`IntegrationTestUtils` is under `integration` package while `BaseRequestTest` 
is under `unit` package.




-- 
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


Reply via email to