mayurbm commented on PR #25554:
URL: https://github.com/apache/camel/pull/25554#issuecomment-5409695158

   ### CI Build Failure Fix — `AiToolEndpointLifecycleTest`
   
   **Failures:**
   ```
   
AiToolEndpointLifecycleTest.testArgSchemaAndParametersAreMutuallyExclusive:355
   Expecting actual throwable to be an instance of: 
java.lang.IllegalArgumentException
   but was: org.apache.camel.FailedToStartRouteException
   
   
AiToolEndpointLifecycleTest.testOutputSchemaAndOutputParametersAreMutuallyExclusive:435
   Expecting actual throwable to be an instance of: 
java.lang.IllegalArgumentException
   but was: org.apache.camel.FailedToStartRouteException
   ```
   
   **Root cause:** Same pattern as 
`NettyHttpTwoRoutesValidateBootstrapConfigurationTest` and 
`DefaultSupervisingRouteControllerTest`. Both tests call 
`context.addRoutes(...)` which triggers route startup — the 
`IllegalArgumentException` thrown from the consumer's `doStart()` is now 
wrapped in `FailedToStartRouteException` by `InternalRouteStartupManager`.
   
   **Fix:** Updated both assertions to use 
`.isInstanceOf(FailedToStartRouteException.class).cause().isInstanceOf(IllegalArgumentException.class).hasMessageContaining("mutually
 exclusive")` — the message check is preserved via AssertJ's `.cause()` chain.
   
   **Note:** The `camel-file` test failures 
(`FilerConsumerShouldSkipDoneFileSuffixTest`, 
`FileConsumerInterceptEmptyFileTest`) in the same CI run are pre-existing flaky 
tests unrelated to this PR — they have no connection to our changes.
   
   Local validation:
   - `mvn formatter:format impsort:sort` on `components/camel-ai/camel-ai-tool` 
— no changes needed
   - `AiToolEndpointLifecycleTest` (2 fixed tests): Tests run: 2, Failures: 0
   - `DefaultSupervisingRouteControllerTest`: Tests run: 2, Failures: 0
   - `InternalRouteStartupManagerConsumerStartTest`: Tests run: 2, Failures: 0
   - `NettyHttpTwoRoutesValidateBootstrapConfigurationTest`: Tests run: 1, 
Failures: 0


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