davsclaus commented on code in PR #27956:
URL: https://github.com/apache/camel/pull/27956#discussion_r4357363168
##########
components/camel-milo/src/test/java/org/apache/camel/component/milo/ServerCertificateValidationTest.java:
##########
@@ -126,7 +126,8 @@ protected RoutesBuilder createRouteBuilder() {
public void configure() {
from(DIRECT_START).to(MILO_SERVER_ITEM);
- // the consumers deliver the current value while they start,
so the test starts these routes
+ // consumers deliver the current server value when they
subscribe, so they are started
+ // only after the initial write to avoid receiving both the
initial value and the write as two messages
Review Comment:
Main already has the `autoStartup(false)` fix from CAMEL-25645 (#27999), so
this hunk and the one below only reword the comments. Could the file be left
out of this PR, so the commit history does not suggest a second fix of this
test?
##########
components/camel-milo/src/main/java/org/apache/camel/component/milo/client/internal/SubscriptionManager.java:
##########
@@ -1542,13 +1542,12 @@ public CompletableFuture<CallMethodResult> call(
return newNotConnectedResult();
}
- return this.connected.call(nodeId, methodId,
inputArguments).handleAsync((status, e) -> {
+ return this.connected.call(nodeId, methodId,
inputArguments).whenCompleteAsync((status, e) -> {
Review Comment:
Besides the failure propagation, this changes the success case: the old
`handleAsync` returned `null` here even when the call succeeded, so an awaited
`call` always left a `null` body. Now the route gets the `CallMethodResult`
(including the `Bad_NodeIdUnknown` / `Bad_MethodInvalid` answer from
CAMEL-25690 for an unknown namespace). That is the better behaviour, but it is
what users will notice, so it deserves a test (an assertion on the body in
`CallClientTest` fails before this change) and a line in the 4.24 upgrade guide.
--
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]