mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-01-11 22:30:41 +01:00
RegexMatchTimeoutException when trying to parse HTTP version #627
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @APErebus on GitHub (Aug 22, 2024).
Originally assigned to: @StefH on GitHub.
Describe the bug
In our automated testing, we are seeing intermittent failures due to the
HttpVersionParse.Parse()throwing aRegexMatchTimeoutException.Expected behavior:
We expect the regex to parse all the time with no exceptions
Test to reproduce
We don't have reliable reproduceable test scenarios as it's intermittent. 1-2 failures every 1000 runs.
Other related info
Our suspicion is that the 100ms timeout is too short and test systems under load might not be able to parse fast enough, throwing the exception.
Can we make this default value higher (500ms) or make it configurable so we can set it to a higher value?
@StefH commented on GitHub (Aug 22, 2024):
Thanks for noticing.
I did add a timeout to most Regex to be compliant with SonarCloud warnings.
I'll need to check all Regex and probably will take a higher value, 10 seconds.
@StefH commented on GitHub (Aug 22, 2024):
https://github.com/WireMock-Net/WireMock.Net/pull/1160