mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-01-11 21:10:32 +01:00
Wiremock not working with NUnit3 in .Net Framework 4.6.1 after Wiremock 1.5.47 #591
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 @MarcoMartins86 on GitHub (Apr 2, 2024).
Describe the bug
I've made a clean project with only
The behavior I've got is similar to the one described on this other thread https://github.com/WireMock-Net/WireMock.Net/issues/470, there's no error and it seems to be on some kind of deadlock somewhere but I can't pinpoint it.
Expected behavior:
Should work with .Net Framework 4.6.1 and NUnit3
Test to reproduce
Other related info
With Wiremock version 1.5.46 it is working.
Also, it is working with .Net Framework 4.6.2 for 1.5.47+
Workaround, stay on 1.5.46 for now.
@StefH commented on GitHub (Apr 2, 2024):
@MarcoMartins86
Did you try to make the test async?
Like:
@MarcoMartins86 commented on GitHub (Apr 2, 2024):
@StefH Fail with the same behavior.
Adding a logger I can see that the server prints
Server listening at http://localhost:57550but then no request reachs theWireMockMiddleware.Invoke()(reach when working). Feels like the server have a deadlock somewhere at the beginning of request pipeline, because, it reserved the port successfully since if I try to reuse the same port while the process is running it says it is already in use.@MarcoMartins86 commented on GitHub (Apr 3, 2024):
I will close this, I've added
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.11.0" />and it started working for all versions. For me, that is good enough.Thank you for your time and good work.