Closed gabidabet closed 5 days ago
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 85.38%. Comparing base (
22d09c0
) to head (df6a367
). Report is 1 commits behind head on main.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
This seems to resolve the original issue, but I've asked the xunit maintainer who proposed the original workaround to take a look to give their opinion. If we don't hear from them within a week, I'll merge this as-is.
Yeah, this seems like a reasonable way to ensure that there is no dependency on the current thread.
The only suggestion I'll make is to change semaphore.Wait();
into one that waits a limited amount of time (long enough to not give false positives, which can be facilitated by putting the test into a test collection that is marked as non-parallelized), and then failing if the wait did not succeed. This will allow the test to wait and fail if somehow the production code stops behaving appropriately, rather than waiting forever (and requiring a "long running tests" detection pass to determine which test is problematic).
Good suggestion - thanks Brad!
I reckon about 20 seconds should be long enough for our purposes to guard against a "forever wait".
Ok I will add a timeout of 20s.
Pull Request
The issue or feature being addressed
Fixes #2288.
Details on the issue fix or feature implementation
I used a semaphore slim to control the number of parallel tasks that can run.
Confirm the following