You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
I'm experiencing inconsistent result when it comes to overlapping (duplicate) request. In the WireMock documentation, it states that for a overlapping request, the most recent mock will be returned but I'm not seeing that behavior. What I'm seeing is that the response will sometimes be the first mock or the most recent mock.
Here is the sample code:
for(vari=0;i<20;i++){varserver=WireMockServer.Start();server.Given(Request.Create().WithPath("/some/thing").UsingGet()).RespondWith(Response.Create().WithStatusCode(200).WithHeader("Content-Type","text/plain").WithBody("Hello world!"));server.Given(Request.Create().WithPath("/some/thing").UsingGet()).RespondWith(Response.Create().WithStatusCode(200).WithHeader("Content-Type","text/plain").WithBody("Hello world duplicate!"));using(varclient=newHttpClient()){varresponse=awaitclient.GetAsync($"{server.Url}/some/thing");varcontent=awaitresponse.Content.ReadAsStringAsync();Console.WriteLine($"counter {i} value:{content}");}server.Reset();server.Dispose();server.Stop();}
I'm expecting 'Hello world duplicate!' all the time but I sometime get 'Hello world!'
Result:
counter 0 value:Hello world!
counter 1 value:Hello world duplicate!
counter 2 value:Hello world!
counter 3 value:Hello world duplicate!
counter 4 value:Hello world!
counter 5 value:Hello world!
counter 6 value:Hello world duplicate!
counter 7 value:Hello world!
counter 8 value:Hello world duplicate!
counter 9 value:Hello world!
counter 10 value:Hello world!
counter 11 value:Hello world!
counter 12 value:Hello world duplicate!
counter 13 value:Hello world!
counter 14 value:Hello world duplicate!
counter 15 value:Hello world duplicate!
counter 16 value:Hello world duplicate!
counter 17 value:Hello world duplicate!
counter 18 value:Hello world!
counter 19 value:Hello world!
The text was updated successfully, but these errors were encountered:
Hi,
I'm experiencing inconsistent result when it comes to overlapping (duplicate) request. In the WireMock documentation, it states that for a overlapping request, the most recent mock will be returned but I'm not seeing that behavior. What I'm seeing is that the response will sometimes be the first mock or the most recent mock.
Here is the sample code:
I'm expecting 'Hello world duplicate!' all the time but I sometime get 'Hello world!'
Result:
counter 0 value:Hello world!
counter 1 value:Hello world duplicate!
counter 2 value:Hello world!
counter 3 value:Hello world duplicate!
counter 4 value:Hello world!
counter 5 value:Hello world!
counter 6 value:Hello world duplicate!
counter 7 value:Hello world!
counter 8 value:Hello world duplicate!
counter 9 value:Hello world!
counter 10 value:Hello world!
counter 11 value:Hello world!
counter 12 value:Hello world duplicate!
counter 13 value:Hello world!
counter 14 value:Hello world duplicate!
counter 15 value:Hello world duplicate!
counter 16 value:Hello world duplicate!
counter 17 value:Hello world duplicate!
counter 18 value:Hello world!
counter 19 value:Hello world!
The text was updated successfully, but these errors were encountered: