mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-01-12 05:20:35 +01:00
LogEntries not being recorded on subsequent tests #97
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 @tomwadley on GitHub (May 11, 2018).
Starting WireMock subsequent times on the same port with the same stubs appears to work, but the LogEntries are not recorded meaning you can't verify what was sent to the server.
I first noticed this using xunit in a Dotnet Core Web API project. The above is a simple reproduction using a console app.
EDIT: This is WireMock.Net 1.0.3.16 running on netcoreapp2.0
@StefH commented on GitHub (May 19, 2018):
Running on same port will indeed behave wrong, I think that the server is not really shutdown or that the OS does not yet release the port connection from client to server.
I've added a test with different ports, and that one is ok.
da46d300d7So for now I would suggest not to use the same port, but always random.
@paulapaulTW commented on GitHub (May 28, 2018):
Recently merged pull request addresses this in .NET core; it was not an issue in full framework -
297743a19a@cezarypiatekGC commented on GitHub (Jan 4, 2021):
Hi,
I'm still experiencing a similar problem. When I access the LogEntries collection the first time I'm getting no results. It looks like the LogEntries collection is not updated immediately because after adding
await Task.Delay(3000);before, the problem disappears.@Zakashi92 commented on GitHub (Mar 29, 2023):
I'm having the same issue where log entries are coming back as empty, I'm running it on Linux version 4.15.0-202-generic.
Functional Test. Though it seems to be passing on Windows !
@Zakashi92 commented on GitHub (Mar 29, 2023):
I have also tried removing random porting & I have tried with random porting both fail.
@StefH commented on GitHub (Mar 29, 2023):
@Zakashi92
What version of .NET do you use?