mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-01-11 21:10:32 +01:00
DevOps build - Test execution hangs #196
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 @jorgeolive on GitHub (Aug 2, 2019).
Hello,
I know this issue is similar to #234, but anyway.
In an Azure DevOps pipeline apparently there's some issue when raising a mocked server in the remote agent. I have multiple XUnit tests where a WireMock server is used. When executing a test library, once first WireMock test is hit, test execution stops and no trace of exception is given. I have to stop the build process manually, otherwise it gets stuck there forever. This is how I am using it:
I've tried to enclose the server.start() in a try / catch block without any different result. Any ideas? Am I doing anything wrong?
@StefH commented on GitHub (Aug 2, 2019):
WithPath("/api")fakedContext.ExecuteCodeActivitywith a simple call likenew HttpClient().PostAsync(uri, form).GetAwaiter().GetResult();?@jorgeolive commented on GitHub (Aug 2, 2019):
Well. I found that the problem is reproducible when I have multiple test classes using a WireMockServer. Seems that it's a problem of concurrency.
@StefH commented on GitHub (Aug 2, 2019):
The unit-tests for this project are also using xUnit.
Did you take a look at my unit-tests? Maybe there is a fundamental difference?
Or maybe it's related to sync - async ? (You need to define your unit-test as async in case you run async code...)
Is your project a public project ?
@StefH commented on GitHub (Aug 16, 2019):
@jorgeolive Any update on your question?
@StefH commented on GitHub (Sep 23, 2019):
@jorgeolive Closing this issue.
If you still have a question, comment here or open a new one.