You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
test: speed up slow loopback tests via quick_timing fixture and shorter timeouts
Cuts ~28s from the top-20 durations sum (was 70s, now 42s) without
changing what the tests assert.
- Add quick_timing fixture (introduced for the same purpose in
conftest) to register/announce-heavy tests in test_asyncio.py,
test_services.py, test_handlers.py, and test_init.py. The fixture
shortens _CHECK_TIME/_REGISTER_TIME/_UNREGISTER_TIME to 10ms on
loopback so the probe/announce/goodbye cycle no longer pays the
RFC 6762 production budget.
- Drop ZeroconfServiceTypes.find timeouts from 2s to 0.5s in
test_types.py and test_async_zeroconf_service_types — find()
sleeps the full timeout, and on loopback the response arrives in
milliseconds.
- Tighten the explicit TOCTOU wait in test_service_info_async_request
from 3000ms to 500ms; _is_complete=False forces the request to run
out the full timeout regardless.
- Cut the 'allow multicast timers to expire' sleep in
test_integration_with_listener_class from 3s to 0.5s now that
quick_timing makes the preceding broadcasts settle in <100ms.
- Shorten the duplicate-update negative-assertion wait in
TestServiceBrowser.test_update_record from wait_time=3 to 0.3s —
the listener is asserted NOT to fire, so the wait always times
out.
0 commit comments