litellm/tests/unit/proxy/rust_forward/supervisor
yuneng-jiang cdcece4d32
test(proxy): make the cancelled supervisor test deterministic (#51258)
The test spawned a real Python child that installs a SIGTERM handler, slept
0.3s, then cancelled the supervisor and expected the child to exit 0. CI runs
with --cov, and pytest-cov starts coverage in every spawned Python process,
so the child is often still starting when SIGTERM lands and dies with -15.

open_children now takes the process spawner the same way it takes the
platform, and only needs the platform to signal and stop children. The test
uses a fake child whose wait() blocks on an event and a fake platform that
records stop_group, so it checks the shielded stop-then-wait with no real
process and no sleep. It also checks the child is still being waited on,
because anyio's wait_all_tasks_blocked on asyncio can return one loop tick
before a task group finishes.
2026-11-11 15:48:02 -08:00
..
__init__.py
_support.py
test_children.py
test_lifecycle.py
test_preflight.py
test_runtime.py test(proxy): make the cancelled supervisor test deterministic (#51258) 2026-11-11 15:48:02 -08:00