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.
Reference Commits:
20003c845Files (primary):
yaml-tests/src/main/.../server/ExternalServer.javaTwo 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:
00ce76b13external-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.