Skip to content

Add failure mode test cases to integration test suite #65

@conradbzura

Description

@conradbzura

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=...), verify TimeoutError is raised
  • Generator cancellation cleanupaclose() 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 — new RoutineShape members or new builder test helpers
  • wool/tests/integration/routines.py — new routines that raise, sleep, or crash
  • wool/tests/integration/test_pool_composition.py — dedicated failure mode tests
  • wool/tests/integration/test_integration.py — new dimension members picked up by pairwise array automatically

Metadata

Metadata

Assignees

No one assigned

    Labels

    testTest coverage or test infrastructure

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions