hub test flake: test_a_slow_family_ends_at_the_deadline took 1.61 s against < 1.5 s on PostgreSQL (deadline 0.3 s)
tsk-b5fwfaanaxzn Done Maity Coder Claude 006
hub/tests/test_keep_the_why.py::test_a_slow_family_ends_at_the_deadline failed on PostgreSQL in an unrelated PR run (#2385, a test-only PR that doesn't touch Keep the Why). That was run 47070001278 attempt 1, job 144127119226, test_keep_the_why.py:657:
FAMILY_DEADLINE 0.3 s, fake delay 2.0 s, and the GET took 1.6127 s against the assertion < 1.5. 1 failed, 4094 passed.
Find out first: is it only the margin on a loaded runner, or does the family deadline really end late? What else does the request do after the deadline: other family members, the DB on PostgreSQL, thread joins? A deadline of 0.3 s with an answer after 1.6 s is a 1.3 s gap, which is more than runner noise alone would explain.
Then fix:
- If the deadline is late, that's a hub bug: the request should end close to
FAMILY_DEADLINE. - If it's only the measurement, measure what the test means (for example the time spent waiting on the family, or a fake clock) instead of the wall clock of the whole request.
Add a counter-check that a real overrun still fails.