WireMock.Net icon indicating copy to clipboard operation
WireMock.Net copied to clipboard

Bug: Standalone server throws 500 error when receiving concurrent requests

Open FSatmar opened this issue 8 years ago • 4 comments

Hi, I'm trying to use the WireMock Net as a standalone service but when I run multiple tests in parallel which call the admin api to create or delete mappings, the server often fails with a 500 error code. Any chance to to have this fixed?

The stacktrace: System.InvalidOperationException: Collection was modified; enumeration operation may not execute. at System.ThrowHelper.ThrowInvalidOperationException(ExceptionResource resource) at System.Collections.Generic.List1.Enumerator.MoveNextRare() at System.Collections.Generic.List1.Enumerator.MoveNext() at System.Linq.Enumerable.FirstOrDefault[TSource](IEnumerable1 source, Func2 predicate) at WireMock.Server.FluentMockServer.RegisterMapping(Mapping mapping) at WireMock.Server.RespondWithAProvider.RespondWith(IResponseProvider provider) at WireMock.Server.FluentMockServer.DeserializeAndAddMapping(String json, Nullable`1 guid) at WireMock.Server.FluentMockServer.MappingsPost(RequestMessage requestMessage)

FSatmar avatar Feb 14 '18 13:02 FSatmar

I will take a look.

StefH avatar Feb 14 '18 16:02 StefH

Can you please try version 1.0.3.2 ?

StefH avatar Feb 14 '18 18:02 StefH

You are awesome! Thanks!

FSatmar avatar Feb 15 '18 09:02 FSatmar

Ok. Nice to hear.

StefH avatar Feb 15 '18 12:02 StefH