RFR: 8310525: DynamicLauncher for JDP test needs to try harder to find a free port

Chris Plummer cjplummer at openjdk.org
Mon Sep 16 16:16:06 UTC 2024


On Fri, 13 Sep 2024 09:47:07 GMT, Kevin Walls <kevinw at openjdk.org> wrote:

> JDP tests only make 3 attempts to find a free port, using getFreePort().
> We know getFreePort() is racy and you need to make sure the port really is fee when trying to use it.
> 
> Make 10 attempts.  Leave the logic unchanged.  Also fix a typo in another test.

Bumping the retry count from 3 to 10 seems a bit dubious. Do we really lose out on a race 3 times in a row? It seems like there might be something else going on. However, this change is harmless so I guess it's worth trying.

-------------

Marked as reviewed by cjplummer (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/20991#pullrequestreview-2307118950


More information about the serviceability-dev mailing list