Skip to content

CAMEL-23894: Fix flaky ExportTest and DependencyUpdateTest for Spring Boot runtime#24402

Merged
gnodet merged 6 commits into
apache:mainfrom
gnodet:fix-flaky-jbang-springboot-export-tests
Jul 3, 2026
Merged

CAMEL-23894: Fix flaky ExportTest and DependencyUpdateTest for Spring Boot runtime#24402
gnodet merged 6 commits into
apache:mainfrom
gnodet:fix-flaky-jbang-springboot-export-tests

Conversation

@gnodet

@gnodet gnodet commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Summary

Fixes CAMEL-23894: ExportTest and DependencyUpdateTest Spring Boot ([2]) parameterized tests fail when the camel-catalog-provider-springboot SNAPSHOT artifact is not deployed to the Apache Snapshots repository.

Root cause: CatalogLoader.loadSpringBootCatalog() always downloads the Spring Boot catalog from remote repos (unlike loadCatalog() 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-version so they use artifacts from Maven Central instead of relying on SNAPSHOT availability. The fix uses a single CommandLine.populateCommand() call per test (building args as a List<String>) to avoid picocli resetting positional file args on repeated calls.

Changes

  • ExportTest.java: Added RELEASED_CAMEL_VERSION constant, updated createCommand() helper and 7 test methods to pin --camel-version for Spring Boot runtime
  • DependencyUpdateTest.java: Added --camel-version=4.13.0 to 2 test methods that were missing it

Test plan

  • All 85 tests pass locally (75 ExportTest + 10 DependencyUpdateTest)
  • Spring Boot [2] parameterized variants pass without SNAPSHOT artifacts
  • Code formatting verified with mvn formatter:format impsort:sort

Claude Code on behalf of @gnodet

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>
@gnodet gnodet requested review from christophd and davsclaus July 3, 2026 08:43
@github-actions github-actions Bot added the dsl label Jul 3, 2026
@github-actions

github-actions Bot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

🌟 Thank you for your contribution to the Apache Camel project! 🌟
🤖 CI automation will test this PR automatically.

🐫 Apache Camel Committers, please review the following items:

  • First-time contributors require MANUAL approval for the GitHub Actions to run
  • You can use the command /component-test (camel-)component-name1 (camel-)component-name2.. to request a test from the test bot although they are normally detected and executed by CI.
  • You can label PRs using skip-tests and test-dependents to fine-tune the checks executed by this PR.
  • Build and test logs are available in the summary page. Only Apache Camel committers have access to the summary.

⚠️ Be careful when sharing logs. Review their contents before sharing them publicly.

@github-actions

github-actions Bot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

🧪 CI tested the following changed modules:

  • dsl/camel-jbang/camel-jbang-core

🔬 Scalpel shadow comparison — Scalpel: 1 tested, 0 compile-only — current: 6 all tested

Maveniverse Scalpel detected 1 affected modules (current approach: 6).

⚠️ Modules only in Scalpel (1)
  • camel-jbang-core
Modules only in current approach (6)
  • camel-jbang-mcp
  • camel-jbang-plugin-mcp
  • camel-jbang-plugin-route-parser
  • camel-jbang-plugin-tui
  • camel-jbang-plugin-validate
  • camel-launcher-container

Skip-tests mode would test 1 modules (1 direct + 0 downstream), skip tests for 0 (generated code, meta-modules)

Modules Scalpel would test (1)
  • camel-jbang-core

ℹ️ Shadow mode — Scalpel observes but does not affect test execution. Learn more

⚠️ Some tests are disabled on GitHub Actions (@DisabledIfSystemProperty(named = "ci.env.name")) and require manual verification:

  • dsl/camel-jbang/camel-jbang-core: 1 test(s) disabled on GitHub Actions

💡 Manual integration tests recommended:

You modified dsl/camel-jbang/camel-jbang-core. The related integration tests in dsl/camel-jbang/camel-jbang-it are excluded from CI. Consider running them manually:

mvn verify -f dsl/camel-jbang/camel-jbang-it -Djbang-it-test
All tested modules (7 modules)
  • Camel :: JBang :: Core
  • Camel :: JBang :: MCP
  • Camel :: JBang :: Plugin :: MCP
  • Camel :: JBang :: Plugin :: Route Parser
  • Camel :: JBang :: Plugin :: TUI
  • Camel :: JBang :: Plugin :: Validate
  • Camel :: Launcher :: Container

⚙️ View full build and test results

gnodet and others added 4 commits July 3, 2026 09:13
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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>
@gnodet gnodet changed the title Fix flaky ExportTest and DependencyUpdateTest for Spring Boot runtime CAMEL-23894: Fix flaky ExportTest and DependencyUpdateTest for Spring Boot runtime Jul 3, 2026
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@gnodet gnodet marked this pull request as ready for review July 3, 2026 14:25
@gnodet gnodet merged commit f2d13f4 into apache:main Jul 3, 2026
5 checks passed
@gnodet gnodet deleted the fix-flaky-jbang-springboot-export-tests branch July 3, 2026 14:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants