core-agent-ide/codex-rs/mcp-server/tests
Josh McKinney de59e550c0
test: deflake nextest child-process leak in MCP harnesses (#11263)
## Summary
- add deterministic child-process cleanup to both test `McpProcess`
helpers
- keep Tokio `kill_on_drop(true)` but also reap via bounded `try_wait()`
polling in `Drop`
- document the failure mode and why this avoids nondeterministic `LEAK`
flakes

## Why
`cargo nextest` leak detection can intermittently report `LEAK` when a
spawned server outlives test teardown, making CI flaky.

## Testing
- `just fmt`
- `cargo test -p codex-app-server`
- `cargo test -p codex-mcp-server`


## Failing CI Reference
- Original failing job:
https://github.com/openai/codex/actions/runs/21845226299/job/63039443593?pr=11245
2026-02-10 03:43:24 +00:00
..
common test: deflake nextest child-process leak in MCP harnesses (#11263) 2026-02-10 03:43:24 +00:00
suite Fix flaky windows CI test (#10993) 2026-02-07 08:55:42 -08:00
all.rs test: faster test execution in codex-core (#2633) 2025-08-24 11:10:53 -07:00