We have a NUnit test project with 1000 tests or so. The project contains a high-level component test primarily for the WPF user control. The testing process often fails on our build server (TeamCity) with:
InvalidOperationException "LocalDataStoreSlot local storage has been freed"
mscorlib.dll! System.LocalDataStore.GetData (slot System.LocalDataStoreSlot)
mscorlib.dll! System.Threading.Thread.GetData (slot System.LocalDataStoreSlot)
WindowsBase.dll! System.Windows.Interop.ComponentDispatcher.CurrentThreadData.get () ...
Tests contain the attributes [RequiresSTA], Window.Show (), Dispatcher, etc., so it is definitely not a regular unit test project.
The error looks completely random, we have a version where it occurs with a probability of 80%, but most of the time this does not happen at all. Absolutely cryptic, sometimes simple changes in production code, such as changing styles in xaml code, start to fail, then the next change in production code fixes it.
This random accidental failure makes our development team very upset, our advanced build system is seriously complicated by this failure.
We could very rarely play it locally, starting the project with nunit-console.exe.
Have you ever seen such a failure of the testing process? Any tips on how to solve this problem would be much appreciated.
thanks
source share