feat: Added Async overload of WaitForHelpers#892
Conversation
src/bunit.core/Extensions/WaitForHelpers/RenderedFragmentWaitForHelperExtensions.cs
Outdated
Show resolved
Hide resolved
|
Uhh I still think it's very verbose with those long names. I do think await cut.AssertionAsync();
cut.WaitForAssertion()Both code lines contain the word "wait". The thing is though, the name isn't telling the truth thought, we're not a awaiting an async assertion. The assertion is not async. |
For now we also could make the |
Good idea. Let's make this internal for now. |
Said and done! I am very inclined to say on Edit 1: In general I would like to expose more of the async nature of Blazor to the public surface. I don't think we do ourselves a big favour with all the Edit 2: By the way with only the change of |
|
I agree. Been battling too many edge cases in the name of simplicity. But that's for V2 🙂 |
egil
left a comment
There was a problem hiding this comment.
Looks good to me.
Does it make sense to keep the sync versions of the tests around as well as the new async versions?
This would allow us to see if the async versions are indeed more stable over time, I think.
Correct me if I am wrong, but what you want to see with that, ist that the Async version isn’t failing where as the sync version will be failing from time to time(behavior as off now)? if so I am not sure if we would see that picture even if Async makes it more stable. The reason might be that thread starvation is still a thing. Besides all the tests in |
I think it would be worthwhile to have both test sets around for a while to get an indication of the effectiveness of the change. We could simply have to calls to |
Yes it does, so let’s do it! |
|
It would also be awesome to create async versions of the RenderFragmentWaitForHelperExtensionsTest tests too. |
Yeah did so. Basically worked with I also introduced a new step to separate sync/async in our CI/CD pipeline. Edit: I am running always all the tests in both cases, so we can see if other tests cause issues as well. I do think if we run sync or async in isolation, we don't have the full picture. |
|
Awesome. Good work on this. |
bbb4409 to
036ad6e
Compare
|
Sorry there is a merge conflict, will resolve it in a minute. |
This PR would add asynchronous versions of the
WaitFor-helper methods. This is Part 2 to makeWaitFormore stable.This PR targets not
mainon purpose!