[Testing] Speed up unit test suite: slow-first scheduling and long-pole parallelization - #8641
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
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. Comment |
…mpress ALSP and verification test pacing
7fea36a to
c9c39c0
Compare
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned FilesNone |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Speeds up the full unit test suite (
make unittest-main) from ~147s to ~84s median wall time on a 32-core machine, without weakening any assertion (statement coverage verified identical per package before/after).SLOW_TEST_PACKAGES, only applied for the default./...package set; CI per-job package subsets are unaffected).go testschedules packages alphabetically, so the long, internally-sequential packages previously started at ~t+60s and formed a straggler tail that dominated the wall time (147s -> 97s).t.Parallelanywhere): scoring registry unit tests and the 5 subtests ofTestScoreRegistry_SpamRecordWithoutDuplicateMessagesPenalty(5 sequential 5srequire.Neverwindows now overlap), inspector validation ConfigToggle subtests, ledger compactor tests. All verified to have per-test fixtures and no shared state.Deliberately kept serial: 4 scoring registry/decay tests whose score assertions tolerate only ~5-10% deviation, which the continuous spam-penalty decay exceeds under parallel contention (found via
-racestress; parallelism there made them permanently fail, not just slower).Validation:
-racestress runs on all affected packages and repeated 10x full-suite campaigns (10/10 clean).Depends on: #8640
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.