Skip to content

Another FillerManager race condition #143

@kyleestes

Description

@kyleestes

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions