<Message>System.InvalidOperationException : Collection was modified; enumeration operation may not execute.</Message>
<StackTrace> at System.ThrowHelper.ThrowInvalidOperationException_InvalidOperation_EnumFailedVersion()
at System.Collections.Generic.List`1.Enumerator.MoveNextRare()
at System.Linq.Enumerable.<OfTypeIterator>d__32`1.MoveNext()
at System.Linq.Enumerable.Any[TSource](IEnumerable`1 source)
at Peaky.ApplicationBuilderExtensions.UsePeaky(IApplicationBuilder app)
at MLS.Orchestrator.Startup.Configure(IApplicationBuilder app, IApplicationLifetime lifetime, IServiceProvider serviceProvider, IAntiforgery antiforgery, ILoggerFactory loggerFactory) in /home/tyoverby/workspace/trydotnet/orchestrator/MLS.Orchestrator/Startup.cs:line 242
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at Microsoft.AspNetCore.Hosting.ConventionBasedStartup.Configure(IApplicationBuilder app)
at Microsoft.Extensions.DependencyInjection.IServiceCollectionExtensions.InjectApiVersionRoutePolicy.<>c__DisplayClass2_0.<Configure>b__0(IApplicationBuilder app)
at Microsoft.AspNetCore.Hosting.Internal.AutoRequestServicesStartupFilter.<>c__DisplayClass0_0.<Configure>b__0(IApplicationBuilder builder)
at Microsoft.AspNetCore.Hosting.Internal.WebHost.BuildApplication()
at Microsoft.AspNetCore.Hosting.WebHostBuilder.Build()
at Microsoft.AspNetCore.TestHost.TestServer..ctor(IWebHostBuilder builder, IFeatureCollection featureCollection)
at MLS.Orchestrator.Tests.OrchestratorService.CreateTestServer(Action`1 configureServices, Action`1[] agents) in /home/tyoverby/workspace/trydotnet/orchestrator/MLS.Orchestrator.Tests/OrchestratorService.cs:line 46
at MLS.Orchestrator.Tests.OrchestratorService..ctor(Action`1 configureServices, Action`1[] agents) in /home/tyoverby/workspace/trydotnet/orchestrator/MLS.Orchestrator.Tests/OrchestratorService.cs:line 35
at MLS.Orchestrator.Tests.OrchestratorService..ctor(Action`1[] agents) in /home/tyoverby/workspace/trydotnet/orchestrator/MLS.Orchestrator.Tests/OrchestratorService.cs:line 29
at MLS.Orchestrator.Tests.WorkspaceController_Specs.<Compile_with_a_null_snippet_returns_bad_request>d__0.MoveNext() in /home/tyoverby/workspace/trydotnet/orchestrator/MLS.Orchestrator.Tests/Workspace_Controller_Specs.cs:line 14
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()</StackTrace>
</ErrorInfo>
</Output>
Found while parallelizing tests:
Workaround: don't use this method in unit tests.