core-agent-ide/codex-rs/mcp-server/tests/common
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
..
BUILD.bazel feat: add support for building with Bazel (#8875) 2026-01-09 11:09:43 -08:00
Cargo.toml feat: replace custom mcp-types crate with equivalents from rmcp (#10349) 2026-02-02 17:41:55 -08:00
lib.rs chore: nuke chat/completions API (#10157) 2026-02-03 11:31:57 +00:00
mcp_process.rs test: deflake nextest child-process leak in MCP harnesses (#11263) 2026-02-10 03:43:24 +00:00
mock_model_server.rs chore: nuke chat/completions API (#10157) 2026-02-03 11:31:57 +00:00
responses.rs chore: nuke chat/completions API (#10157) 2026-02-03 11:31:57 +00:00