Skip to content

Document fewer test threads for short-deadline tests on busy hosts - #1473

Merged
JacobStephens2 merged 1 commit into
mainfrom
issue-1472
Oct 27, 2026
Merged

JacobStephens2 merged 1 commit into
mainfrom
issue-1472

Conversation

@JacobStephens2

Copy link
Copy Markdown
Owner

Summary

Adds a note to docs/testing.md. Some tests give a Trial, grader or Harness a deadline of a second or less, so on a busy many-core host they can fail when every test runs at once. If they pass alone, rerun with fewer threads.

 The full Rust suite uses `cargo nextest run` ...
 For a focused iteration, use `cargo test --bin thirdshift <module>::tests` ...
+Some tests give a Trial, grader or Harness a deadline of a second or less ...
+rerun with fewer threads, for example `cargo test -- --test-threads=3`
+or `cargo nextest run --test-threads 3`.

Closes #1472. This is option 1 from the issue: no change to tests or production code.

Evidence

Measured on an 18-core Mac running macOS 26:

  • cargo test --test experiments, default 18 threads: 81 passed, 3 failed. All three failures were 1s-timeout tests.
    cargo test --test experiments -- --test-threads=3: 84 passed.
  • cargo test --bin thirdshift, default 18 threads: 4 failed. Three of them (ended_trial_sessions_drop_caches_..., interruption_during_read_backoff_..., parent_only_interruption_stops_active_github) each pass when run alone.
    cargo test --bin thirdshift -- --test-threads=3: 1530 passed, 1 failed.
  • Fewer threads don't fix one test: session::private::tests::auxiliary_keeps_its_pinned_trial_invocation_caps_deadline_and_artifacts. It has a 200ms Harness deadline and still failed as part of a 3-thread suite, at src/session/private/tests.rs:394, because harness-arguments was missing. It passed 4 of 4 times run alone, and CI passes it. It's reported separately; this PR doesn't claim to fix it.

Merge Danger

Door: two-way

Blast Radius: docs

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.

Experiment tests with 1s Trial timeouts fail under heavy local load on macOS

1 participant