Skip to content
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

Multiple threads configing db context issue #77

Open
dazinator opened this issue May 3, 2022 · 0 comments
Open

Multiple threads configing db context issue #77

dazinator opened this issue May 3, 2022 · 0 comments
Labels

Comments

@dazinator
Copy link
Owner

When unit testing, multiple tests can run in parallel.
One test might be configuring a DbContext and another might be using a different instance of the same DbContext type to SaveChanges()

When this happens at the moment, there is an exception, because DbContext's inheriting from multitenant db context, have a static collection of callbacks, that gets modified on OnConfigure() and enumerated in SaveChanges.

@dazinator dazinator added the bug label May 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant