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

Another FillerManager race condition #143

Open
kyleestes opened this issue Nov 21, 2018 · 0 comments
Open

Another FillerManager race condition #143

kyleestes opened this issue Nov 21, 2018 · 0 comments

Comments

@kyleestes
Copy link

kyleestes commented Nov 21, 2018

I see there are other race-condition-related issues logged, and that the dev team is aware of the broader concurrency issue(s). However, I thought it might be helpful to share this call stack.

System.InvalidOperationException : Collection was modified; enumeration operation may not execute.
   at System.Collections.Generic.Dictionary`2.ValueCollection.Enumerator.MoveNext()
   at GenFu.FillerManager.GetMatchingPropertyFiller(PropertyInfo propertyInfo, IDictionary`2 propertyFillers) in C:\GenFu\src\GenFu\FillerManager.cs:line 238
   at GenFu.FillerManager.GetFiller(PropertyInfo propertyInfo) in C:\GenFu\src\GenFu\FillerManager.cs:line 155
   at GenFu.GenFu.SetPropertyValue(Object instance, PropertyInfo property) in C:\GenFu\src\GenFu\GenFu.cs:line 114
   at GenFu.GenFu.New(Object instance) in C:\GenFu\src\GenFu\GenFu.cs:line 59
   at GenFu.GenFu.New(Type type) in C:\GenFu\src\GenFu\GenFu.cs:line 35
   at GenFu.GenFu.New[T]() in C:\GenFu\src\GenFu\GenFu.cs:line 29

We use xUnit and tests had been running in parallel. I disabled that behavior with a simple xunit.runner.json file containing:

{
  "parallelizeTestCollections": false
}

And everything works, albeit just a touch slower.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant