-
Notifications
You must be signed in to change notification settings - Fork 268
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
Intermittent ArgumentNullException thrown in AutoTaskProvider #600
Comments
@brianfeucht Thank you for reporting the issue. After a quick look, I think it's a multithreading issue. Can you please confirm that you configure substitutes in multiple threads? We have a note for multithreading https://nsubstitute.github.io/help/threading/ I would also link some relevant issues and discussions #260 |
As for internals, here's a relevant commit that changes AutoValueProviders 6087233 The initialization is Lazy and set to from the docs
@zvirja Can we remove |
@alexandrnikitin Thank you for the documentation. We are running most our tests in parallel via NUnit Console Runner. I'll be sure to audit the places we are seeing the exception bubble up to make sure we are configuring NSubstitute outside of test execution to avoid issues. FWIW this is the only case we have run into issues with threading. It seems like that |
Describe the bug
I am seeing an intermittent ArgumentNullException thrown by the AutoTaskProvider in our test suite. The error moves around in our test suite, but it always has the same stacktrace:
This behavior started after updating NSubstitute from
3.1.0
to4.2.1
The text was updated successfully, but these errors were encountered: