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(protocols): the #1889 swallowed-raise test can see the deadline arrive without the swallow #1897
tests/protocols/test_option_generator_deadline_scale_1428_unit.py::GeneratorDeadlineScaleTests::test_a_raise_that_never_reaches_the_body_is_repeated failed on main. It ran in the Python 3.13 job (117434732389) of Unit Tests run 39038572601, for d14a1b9, under xdist worker gw3:
> self.assertEqual(spin.swallowed, 1)
E AssertionError: 0 != 1
tests/protocols/test_option_generator_deadline_scale_1428_unit.py:256
The test arrived with #1891 (#1889). _Spin(swallow=1) should drop the first TimeoutError and let the repeat through. Here swallowed stayed 0: the test still came out interrupted, but no raise was dropped first. The cause is not yet known. The rest of that job passed (4440 tests), and the test passes locally, so it is intermittent. A flaky blocking test turns any PR red at random.
Fix: find why the first deadline can arrive without passing through the swallow path, and make the test deterministic. The fix must not weaken the assertion that a dropped raise is followed by another. Add a test that forces the interleaving, and check that it fails without the fix.
Activity
test(protocols): keep the #1889 spin's first raise inside its try (#1897
test(protocols): keep the #1889 spin's first raise inside its try (#1897