relay_bridge: await the pump task instead of sleeping 50 ms - #3877
relay_bridge: await the pump task instead of sleeping 50 ms#3877jeff-hykin wants to merge 1 commit into
Conversation
test_pump_dies_visibly_on_encode_error failed on the 3.11 runner while the identical tree passed everywhere else: `sleep(0.05)` then `assert _task.done()` only holds if the pump gets scheduled inside that window, and a loaded runner does not owe us that. Awaiting the task is what the tests actually mean, and it still fails fast because the pump either raises or returns immediately. test_pump_stops_cleanly_on_session_close had the same race.
Greptile SummaryThis change replaces fixed sleeps in relay pump lifecycle tests with bounded awaits of the pump task. The encode-error and clean session-close paths completed as intended in focused runs, ten repeated scheduling runs, and the complete relay WebTransport client test module. Confidence Score: 5/5Safe to merge: the updated lifecycle assertions directly observe the pump task's terminal outcome and passed all exercised paths. Focused testing confirmed that encoding failures propagate as ValueError, session closure completes normally, and later offers are rejected in both cases. Repeated runs showed no timeout, hang, or scheduling flake. Files Needing Attention: No files need further attention.
What T-Rex did
Reviews (1): Last reviewed commit: "relay_bridge: await the pump task instea..." | Re-trigger Greptile |
Codecov Report✅ All modified and coverable lines are covered by tests. @@ Coverage Diff @@
## main #3877 +/- ##
==========================================
- Coverage 77.64% 77.64% -0.01%
==========================================
Files 1323 1323
Lines 125419 125416 -3
Branches 10911 10911
==========================================
- Hits 97384 97377 -7
- Misses 24890 24892 +2
- Partials 3145 3147 +2
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 3 files with indirect coverage changes 🚀 New features to boost your workflow:
|
Fix flakey test