test: widen loopback find timeout on macos by bdraco · Pull Request #1832 · python-zeroconf/python-zeroconf · GitHub
Skip to content

test: widen loopback find timeout on macos - #1832

Merged
bdraco merged 1 commit into
masterfrom
fix-macos-find-timeout
Aug 28, 2026
Merged

bdraco merged 1 commit into
masterfrom
fix-macos-find-timeout

Conversation

@bdraco

@bdraco bdraco commented Aug 28, 2026

Copy link
Copy Markdown
Member

Summary

test_integration_with_subtype_and_listener failed twice recently, both times on macos runners (3.10 and 3.13), with the second find() returning (); the captured log shows the registrar's PTR response was sent and received, it just landed after the 75ms find() sleep had already cancelled the browser.

Details

  • find() is a fixed time.sleep(timeout), so the timeout is a hard budget for the whole query and response round trip; locally that round trip is 1 to 7ms for every test in the file, on GitHub's macos runners the process stalls for longer than 75ms often enough to lose the answer
  • macos now gets the same 300ms LOOPBACK_FIND_TIMEOUT PyPy already uses, other platforms keep 75ms; this adds about 1.8s to each macos job

Test plan

  • tests/services/test_types.py passes locally on macos with the new budget
  • measured the query to add_service latency for both find() phases of the plain and subtype tests, 1 to 7ms in every run, so the failures are runner stalls rather than a systematic slow path

@bdraco
bdraco marked this pull request as ready for review August 28, 2026 22:01
@bdraco
bdraco merged commit 9e732c5 into master Aug 28, 2026
31 checks passed
@codspeed

codspeed Bot commented Aug 28, 2026

Copy link
Copy Markdown

@bdraco
bdraco deleted the fix-macos-find-timeout branch August 28, 2026 22:01
@codecov

codecov Bot commented Aug 28, 2026 •

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant