mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-01-11 13:00:33 +01:00
Scenario state change before a response delay timeout ends #674
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 @vsoldatkin on GitHub (Mar 8, 2025).
Originally assigned to: @StefH on GitHub.
I want to use WireMock.Net for mocking two consecutive identical requests:
My client code under test is making a request with a timeout and then retries immediately with identical payload.
I configure the mappings like this:
Mapping 1: scenario A, transition to State1
Mapping 2: scenario A, when state is State1
This is not working as I expect since my client code makes the second request before the delay on the first mapping ends.
According to the code
db158bcc7e/src/WireMock.Net/Owin/WireMockMiddleware.cs (L176)wiremock waits for delays first and makes a state transition as one of the finishing steps.Shouldn't we rather expect a state transition to occur as early as an appropriate match was found?