summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorMisaki Shioi <31817032+shioimm@users.noreply.github.com>2026-01-08 09:41:42 +0900
committerGitHub <noreply@github.com>2026-01-08 09:41:42 +0900
commit080d66beca71d6cc290a8be4acd49e5a70594f9c (patch)
tree50ddceff7602e3f667a82d9fce9b30eda43009ea /test
parent950ffa90b7939885cc35d376a2e10aabfdc7170d (diff)
Avoid flaky test failures by retrying on local port conflicts (#15818)
This test obtains an available port number by calling `TCPServer.new`, then closes it and passes the same port number as `local_port` to `TCPSocket.new`. However, `TCPSocket.new` could occasionally fail with `Errno::EADDRINUSE` at the bind(2) step. I believe this happens when tests are run in parallel and another process on the same host happens to bind the same port in the short window between closing the `TCPServer` and calling `TCPSocket.new`. To address this race condition, the test now retries with a newly selected available port when such a conflict occurs.
Diffstat (limited to 'test')
0 files changed, 0 insertions, 0 deletions