Skip to content

feat(e2e): add 10s timeout for test steps#103

Merged
branchseer merged 2 commits intomainfrom
01-14-e2e_timeout_support
Jan 14, 2026
Merged

feat(e2e): add 10s timeout for test steps#103
branchseer merged 2 commits intomainfrom
01-14-e2e_timeout_support

Conversation

@branchseer
Copy link
Member

Add timeout support for e2e snapshot tests to prevent hanging tests:

  • Convert test harness to async using tokio runtime
  • Each step has a 10-second timeout
  • When timeout occurs:
    • Kill the child process
    • Mark step with [timeout] instead of exit code
    • Capture partial stdout/stderr before timeout
    • Skip remaining steps in the test case
  • Uses concurrent I/O to read stdout/stderr while waiting

Co-Authored-By: Claude Opus 4.5 noreply@anthropic.com

Copy link
Member Author

branchseer commented Jan 13, 2026

This stack of pull requests is managed by Graphite. Learn more about stacking.

@branchseer branchseer marked this pull request as ready for review January 13, 2026 21:26
@branchseer branchseer marked this pull request as draft January 13, 2026 21:28
@branchseer branchseer force-pushed the 01-14-e2e_timeout_support branch from 292e8ee to bf60d66 Compare January 14, 2026 03:59
branchseer and others added 2 commits January 14, 2026 22:38
Add timeout support for e2e snapshot tests to prevent hanging tests:

- Convert test harness to async using tokio runtime
- Each step has a 10-second timeout
- When timeout occurs:
  - Kill the child process
  - Mark step with [timeout] instead of exit code
  - Capture partial stdout/stderr before timeout
  - Skip remaining steps in the test case
- Uses concurrent I/O to read stdout/stderr while waiting

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Replace separate `timed_out` and `exit_status` variables with a unified
`TerminationState` enum that better represents the three possible states:
- Running (implicitly `None`)
- Exited with status
- Timed out

Benefits:
- Eliminates impossible state combinations
- More idiomatic Rust with pattern matching
- Clearer intent and better type safety
- Loop now returns the termination state directly

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@branchseer branchseer force-pushed the 01-14-e2e_timeout_support branch from bf60d66 to c5690c9 Compare January 14, 2026 14:54
@branchseer branchseer marked this pull request as ready for review January 14, 2026 14:55
@branchseer branchseer requested a review from fengmk2 January 14, 2026 14:58
@branchseer branchseer merged commit f17aab2 into main Jan 14, 2026
7 checks passed
@branchseer branchseer deleted the 01-14-e2e_timeout_support branch January 14, 2026 15:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants