Skip to content

CAMEL-23214: Migrate AvailablePortFinder in camel-itest tests#22124

Merged
gnodet merged 3 commits intoapache:mainfrom
gnodet:CAMEL-23214-port-itest
Mar 20, 2026
Merged

CAMEL-23214: Migrate AvailablePortFinder in camel-itest tests#22124
gnodet merged 3 commits intoapache:mainfrom
gnodet:CAMEL-23214-port-itest

Conversation

@gnodet
Copy link
Contributor

@gnodet gnodet commented Mar 20, 2026

Migrate AvailablePortFinder.getNextAvailable() to the @RegisterExtension pattern using AvailablePortFinder.Port in camel-itest test classes.

This is part of the effort to split #22101 into per-component PRs.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@github-actions
Copy link
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 build-all, build-dependents, 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.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@gnodet gnodet marked this pull request as ready for review March 20, 2026 05:55
Replace getNextAvailable() (which releases the port immediately) with
find() + keeping the Port reference in a field. This prevents another
test from grabbing the same port before the server binds to it.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@gnodet gnodet merged commit 8dec349 into apache:main Mar 20, 2026
5 checks passed
@gnodet gnodet deleted the CAMEL-23214-port-itest branch March 20, 2026 08:20
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