chore: use dynamic port in CXF security tests - #25947
Conversation
gnodet
left a comment
There was a problem hiding this comment.
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
|
🌟 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: 0 all testedMaveniverse Scalpel detected 1 affected modules (current approach: 0).
|
The CXF security integration tests still bind to port 9000 and skip when it is unavailable. Use
AvailablePortFinderto reserve a dynamic port, pass it into both Spring contexts, and override the WSDL-derived client address.Tests:
mvn -Dtest=GreeterClientTest,GreeterClientCxfMessageTest testmvn testintests/camel-itest(62 tests, 0 failures)Codex on behalf of Croway