You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit d6d9f4e
Browse filesBrowse the repository at this point in the historyBrowse files
gh-162606: Avoid find_unused_port() races in asyncio tests (GH-162607)
* gh-162606: Fix port races in asyncio connection-refused tests
test_create_connection_local_addr_skip_different_family and
test_sock_client_fail expected a connect to an "unused" port to be
refused, but the port was not reserved, so a parallel test could start
listening on it and the connect would succeed. Keep a bound,
non-listening socket open for the duration of each test instead.
* gh-162606: Avoid find_unused_port() races in more asyncio tests
Bind servers to port 0 instead of picking a port first and binding it
later, retry test_create_connection_local_addr on EADDRINUSE, and keep
the port of test_open_connection_happy_eyeball_refcycles reserved on
both loopback addresses so the connection is reliably refused.
* gh-162606: Remove unused import in test_proactor_events
* gh-162606: Accept TimeoutError for non-listening ports on macOS
macOS and iOS fail a connect to a bound but non-listening port with
ETIMEDOUT immediately instead of ECONNREFUSED.
---------
(cherry picked from commit 4b66b87)
Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
0 commit comments