This is an automated email from the ASF dual-hosted git repository.
davsclaus pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/main by this push:
new d1c3b41d97bf chore: camel-grpc - fix RouteControlledStreamObserverTest
for route-start exception wrapping (#25904)
d1c3b41d97bf is described below
commit d1c3b41d97bf5613699c23488931470d5a4c0586
Author: Claus Ibsen <[email protected]>
AuthorDate: Sun Aug 30 18:11:16 2026 +0200
chore: camel-grpc - fix RouteControlledStreamObserverTest for route-start
exception wrapping (#25904)
CAMEL-24404 (#25554) made InternalRouteStartupManager always wrap consumer
startup failures in FailedToStartRouteException.
unsupportedEndpointConfigurationFailureTest
asserted camelContext::start threw a raw IllegalArgumentException directly,
so it
failed on JDK 25/ubuntu-avx CI since that change merged.
Assert on FailedToStartRouteException with the original
IllegalArgumentException as
cause, matching the pattern used for the other consumer-startup tests
updated for
CAMEL-24404 (e.g. DefaultSupervisingRouteControllerTest).
Co-Authored-By: Claude Sonnet 5 <[email protected]>
---
.../camel/component/grpc/RouteControlledStreamObserverTest.java | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git
a/components/camel-grpc/src/test/java/org/apache/camel/component/grpc/RouteControlledStreamObserverTest.java
b/components/camel-grpc/src/test/java/org/apache/camel/component/grpc/RouteControlledStreamObserverTest.java
index 579d8277dcd9..7c5fe894cc46 100644
---
a/components/camel-grpc/src/test/java/org/apache/camel/component/grpc/RouteControlledStreamObserverTest.java
+++
b/components/camel-grpc/src/test/java/org/apache/camel/component/grpc/RouteControlledStreamObserverTest.java
@@ -26,6 +26,7 @@ import io.grpc.ManagedChannelBuilder;
import io.grpc.stub.StreamObserver;
import org.apache.camel.CamelContext;
import org.apache.camel.Exchange;
+import org.apache.camel.FailedToStartRouteException;
import org.apache.camel.Message;
import org.apache.camel.builder.RouteBuilder;
import org.apache.camel.impl.DefaultCamelContext;
@@ -188,7 +189,8 @@ public class RouteControlledStreamObserverTest extends
GrpcTestSupport {
.to("log:foo");
}
});
- assertThrows(IllegalArgumentException.class, camelContext::start);
+ FailedToStartRouteException exception =
assertThrows(FailedToStartRouteException.class, camelContext::start);
+ assertInstanceOf(IllegalArgumentException.class, exception.getCause());
}
@Override