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
{{ message }}
Repository navigation
test_cancellation_propagates_cleanly synchronizes on a sleep #187
tests/test_client_stream.py::test_cancellation_propagates_cleanly uses time to synchronize. It starts consume(), sleeps 10 ms on the assumption that body consumption has begun, then cancels, relying on the body's asyncio.sleep(1.0) still running.
If the process stalls for more than 1 s at that point, the body finishes, consume() returns normally and pytest.raises(asyncio.CancelledError) fails with DID NOT RAISE. If consumption has not begun when the cancel lands, the test still passes but no longer covers cancellation in the middle of the body.
Follow-up to #185, which fixed the same pattern in the bulkhead tests.
Activity