Skip to content

tests: harden parallel test execution - #967

Draft
yisding wants to merge 1 commit into
mainfrom
agent/pytest-xdist-cleanup
Draft

tests: harden parallel test execution#967
yisding wants to merge 1 commit into
mainfrom
agent/pytest-xdist-cleanup

Conversation

@yisding

@yisding yisding commented Aug 7, 2026

Copy link
Copy Markdown
Owner

What changed

  • cap -n auto at 8 workers and use per-test load scheduling in socket-free quick and coverage lanes
  • run direct-fork tests in an explicit serial slice without xdist or watchdog helper threads
  • avoid creating pytest-asyncio runners for synchronous tests while retaining async task leak checks
  • consolidate five cold mypy consumer checks into one downstream type-contract test
  • join a test-owned thread and update CI, documentation, validation selectors, and policy guards

Why

The suite mixed xdist workers, direct os.fork() calls, a global async autouse fixture on synchronous tests, and several repeated cold mypy processes. That combination created deadlock risk, noisy teardown behavior, uneven scheduling, and redundant work.

Impact

The quick lane remains broad while excluding process-global and xdist-unsafe tests. Static typing assertions are preserved in one dedicated CI step. The final local quick run completed in 2:44, compared with 3:51 before separating slow and serial work.

Validation

  • quick xdist lane: 8,216 passed, 174 skipped
  • serial direct-fork slice: 5 passed
  • consolidated downstream type contracts: passed
  • focused policy and docs guards: 93 passed
  • full pre-commit suite: passed
  • mypy for src/easycat: passed

@coderabbitai

coderabbitai Bot commented Aug 7, 2026

Copy link
Copy Markdown

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 51cb9218-bbb5-4bc3-80a4-e7f7e9a45119

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

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