[
https://issues.apache.org/jira/browse/CAMEL-21122?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18151663#comment-18151663
]
Claus Ibsen commented on CAMEL-21122:
-------------------------------------
Done by https://github.com/apache/camel/pull/23491 (merged 2026-05-26, in
4.21.0): `AvailablePortFinder.Port` now
releases a port held in a non-static `@RegisterExtension` field after each
test, and keeps a static one for the whole
class. camel-jetty's `BaseJettyTest` uses per-test ports this way. Closing.
_Claude Code on behalf of davsclaus_
> camel-test: improve AvailablePortFinder.Port for transient assignments
> ------------------------------------------------------------------------
>
> Key: CAMEL-21122
> URL: https://issues.apache.org/jira/browse/CAMEL-21122
> Project: Camel
> Issue Type: Improvement
> Components: camel-test
> Affects Versions: 4.7.0
> Reporter: Otavio Rodolfo Piske
> Priority: Minor
> Labels: help-wanted
> Fix For: 4.21.0
>
>
> Currently, AvailablePort only works when defined as a static field. Some
> components, such as Jetty, need them to be transient (i.e.: regenerated after
> every test), as such the current implementation is not compatible (it causes
> flakiness on camel-jetty).
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)