You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a set of tests and they currently run sequentially but what I found was this:
Test 1 checks "did I call X() exactly once" and passes
Test 2 checks "did I call X() exactly once" and fails (the count is 2)
Test 3 checks "did I call X() exactly once" and fails (the count is 3)
The fix was simply to ensure that the invocation count get cleared after each test using ...Invocations.Clear().
But now colleagues want to run the tests in parallel and I'm wondering will each parallel instance get its own invocation counts storage or are the parallel instances going to access a common set of counts with chaos being the result?
The text was updated successfully, but these errors were encountered:
papadeltasierra
changed the title
Will parallel running mess up invocation counts?
Question: Will parallel running mess up invocation counts?
Feb 26, 2025
I have a set of tests and they currently run sequentially but what I found was this:
The fix was simply to ensure that the invocation count get cleared after each test using ...
Invocations.Clear()
.But now colleagues want to run the tests in parallel and I'm wondering will each parallel instance get its own invocation counts storage or are the parallel instances going to access a common set of counts with chaos being the result?
The text was updated successfully, but these errors were encountered: