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

Running tests in parallel slower compared to running individual tests. #2920

Open
JiaZhenLin opened this issue Apr 30, 2024 · 5 comments
Open

Comments

@JiaZhenLin
Copy link

JiaZhenLin commented Apr 30, 2024

For ex,I have 2000 tests,And my computer has 8 core,and run 8 tests in parallel.then each test maybe take 2s,if i run individual,it maybe take 1s for each test.If me sometings wronging?How can I speed up the tests in parallel?

@bradwilson
Copy link
Member

It would be helpful if you could provide some examples of the kinds of test that are slow, maybe even a repro project.

@TylerBrinkley
Copy link

It might be related but we just upgraded to xunit 2.8.0 from 2.7.0 and our the test duration nearly doubled and we use a lot of parallelization.

@bradwilson
Copy link
Member

@TylerBrinkley Have you tried reverting back to the pre-2.8 parallelization algorithm?

The release notes mentioned the new algorithm:

image

For more information, see the docs page: https://xunit.net/docs/running-tests-in-parallel#algorithms

@TylerBrinkley
Copy link

Thanks @bradwilson. I changed the parallelAlgorithm from the new default of conservative to aggressive and the tests are running as quick as they were before. Thanks!

@bradwilson
Copy link
Member

@JiaZhenLin Does my answer to Tyler help you resolve your issue?

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

No branches or pull requests

3 participants