Replacement instead of update when executing unit tests in parallel
antoinebj opened this issue · 1 comments
When I create my mapper configuration twice in parallel, this library fails to operate properly.
I have unit tests that check that existing instances in collections are updated instead of replaced. Those unit tests create the mappers from scratch. If I run them in parallel, they fail. If I run them sequentially, they succeed.
That gave me suspicion of static data in AutoMapper.Collection, and my suspicions were quickly confirmed when looking at the source code, as there are quite a few of these. I currently do not have enough time to investigate what exactly could be the culprit among all those static fields, and maybe I'm following a false lead.
Is making multiple mapping configurations a scenario that is supposed to be supported by AutoMapper.Collection?