Fix unbound `timeout` under non-trio/MTF backends
`test_nested_multierrors`'s backend/depth budget `match` only carries arms for the `trio` + `main_thread_forkserver` spawn backends, so running under any other (e.g. `mp_spawn`) leaves `timeout` unbound and crashes with an `UnboundLocalError` at the headroom-scaling below. Add default per-depth arms riding the MTF budgets (same per-spawn round-trip cost class). (this patch was generated in some part by [`claude-code`][claude-code-gh]) [claude-code-gh]: https://github.com/anthropics/claude-codedrop_ria_nursery
parent
d01a21239c
commit
697c6152a6
|
|
@ -647,6 +647,14 @@ async def test_nested_multierrors(
|
|||
timeout = 16
|
||||
case ('main_thread_forkserver', 3):
|
||||
timeout = 30
|
||||
# any other fork-based backend (`mp_spawn` et al) pays
|
||||
# the same per-spawn round-trip costs as MTF so rides
|
||||
# its budgets; without a default arm `timeout` is left
|
||||
# unbound -> `UnboundLocalError` at the scaling below.
|
||||
case (_, 1):
|
||||
timeout = 16
|
||||
case (_, 3):
|
||||
timeout = 30
|
||||
|
||||
# inflate the budget by the throttle headroom probed above so
|
||||
# a slow box doesn't masquerade as a deadline regression.
|
||||
|
|
|
|||
Loading…
Reference in New Issue