Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion tests/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
import asyncio
import platform
import socket
import sys
import time
from collections.abc import Iterable
from functools import cache
Expand All @@ -38,6 +39,7 @@
_MONOTONIC_RESOLUTION = time.get_clock_info("monotonic").resolution

_IS_PYPY = platform.python_implementation() == "PyPy"
_IS_MACOS = sys.platform == "darwin"

# get_service_info / async_request timeout for tests using the
# `quick_request_timing` fixture. The fixture cuts the initial-query
Expand All @@ -55,7 +57,10 @@
# the registrar's response lands inside ~10ms and 75ms is ~7x headroom.
# PyPy's JIT is still warming up the first time this path runs early in
# the suite, so the round trip is too slow for 75ms; give it more room.
LOOPBACK_FIND_TIMEOUT = 0.3 if _IS_PYPY else 0.075
# GitHub's macOS runners stall the whole process for longer than 75ms
# often enough that the response lands after `find()` has already
# cancelled the browser, so they get the same room.
LOOPBACK_FIND_TIMEOUT = 0.3 if _IS_PYPY or _IS_MACOS else 0.075

# IPv6-only `find()` on Linux GitHub runners can hit `[Errno 101] Network
# is unreachable` on the `::1` socket and falls back to the `fe80::` link-
Expand Down
Loading