CAMEL-23894: Fix flaky ExportTest and DependencyUpdateTest for Spring Boot runtime#24402
Conversation
Pin Spring Boot export tests to a released Camel version (4.13.0) instead of defaulting to the current SNAPSHOT. The Spring Boot catalog provider (camel-catalog-provider-springboot) comes from the separate camel-spring-boot project whose SNAPSHOT may not be deployed to Apache Snapshots, causing intermittent CI failures when CatalogLoader.loadSpringBootCatalog() tries to download it. Released versions are always available on Maven Central, making these tests deterministic. Tests that already specify --camel-version (like shouldExportDifferentVersion) are left unchanged via a containsCamelVersion() guard. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
🌟 Thank you for your contribution to the Apache Camel project! 🌟 🐫 Apache Camel Committers, please review the following items:
|
|
🧪 CI tested the following changed modules:
🔬 Scalpel shadow comparison — Scalpel: 1 tested, 0 compile-only — current: 6 all testedMaveniverse Scalpel detected 1 affected modules (current approach: 6).
|
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This reverts commit 9b80c17.
Use a separate conditional CommandLine.populateCommand() call instead of passing an empty string "", which picocli treats as a positional file argument, breaking quarkus and main runtime tests. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…ng files A second CommandLine.populateCommand() call resets picocli's positional args (file paths), causing the export to run with no files. Build args as a List and use a single populateCommand call instead. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Summary
Fixes CAMEL-23894:
ExportTestandDependencyUpdateTestSpring Boot ([2]) parameterized tests fail when thecamel-catalog-provider-springbootSNAPSHOT artifact is not deployed to the Apache Snapshots repository.Root cause:
CatalogLoader.loadSpringBootCatalog()always downloads the Spring Boot catalog from remote repos (unlikeloadCatalog()which short-circuits for the main runtime). When the SNAPSHOT isn't deployed, the download fails and all Spring Boot export tests break.Fix: Pin Spring Boot tests to a released version (
4.13.0) via--camel-versionso they use artifacts from Maven Central instead of relying on SNAPSHOT availability. The fix uses a singleCommandLine.populateCommand()call per test (building args as aList<String>) to avoid picocli resetting positional file args on repeated calls.Changes
ExportTest.java: AddedRELEASED_CAMEL_VERSIONconstant, updatedcreateCommand()helper and 7 test methods to pin--camel-versionfor Spring Boot runtimeDependencyUpdateTest.java: Added--camel-version=4.13.0to 2 test methods that were missing itTest plan
[2]parameterized variants pass without SNAPSHOT artifactsmvn formatter:format impsort:sortClaude Code on behalf of @gnodet