Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Intermittent threading errors with FindLogEntries #408

Closed
davidpene opened this issue Jan 29, 2020 · 4 comments
Closed

Intermittent threading errors with FindLogEntries #408

davidpene opened this issue Jan 29, 2020 · 4 comments
Labels

Comments

@davidpene
Copy link

davidpene commented Jan 29, 2020

When running tests in parallel, we intermittently get this exception:

System.InvalidOperationException : Collection was modified; enumeration operation may not execute.
   at System.Collections.Generic.List`1.Enumerator.MoveNextRare()
   at WireMock.Server.FluentMockServer.FindLogEntries(IRequestMatcher[] matchers) in /Server/FluentMockServer.LogEntries.cs:line 42
@StefH StefH added the bug label Jan 30, 2020
@NoahLerner
Copy link
Member

NoahLerner commented Feb 27, 2020

I'm trying to reliably reproduce this issue but could use some more information.
Are you running tests in parallel using the same WireMockServer instance? Or does each test create a new instance?

Additionally,

at WireMock.Server.FluentMockServer.FindLogEntries(IRequestMatcher[] matchers) in /Server/FluentMockServer.LogEntries.cs:line 42

does not point to a line of code in my version of the repo. Are you running the latest nuget package?

@davidpene
Copy link
Author

We're running tests in parallel and using a static wiremock server to mock a single "api". We're using version 1.0.7. I'll bump to the latest 1.1.9.0 and let you know if the issue continues.

@NoahLerner
Copy link
Member

Hey David, did updating the nuget package resolve your issue?

@davidpene
Copy link
Author

Hey @NoahLerner the issue was intermittent and it hasn't shown up again, so it may have been solved. Happy to close this issue and I'll reopen if I see it again.
Cheers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants