chennaji9 opened a new issue, #11285:
URL: https://github.com/apache/rocketmq/issues/11285

   ### Description
   
   
`remoting/src/main/java/org/apache/rocketmq/remoting/rpc/RequestBuilder.java` 
has no direct unit test coverage. The class contains non-trivial public static 
behavior used to build RPC requests across the codebase:
   
   - request-code-to-header-class lookup (`PullMessageRequestHeader`, 
`GetConsumerListByGroupRequestBody`, `CloneGroupOffsetRequestHeader`, 
`QueryConsumerOffsetRequestHeader`, `UpdateConsumerOffsetRequestHeader`),
   - reflection-based header construction,
   - `oneway`/`brokerName`/`topic`/`queueId`/`lo` field propagation across 
several overloads (including nullable `Boolean` queueId handling),
   - the unknown-request-code rejection branch 
(`UnsupportedOperationException`).
   
   `remoting/src/test/java/org/apache/rocketmq/remoting/rpc/` contains tests 
for `ClientMetadata`, `RpcClientImpl` and `RpcRequestHeader`, but no test 
references `RequestBuilder` anywhere in the repo's test sources. A regression 
in the request-code mapping or in field propagation would currently go 
unnoticed.
   
   ### Expected behavior
   
   Add a focused `RequestBuilderTest` that pins the current contract: each 
supported request code returns the expected header type with all fields 
propagated, and unknown request codes fail with `UnsupportedOperationException` 
mentioning the code.


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

Reply via email to