gbhavya07 opened a new pull request, #24099:
URL: https://github.com/apache/camel/pull/24099

   # Description
   
   This PR fixes `CustomJarsITCase` on the `camel-4.18.x` branch.
   
   The current implementation of `CustomJarsITCase` uses 
`CircuitBreakerRoute.java` and verifies that running the route without the 
required dependency fails with an expected error. The test expects route 
startup to fail with:
   
   * `Failed to create route: circuitBreaker`
   * `Cannot find camel-resilience4j or camel-microprofile-fault-tolerance on 
the classpath`
   
   However, according to the Jenkins failures reported in CAMEL-23754, the 
route starts successfully and reaches route execution, causing the assertions 
to fail. The test has failed on the last 27 Jenkins CI builds reported in 
CAMEL-23754.
   
   The changes in this PR are based on the implementation introduced on the 
`main` branch as part of CAMEL-23104.
   
   ## Investigation
   
   While investigating the issue, I compared the `camel-4.18.x` implementation 
with the current implementation on the `main` branch.
   
   I found that under CAMEL-23104, the original CircuitBreaker-based test was 
replaced on `main` because the previous approach was failing locally. Instead 
of relying on CircuitBreaker dependency resolution behavior, the test was 
redesigned to verify custom dependency loading directly using a dedicated 
`CustomJar.java` route.
   
   The new approach validates two scenarios:
   
   1. Running a route that depends on an external library without providing the 
dependency results in a compilation failure.
   2. Running the same route with the required dependency succeeds and executes 
correctly.
   
   This provides a more direct validation of custom dependency loading and 
avoids relying on CircuitBreaker-specific startup behavior.
   
   ## Changes
   
   Backport the `main` branch implementation of `CustomJarsITCase` to 
`camel-4.18.x` by:
   
   * Replacing the CircuitBreaker-based test with the CustomJar-based test.
   * Adding `CustomJar.java` as a test resource.
   * Adding the `CUSTOM_JAR` test resource entry to `JBangTestSupport`.
   
   The updated test verifies that:
   
   * Execution fails with a compilation error when the required external 
dependency is missing.
   * Execution succeeds when `org.apache.commons:commons-text` is provided.
   * The route runs successfully and produces the expected output.
   
   This aligns the `camel-4.18.x` implementation with the version currently 
used on the `main` branch and is intended to address the failing test reported 
in CAMEL-23754.
   
   # Target
   
   * [ ] I checked that the commit is targeting the correct branch (Camel 4 
uses the `main` branch)
   * [x] I checked that the commit is targeting the correct maintenance branch 
(`camel-4.18.x`)
   
   # Tracking
   
   * [x] I checked there is a JIRA issue filed for the change: CAMEL-23754
   
   # Apache Camel coding standards and style
   
   * [x] I checked that each commit in the pull request has a meaningful 
subject line and body.
   
   * [ ] I have run `mvn clean install -DskipTests` locally from the root 
folder and committed all auto-generated changes.
   


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