Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[code-infra] Support parallel tests #170

Open
oliviertassinari opened this issue Jun 25, 2024 · 3 comments
Open

[code-infra] Support parallel tests #170

oliviertassinari opened this issue Jun 25, 2024 · 3 comments
Assignees
Labels

Comments

@oliviertassinari
Copy link
Member

oliviertassinari commented Jun 25, 2024

Summary

Our mocha tests run serially which is inefficient and slow. For example in https://github.com/mui/mui-x, https://app.circleci.com/pipelines/github/mui/mui-x/60861/workflows/e2ea2b79-d335-4e79-874b-656570f42f38/jobs/347360/steps tests are way too slow >14 minutes, and only 1/2 of the CPUs available.

We should run these tests in parallel. Mocha doesn't support it mochajs/mocha#4958.

Examples

@Janpot
Copy link
Member

Janpot commented Sep 11, 2024

We're doing a Pilot in X to assess the extent of a migration to vitest. We're sharding in Toolpad, easy to set up, works like a breeze.

cc @JCQuintas

@Janpot Janpot removed the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Sep 11, 2024
@oliviertassinari
Copy link
Member Author

oliviertassinari commented Sep 11, 2024

I wonder if it wouldn't be easier to first speed up the tests. Maybe we do a lot of repetitive work between each test that we shouldn't. I recall that with Sebastian, when we moved from shallow tests to react testing library, we found a couple of perf issues in jsdom and testing-library selectors.

@JCQuintas
Copy link
Member

Hum, for X we might be better off just moving to vitest first, then optimising.

My current approach is to try to do only slim modifications of @mui/internal-test-utils so that it works for both vitest(jsdom&browser) and mocha/karma.

Which should allow us to move into vitest package by package.

You can follow the prs here:
mui/mui-x#14508
mui/material-ui#43625

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants