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-spring-boot.git


The following commit(s) were added to refs/heads/main by this push:
     new 86ba200b5d5 chore: fix SupervisingRouteControllerRestartTest for 
FailedToStartRouteException wrapping
86ba200b5d5 is described below

commit 86ba200b5d56c6a3ce79eb9c3bf711536dec7d27
Author: Claus Ibsen <[email protected]>
AuthorDate: Mon Aug 31 07:42:32 2026 +0200

    chore: fix SupervisingRouteControllerRestartTest for 
FailedToStartRouteException wrapping
    
    Camel core's CAMEL-24404 now wraps every consumer/route-service startup
    failure in FailedToStartRouteException, adding an extra layer to the
    exception chain. Update the assertion to match: the original IOException
    is now two levels down (FailedToStartRouteException -> RuntimeCamelException
    -> IOException) instead of directly under the top-level exception.
---
 .../camel/spring/boot/SupervisingRouteControllerRestartTest.java   | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git 
a/core/camel-spring-boot/src/test/java/org/apache/camel/spring/boot/SupervisingRouteControllerRestartTest.java
 
b/core/camel-spring-boot/src/test/java/org/apache/camel/spring/boot/SupervisingRouteControllerRestartTest.java
index dd7ef0782c1..647c94fb3ac 100644
--- 
a/core/camel-spring-boot/src/test/java/org/apache/camel/spring/boot/SupervisingRouteControllerRestartTest.java
+++ 
b/core/camel-spring-boot/src/test/java/org/apache/camel/spring/boot/SupervisingRouteControllerRestartTest.java
@@ -20,6 +20,7 @@ import static org.awaitility.Awaitility.await;
 
 import java.util.concurrent.TimeUnit;
 import org.apache.camel.CamelContext;
+import org.apache.camel.FailedToStartRouteException;
 import org.apache.camel.ServiceStatus;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.spi.SupervisingRouteController;
@@ -69,7 +70,11 @@ public class SupervisingRouteControllerRestartTest {
         try {
             controller.startRoute("dummy");
         } catch (Exception e) {
-            Assertions.assertEquals("Forced error on restart", 
e.getCause().getMessage());
+            // consumer startup failures are wrapped in 
FailedToStartRouteException (CAMEL-24404); the
+            // checked IOException thrown by DummyConsumer is itself wrapped 
in a RuntimeCamelException
+            // before that, so the original message is two levels down the 
cause chain
+            Assertions.assertInstanceOf(FailedToStartRouteException.class, e);
+            Assertions.assertEquals("Forced error on restart", 
e.getCause().getCause().getMessage());
         }
 
         // Wait for wile to give time to the controller to start the route

Reply via email to