yuz10 commented on a change in pull request #3588:
URL: https://github.com/apache/rocketmq/pull/3588#discussion_r776601466
##########
File path:
common/src/test/java/org/apache/rocketmq/common/protocol/header/FastCodesHeaderTest.java
##########
@@ -65,9 +75,11 @@ public void testDecodeSendMessageHeaderV2() throws Exception
{
return extFields;
}
- private void check(RemotingCommand command, List<Field> fields) throws
Exception {
- SendMessageRequestHeaderV2 o1 = (SendMessageRequestHeaderV2)
command.decodeCommandCustomHeader(SendMessageRequestHeaderV2.class);
- SendMessageRequestHeaderV2 o2 =
AbstractSendMessageProcessor.decodeSendMessageHeaderV2(command);
+ private void check(RemotingCommand command, List<Field> fields,
+ Class<? extends CommandCustomHeader> classHeader) throws Exception
{
+ CommandCustomHeader o1 =
command.decodeCommandCustomHeader(classHeader);
Review comment:
If the classHeader is instance of FastCodesHeader,
command.decodeCommandCustomHeader(classHeader) also calls fast decode, the
result will always be the same
--
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]