Skip to content

Change ExternalServer to claim ports JVM-wide #4346

Description

@ScottDugas

Reference Commits: 20003c845
Files (primary):
yaml-tests/src/main/.../server/ExternalServer.java

Two parallel tests both calling ExternalServer.start() would sometimes race on the "find an available port" step and both try to bind the same port.

Move the port-claim step into a JVM-wide reserved set so a claimed port is unavailable to other constructors until the server actually binds.

Additionally, we should adjust the retry to be time based:
Reference Commits: 00ce76b13

external-server startup was retried a fixed number of times — a slow-to-start server would fail the whole test after N quick retries even though it would have come up if given a moment more.

Change external-server startup retry from a fixed attempt count to a wall-clock time budget.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions