Skip to content

test: speed up test_async_wait_unblocks_on_update#1702

Merged
bdraco merged 1 commit into
python-zeroconf:masterfrom
bluetoothbot:koan/speed-up-async-wait-test
May 17, 2026
Merged

test: speed up test_async_wait_unblocks_on_update#1702
bdraco merged 1 commit into
python-zeroconf:masterfrom
bluetoothbot:koan/speed-up-async-wait-test

Conversation

@bluetoothbot

@bluetoothbot bluetoothbot commented May 17, 2026

Copy link
Copy Markdown
Contributor

What

Add the quick_timing fixture to test_async_wait_unblocks_on_update.

Why

The test took ~2.0s on loopback because async_register_service paid the full RFC 6762 probe/announce intervals (_CHECK_TIME=500ms, _REGISTER_TIME=225ms × 3). On 127.0.0.1 those values are dead air.

How

The fixture (already in conftest.py) patches the intervals down to 10ms — same pattern the project's learnings already recommend for loopback-only tests. The test's assertions (<3000ms, <1000ms) are wait-unblock latency bounds and stay meaningful with shorter register cycles.

Testing

  • Before: 1 passed in 2.02s
  • After: 1 passed in 0.43s
  • 5x stability run (--count=5): 5 passed in 1.68s

Quality Report

Changes: 1 file changed, 1 insertion(+), 1 deletion(-)

Code scan: clean

Tests: passed (4 PASSED)

Branch hygiene: clean

Generated by Kōan post-mission quality pipeline

…xture

Drops runtime from ~2.0s to ~0.4s by shortening probe/announce intervals
on loopback. The test only asserts wait-unblock latency bounds (<3000ms,
<1000ms), so faster register cycles do not weaken what it pins.
@codspeed-hq

codspeed-hq Bot commented May 17, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 6 untouched benchmarks


Comparing bluetoothbot:koan/speed-up-async-wait-test (02cd2bc) with master (9b4db62)

Open in CodSpeed

@codecov

codecov Bot commented May 17, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.76%. Comparing base (9b4db62) to head (02cd2bc).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1702   +/-   ##
=======================================
  Coverage   99.76%   99.76%           
=======================================
  Files          33       33           
  Lines        3410     3410           
  Branches      464      464           
=======================================
  Hits         3402     3402           
  Misses          5        5           
  Partials        3        3           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@bdraco bdraco marked this pull request as ready for review May 17, 2026 18:54
@bdraco bdraco merged commit 653c385 into python-zeroconf:master May 17, 2026
37 checks passed
@bluetoothbot bluetoothbot deleted the koan/speed-up-async-wait-test branch May 17, 2026 23:00
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.

2 participants