Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

Parallel acceleration on startup (constant/liner/exponential/etc...) #2105

Closed
shlomiassaf opened this issue Mar 17, 2025 · 2 comments
Closed

Comments

@shlomiassaf
Copy link

shlomiassaf commented Mar 17, 2025

First of, thank you guys for this amazing framework.

This is, I believe, the holy grail of testing framework for DotNet!

You get native implementation for virtually any need, not even mentioning the speed gain from code gen and the debugging goodies.


To my point, I was wondering if it's possible to allow accelerated parallel initialization.

Let's say I start with a limit of 20 parallel runs.
They all start at the same time, which in some cases creates a big load on the system as a lot of things might happen at start, regardless of the shared initialization setup like DB, broker etc...

If the startup for each parallel run has a random wait jitter this will most likely help with the load.

This wait is done once per thread, or parallel execution unit, however you frame it.
It's not a wait per test.

I have 445 tests, when I run with parallel limit 20 I get failures on the first tests
They saldom pass, and when they do, the entire suite pass.

It might be that I need to add some protections for multi-threading, though I doubt it.
With that said, that code which fail is on startup which is never executed multithreaded and not intended to, as most code is.

Hopefuly you can consider this one, if it's doable and not managed by the MS testing platform

@shlomiassaf shlomiassaf changed the title Linear parallel acceleration on startup Parallel acceleration on startup (constant/liner/exponential/etc...) Mar 17, 2025
@thomhurst
Copy link
Owner

Hmm.. this would be quite complicated to build I think.

How do you see the API looking?

@shlomiassaf
Copy link
Author

shlomiassaf commented Mar 18, 2025

It a configuration.
I wouldn't go crazy at first, simple constant time strategy will suffice.

Altough, I wouldn't bother.
The issues are resolved.
It appears that the XUnit migration was 99%, some FluentAssertions left-overs caused the issue.

replaced with Assert.Then and 100%

I gotta say, this is impressive in so many ways!
People fought in the tranches making things work in testing.

I have no doubt, this will be the de-facto framework for unit testing.

@thomhurst thomhurst pinned this issue Mar 19, 2025
@thomhurst thomhurst unpinned this issue Mar 19, 2025
@thomhurst thomhurst pinned this issue Mar 19, 2025
@thomhurst thomhurst unpinned this issue Mar 19, 2025
Repository owner locked and limited conversation to collaborators Mar 19, 2025
@thomhurst thomhurst converted this issue into discussion #2123 Mar 19, 2025

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants