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
Drops full-suite runtime from ~85s to ~46s by removing real-time
waits from tests that don't need them on a loopback socket.
- Apply the `quick_timing` fixture to 13 register/announce-heavy
tests so probe/announce intervals shrink from 500ms/225ms/125ms
to 10ms each. The tests pin behaviour, not the RFC 6762 timing
constants, so the production values stay in place for everything
outside the fixture's `with patch.object(...)` block.
- Introduce `_backdate_cache(zc, ms=1100)` in `tests/__init__.py`.
`test_async_updates_from_response` and the inline backdate in
`test_cache_flush_bit` use it to satisfy RFC 6762 §10.2's
"received more than one second ago" check without `time.sleep`.
The helper iterates `store.values()`, not the inner dict
directly — when a record is re-added with an equal hash, the
dict key stays the original object while the value gets the
newer one, so mutating the keys would touch stale objects no
one reads.
- `test_service_browser_expire_callbacks` and `test_reaper` re-add
records via `_async_set_created_ttl(past, 1)` so the expire heap
picks up the new `when`; mutating `record.created` alone leaves
the heap entry pointing at the original future expiration time
and the reaper never wakes the record up.
- `test_service_info_async_request` caps the post-unregister
`async_get_service_info` to 200ms (the service is gone, the
default 3000ms wait is pure overhead) and tightens the
`_is_complete=False` TOCTOU-race loop to 1500ms — enough for
the initial `_LISTENER_TIME + random_delay` (≈220-320ms) plus
margin for the loopback response.
- `test_info_asking_default_is_asking_qm_questions_after_the_first_qu`
drops its forced-loop timeout from 1200ms to 500ms (covers the
QU at t=0 and the QM at t≈_LISTENER_TIME + max random delay).
- `test_register_and_lookup_type_by_uppercase_name` replaces
`time.sleep(1)` with a 50×20ms poll on the cache.
- `test_integration_with_listener_class` drains pending multicast
responses on the registrar instead of sleeping for them, same
pattern as #1701.
All 335 tests still pass and all changed tests are stable across
five back-to-back runs.
0 commit comments