meziantou / Meziantou.Xunit.ParallelTestFramework

Run xUnit test cases in parallel
MIT License
154 stars 6 forks source link

Is the conservative parallelization algorithm newly introduced in xUnit 2.8.0 not respected? #15

Open aomader opened 1 month ago

aomader commented 1 month ago

xUnit 2.8 introduced an additional algorithm to handle the parallelization. That new conservative algorithm can limit the amount of tests (or test collections to be more precise I guess) that are run in parallel. In our use case that is very desirable, since otherwise it used to start all async tests immediately. That change now let's us limit that.

However, to still achieve parallelization within a test collection, we would need this framework here. However, it seems that is not respecting that new conservative algorithm, since it still spawns all tests.

I am not deep into the internals that are adjusted here, so I can not really judge what the issue is exactly.

meziantou commented 1 month ago

I won't implement it myself as I don't have time to spend on this project. However, I would be happy to review a PR if someone wants to implement it.

In our use case that is very desirable, since otherwise it used to start all async tests immediately. That change now let's us limit that.

Even if all tests are run in parallel, you can limit the concurrency. This parameter is respected by this project. The implementation rely on a SynchronizationContext.