replaysMike / NUnit.Commander

A wrapper for running NUnit tests using NUnit-Console or dotnet test with real-time updates

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Intermittent Exception thrown after pressing 'Q' to stop execution

julealgon opened this issue · comments

I encountered this bug today after running NUnit.Commander and manually stopping it several dozen times during the day. It happened only once:

Analyzing...
Commander encountered an unhandled exception: Collection was modified; enumeration operation may not execute. Stack Trace: at System.Collections.Generic.List1.Enumerator.MoveNextRare() at System.Linq.Enumerable.SelectManySingleSelectorIterator2.MoveNext()
at System.Linq.Enumerable.SelectManySingleSelectorIterator2.MoveNext() at System.Linq.Enumerable.Any[TSource](IEnumerable1 source, Func2 predicate) at NUnit.Commander.Analysis.TestHistoryAnalyzer.Analyze(IEnumerable1 currentRun)
at NUnit.Commander.Program.RunLogFriendly(Options options, ApplicationConfiguration configuration, ColorScheme colorScheme, Int32 runNumber, RunContext runContext)

After this error, the application shut down abruptly and I did not get a summary displayed.

It appears that there might be some sort of thread safety issue while cancelling execution.