FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

test: widen loopback find timeout on macos · python-zeroconf/python-zeroconf@62a3e4b · GitHub

Commit 62a3e4b

Browse files
committed
test: widen loopback find timeout on macos
1 parent 228902a commit 62a3e4b

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

‎tests/__init__.py‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
import asyncio
2626
import platform
2727
import socket
28+
import sys
2829
import time
2930
from collections.abc import Iterable
3031
from functools import cache
@@ -38,6 +39,7 @@
3839
_MONOTONIC_RESOLUTION = time.get_clock_info("monotonic").resolution
3940

4041
_IS_PYPY = platform.python_implementation() == "PyPy"
42+
_IS_MACOS = sys.platform == "darwin"
4143

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

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

0 commit comments

Comments
 (0)

Back | FazBrowse Home | New Git URL