gnodet-bot commented on code in PR #27806:
URL: https://github.com/apache/camel/pull/27806#discussion_r4280145168
##########
components/camel-grpc/src/test/java/org/apache/camel/component/grpc/GrpcProducerStreamingTest.java:
##########
@@ -82,31 +82,37 @@ public void testPingAsyncAsync() throws Exception {
public void testPingAsyncAsyncRecovery() throws Exception {
int messageGroupCount = 5;
for (int i = 1; i <= messageGroupCount; i++) {
- template.sendBody("direct:grpc-stream-async-async-route",
+ template.sendBody("direct:grpc-stream-async-async-recovery-route",
PingRequest.newBuilder().setPingName(String.valueOf(i)).build());
}
- template.sendBody("direct:grpc-stream-async-async-route",
PingRequest.newBuilder().setPingName("error").build());
+ template.sendBody("direct:grpc-stream-async-async-recovery-route",
+ PingRequest.newBuilder().setPingName("error").build());
MockEndpoint replies = getMockEndpoint("mock:grpc-replies");
- replies.expectedMessageCount(messageGroupCount);
+ // 5 normal replies + 1 forwarded onError event (forwardOnError=true
on this route)
+ replies.expectedMessageCount(messageGroupCount + 1);
Review Comment:
Note on the forwarded `onError` event: the body of this exchange will be the
`Throwable` (a `RuntimeCamelException` wrapping the gRPC status error), not a
`PongResponse`. The assertion only checks message count, which is fine — just
worth knowing when debugging failures on this assertion.
--
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]