Skip to content

test: bound all-crate spawners and add a hang backstop to nextest#76

Merged
rickcrawford merged 1 commit into
mainfrom
rickcrawford/wor-1405-broaden-nextest-bound
Jun 19, 2026
Merged

test: bound all-crate spawners and add a hang backstop to nextest#76
rickcrawford merged 1 commit into
mainfrom
rickcrawford/wor-1405-broaden-nextest-bound

Conversation

@rickcrawford

Copy link
Copy Markdown
Contributor

Problem

The stdio-spawners test group caps how many process-spawning integration
tests run at once, so the swarm of /bin/sh and mcptest-child round-trip
tests cannot oversubscribe the CPU and starve each other into a hung full local
cargo nextest run. But the override only matched package(mcptest) & kind(test),
leaving the child-spawners in other crates unbounded:

  • mcptest-core: stdio_transport_integration, auto_discover_doctor_corpus
  • mcptest-agent: the agent end-to-end suites

Those residual spawners could still co-saturate the cores on a full-workspace run.

Change

  • Broaden the group filter from package(mcptest) & kind(test) to kind(test),
    so every workspace integration test is bounded. Scoping by kind alone is robust
    (no per-crate or per-test list to drift as suites are added) and correct (unit
    tests, kind lib/bin, stay fully parallel).
  • Add a slow-timeout backstop (period = 60s, terminate-after = 3). The
    failure mode this file guards against turns a starved test into an indefinite
    hang that freezes the whole run with no output. The backstop guarantees the run
    always terminates: a genuine hang becomes a 180s timeout-failure that names the
    test, instead of an infinite freeze. No default-feature test approaches 60s, so
    a healthy run never trips it. Profiles inherit unset settings from default, so
    the ci profile gets the same guard.

Config-only and non-regressing: it only lowers concurrency for integration tests
and adds a generous per-test timeout, so it cannot break a suite that already
passes.

…R-1405)

The stdio-spawners group only bounded `package(mcptest)` integration tests, but
mcptest-core (stdio_transport_integration, auto_discover_doctor_corpus) and
mcptest-agent (the agent end-to-end suites) fork child processes too, so a full
local `cargo nextest run --workspace` could still oversubscribe the CPU and hang.
Broaden the group filter from `package(mcptest) & kind(test)` to `kind(test)` so
every workspace integration test is bounded, with no per-crate or per-test list
to drift as suites are added.

Add a slow-timeout backstop (period 60s, terminate-after 3) so the run always
terminates: a genuine hang becomes a 180s timeout-failure naming the test instead
of an indefinite freeze. No default-feature test approaches 60s, so a healthy run
never trips it; profiles inherit it, so ci gets the same guard.

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@rickcrawford rickcrawford merged commit b67f7ae into main Jun 19, 2026
17 checks passed
@rickcrawford rickcrawford deleted the rickcrawford/wor-1405-broaden-nextest-bound branch June 19, 2026 00:15
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.

1 participant