ni-ze commented on a change in pull request #3838:
URL: https://github.com/apache/rocketmq/pull/3838#discussion_r823744454



##########
File path: 
client/src/test/java/org/apache/rocketmq/client/consumer/DefaultLitePullConsumerTest.java
##########
@@ -585,23 +615,23 @@ private void 
initDefaultLitePullConsumer(DefaultLitePullConsumer litePullConsume
         field.set(litePullConsumerImpl, offsetStore);
 
         when(mQClientFactory.getMQClientAPIImpl().pullMessage(anyString(), 
any(PullMessageRequestHeader.class),
-            anyLong(), any(CommunicationMode.class), 
nullable(PullCallback.class)))
-            .thenAnswer(new Answer<PullResult>() {
-                @Override
-                public PullResult answer(InvocationOnMock mock) throws 
Throwable {
-                    PullMessageRequestHeader requestHeader = 
mock.getArgument(1);
-                    MessageClientExt messageClientExt = new MessageClientExt();
-                    messageClientExt.setTopic(topic);
-                    messageClientExt.setQueueId(0);
-                    messageClientExt.setMsgId("123");
-                    messageClientExt.setBody(new byte[] {'a'});
-                    messageClientExt.setOffsetMsgId("234");
-                    messageClientExt.setBornHost(new InetSocketAddress(8080));
-                    messageClientExt.setStoreHost(new InetSocketAddress(8080));
-                    PullResult pullResult = createPullResult(requestHeader, 
PullStatus.FOUND, Collections.<MessageExt>singletonList(messageClientExt));
-                    return pullResult;
-                }
-            });
+                anyLong(), any(CommunicationMode.class), 
nullable(PullCallback.class)))

Review comment:
       fixed, thx.




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