mayurbm commented on PR #25554:
URL: https://github.com/apache/camel/pull/25554#issuecomment-5353360188
### Addressed: broken tests in camel-main and camel-spring-xml
Fixed the two test files flagged in the review of PR #25205:
**`MainSupervisingRouteControllerTest`** (core/camel-main) — `testMain` and
`testMainApplicationProperties`:
Before:
```java
assertEquals("Cannot start", e.getMessage());
assertInstanceOf(IllegalArgumentException.class, e);
```
After:
```java
assertInstanceOf(FailedToStartRouteException.class, e);
assertInstanceOf(IllegalArgumentException.class, e.getCause());
assertEquals("Cannot start", e.getCause().getMessage());
```
**`SpringSupervisingRouteControllerTest`** (camel-spring-xml) —
`testSupervising`:
Before:
```java
assertEquals("Cannot start", e.getMessage());
assertTrue(e instanceof IllegalArgumentException);
```
After:
```java
assertTrue(e instanceof FailedToStartRouteException);
assertTrue(e.getCause() instanceof IllegalArgumentException);
assertEquals("Cannot start", e.getCause().getMessage());
```
**Local validation (all passing):**
- `mvn formatter:format impsort:sort` on all 3 modules — no changes needed
- `InternalRouteStartupManagerConsumerStartTest`: Tests run: 2, Failures: 0
- `MainSupervisingRouteControllerTest`: Tests run: 3, Failures: 0
- `SpringSupervisingRouteControllerTest`: Tests run: 1, Failures: 0
[JDK 21 / Maven 3.9]
--
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]