mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-01-11 22:30:41 +01:00
Difficulty using states to test retry logic #303
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 @jecjackal on GitHub (Oct 9, 2020).
Hi WireMock.Net team,
I built a very lightweight OAuth service, and I wish to call it from a second service. I decided to wrap my requests in a retry policy via Polly. The application code is shown below:
I have setup the test below to stress the retry logic:
Unfortunately, I am getting this error upon making the second call to /connect/token:
The request message was already sent. Cannot send the same request message multiple times.
Can someone help point me in the right direction? I believe I am not switching scenario states correctly, but I am not sure what I am doing incorrectly.
Thank you for your help,
Jec
@StefH commented on GitHub (Oct 9, 2020):
Hello @jecjackal , this issue is not related to WireMock.Net
I suggest you take a look at:
https://stackoverflow.com/questions/54870415/receiving-error-the-request-message-was-already-sent-when-using-polly