Skip to content

Run slow test suites in parallel#26523

Draft
CraigMacomber wants to merge 1 commit intomicrosoft:mainfrom
CraigMacomber:parallelTests
Draft

Run slow test suites in parallel#26523
CraigMacomber wants to merge 1 commit intomicrosoft:mainfrom
CraigMacomber:parallelTests

Conversation

@CraigMacomber
Copy link
Contributor

@CraigMacomber CraigMacomber commented Feb 24, 2026

Description

Make the two slowest test suites run tests in parallel for faster CI times.

Since these two suites take much longer than the others, splitting them up for aprallel running should better utalize the CPU time on CI after the other test suites have finished.

The job count is kept somehat low (at 4) since to avoid way too many processes and memory use when CI runs multiple suites in parallel.

Local testing showed:

For merge-tree:

real 7m6.237s
user 9m21.428s
sys 0m7.807s

to

real 2m47.996s
user 9m43.899s
sys 0m4.306s

For end-to-end:

real 8m8.765s
user 4m21.356s
sys 0m17.529s

to

real 2m3.571s
user 6m21.392s
sys 0m42.993s

Reviewer Guidance

The review process is outlined on this wiki page.

Copilot AI review requested due to automatic review settings February 24, 2026 00:29
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request enables parallel test execution for two of the slowest test suites in the repository to improve CI performance. The changes configure Mocha to run tests in parallel mode with 4 worker processes for both the end-to-end tests and the merge-tree DDS tests.

Changes:

  • Enable parallel test execution with 4 jobs for the end-to-end test suite
  • Enable parallel test execution with 4 jobs for the merge-tree test suite

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
packages/test/test-end-to-end-tests/src/test/.mocharc.cjs Adds parallel execution configuration with 4 jobs to the end-to-end test suite
packages/dds/merge-tree/.mocharc.cjs Adds parallel execution configuration with 4 jobs to the merge-tree test suite

Comment on lines +60 to +61
config.parallel = true;
config.jobs = 4;
Copy link

Copilot AI Feb 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Enabling parallel mode for tests that already require the exit flag (line 14) due to cleanup issues may lead to unexpected behavior. The exit flag indicates tests don't clean up properly, which could cause issues when running in parallel workers. Consider testing thoroughly to ensure parallel execution doesn't exacerbate existing cleanup problems or cause test flakiness. In Mocha's parallel mode, each test file runs in a separate worker process, which may help isolate issues but could also mask cleanup problems that would affect subsequent tests in serial execution.

Suggested change
config.parallel = true;
config.jobs = 4;
// Do not enable Mocha parallel mode here: this suite currently requires --exit due to cleanup issues,
// and tests are known to leak memory. Running in parallel could hide or exacerbate these problems.

Copilot uses AI. Check for mistakes.
@CraigMacomber CraigMacomber marked this pull request as draft February 24, 2026 00:34
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.

2 participants