-
-
Notifications
You must be signed in to change notification settings - Fork 237
Description
I want to use WireMock.Net for mocking two consecutive identical requests:
- First one responds after a certain timeout (using a Delay feature)
- Second one responds immediately
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 https://github.com/WireMock-Net/WireMock.Net/blob/db158bcc7eb8195c5ae13665c67286865827275b/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?