Croway opened a new pull request, #30560: URL: https://github.com/apache/camel/pull/30560
## Description Fixes the two tests that fail on every run of the [Camel Jbang IT Tests](https://ci-builds.apache.org/job/Camel/job/Camel%20Jbang%20IT%20Tests/job/main/652/testReport/) job on `main` (builds 646 to 652 all fail the same way). Both fixes are in the tests: no product code changes. **`ExportITCase.testExportFile`** (failing since build 645, Nov 13) The test copies `FromDirectoryRoute.java` and `server.yaml` to the data folder and exports with `--directory` set to that same folder, while the CLI runs from another directory. Since CAMEL-26912 (#29813) `camel export` refuses a directory with files that no export created: ``` ERROR: Cannot export to /deployments/data/... because it has files that camel export did not create: use --clean-dir to delete them, or export to another directory ``` That is the intended behaviour, described in the 4.24 upgrade guide. The test now exports to a new `exported` sub-directory of the data folder. **`LocalKameletsITCase.localKameletRunTest`** (failing since build 616, Oct 16) `user-source.kamelet.yaml` called `https://random-data-api.com/api/v2/users`. That host no longer resolves (public resolvers answer SERVFAIL, and its delegated name servers refuse the zone), so the first timer tick fails with `UnknownHostException`, the error handler logs an `ERROR`, and `JBangTestSupport.assertNoErrors()` fails the test in `afterEach`. The test first broke with "No routes found" (CAMEL-25397); since #29159 it runs a consumer route, which calls the host for real. The kamelet now sets a fixed JSON body instead of calling an external host, and no longer needs `camel:http`. The test also checks that the consumer route logs that body, so it verifies that the local kamelet produced a message, not only that the context started. Not included: the example in `camel-jbang-devtools.adoc` that calls the same host (`/api/v2/banks`). ## Testing This job does not run on pull requests, so both tests were run locally in the container-based harness, as the Jenkins job does (CLI 4.24.0-SNAPSHOT from the local Maven repository, freshly built image): ``` mvn verify -f dsl/camel-jbang/camel-jbang-it/pom.xml -Pjbang-it-test -Dit.test='ExportITCase#testExportFile,LocalKameletsITCase' ``` | | `ExportITCase#testExportFile` | `LocalKameletsITCase#localKameletRunTest` | |---|---|---| | `main` | fails: `Cannot export to ... because it has files that camel export did not create` | fails: `UnknownHostException: random-data-api.com` | | this PR | passes | passes | _Claude Code on behalf of Croway_ -- 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]
