Skip to content

chore: use dynamic port in CXF security tests - #25947

Merged
Croway merged 1 commit into
apache:mainfrom
Croway:ci-issue/randomize-cxf-security-test-port
Aug 31, 2026
Merged

chore: use dynamic port in CXF security tests#25947
Croway merged 1 commit into
apache:mainfrom
Croway:ci-issue/randomize-cxf-security-test-port

Conversation

@Croway

@Croway Croway commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

The CXF security integration tests still bind to port 9000 and skip when it is unavailable. Use AvailablePortFinder to reserve a dynamic port, pass it into both Spring contexts, and override the WSDL-derived client address.

Tests:

  • mvn -Dtest=GreeterClientTest,GreeterClientCxfMessageTest test
  • same focused tests while port 9000 was occupied
  • mvn test in tests/camel-itest (62 tests, 0 failures)

Codex on behalf of Croway

@Croway
Croway requested review from davsclaus and gnodet August 31, 2026 09:27

@gnodet gnodet left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clean, focused improvement that replaces hardcoded port 9000 with dynamic port allocation via AvailablePortFinder, eliminating test flakiness when port 9000 is occupied. The implementation correctly follows the established pattern used by other CXF integration tests in the same module.

The key improvement is removing @EnabledIf / isPortAvailable() — tests will now always run instead of being silently skipped, improving CI signal reliability.

📋 PR Metadata

Aspect Current Suggested
Labels (none) test
Milestone (none) 4.23.0

This review was generated by an AI agent and may contain inaccuracies. Please verify all suggestions before applying.

Claude Code on behalf of Guillaume Nodet

@Croway
Croway merged commit fa3d757 into apache:main Aug 31, 2026
5 checks passed
@github-actions github-actions Bot added the tests label Aug 31, 2026
@github-actions

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

Copy link
Copy Markdown
Contributor

🧪 CI tested the following changed modules:

  • tests/camel-itest

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

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

⚠️ Modules only in Scalpel (1)
  • camel-itest

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

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


⚙️ View full build and test results

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.

3 participants