-
Notifications
You must be signed in to change notification settings - Fork 1
Add failure mode test cases to integration test suite #65
Description
Summary
Extend the integration test suite (#58) with test cases covering anticipated failure modes. The current suite validates happy-path dispatch across all dimension combinations but does not exercise error handling, recovery, or cleanup across real process boundaries.
Add the following failure mode coverage:
- Exception propagation — a routine raises an exception inside the worker; verify the correct exception type and message arrive intact on the client side
- Dispatch timeout expiry — a slow routine exceeds
RuntimeContext(dispatch_timeout=...), verifyTimeoutErroris raised - Generator cancellation cleanup —
aclose()on a remote async generator properly cancels the worker-side task without leaking resources - Worker crash mid-dispatch — the worker process dies during task execution; verify the load balancer removes the dead worker and raises an appropriate error
These SHOULD be implemented as new members of the existing RoutineShape dimension (e.g., COROUTINE_RAISES, COROUTINE_TIMEOUT) or as dedicated test cases in test_pool_composition.py — not as new dimensions. Follow the guidance in llms/skills/test.md section 6: prefer extending existing dimensions over adding new ones.
Motivation
Happy-path integration tests prove the plumbing works. Failure mode tests prove the error handling works across that same plumbing. Exception serialization, timeout propagation, and cancellation cleanup all cross process and network boundaries where unit test mocks can mask real issues — as demonstrated by the three bugs (#60, #61, #62) discovered while building the happy-path suite.
Affected code
wool/tests/integration/conftest.py— newRoutineShapemembers or new builder test helperswool/tests/integration/routines.py— new routines that raise, sleep, or crashwool/tests/integration/test_pool_composition.py— dedicated failure mode testswool/tests/integration/test_integration.py— new dimension members picked up by pairwise array automatically