| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -25,6 +25,7 @@ | |||
| 25 | 25 | import asyncio | |
| 26 | 26 | import platform | |
| 27 | 27 | import socket | |
| 28 | + import sys | ||
| 28 | 29 | import time | |
| 29 | 30 | from collections.abc import Iterable | |
| 30 | 31 | from functools import cache | |
@@ -38,6 +39,7 @@ | |||
| 38 | 39 | _MONOTONIC_RESOLUTION = time.get_clock_info("monotonic").resolution | |
| 39 | 40 | ||
| 40 | 41 | _IS_PYPY = platform.python_implementation() == "PyPy" | |
| 42 | + _IS_MACOS = sys.platform == "darwin" | ||
| 41 | 43 | ||
| 42 | 44 | # get_service_info / async_request timeout for tests using the | |
| 43 | 45 | # `quick_request_timing` fixture. The fixture cuts the initial-query | |
@@ -55,7 +57,10 @@ | |||
| 55 | 57 | # the registrar's response lands inside ~10ms and 75ms is ~7x headroom. | |
| 56 | 58 | # PyPy's JIT is still warming up the first time this path runs early in | |
| 57 | 59 | # 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 | ||
| 59 | 64 | ||
| 60 | 65 | # IPv6-only `find()` on Linux GitHub runners can hit `[Errno 101] Network | |
| 61 | 66 | # is unreachable` on the `::1` socket and falls back to the `fe80::` link- | |
| Back | FazBrowse Home | New Git URL |
0 commit comments