Closed
Description
Describe the bug
We have a lot of tests which are written in a way described here:
https://docs.microsoft.com/en-us/aspnet/core/test/integration-tests?view=aspnetcore-3.1#basic-tests-with-the-default-webapplicationfactory
Sometimes WebApplicationFactory + TestServer cause a deadlock while running under xUnit.
This particular line causes this:
Proposition
Can we have an explicit Start/Stop methods both on WebApplicationFactory and TestServer which could be called from the xunit lifetime interfaces of the fixture?
To Reproduce
You need to have a lot of integration tests starting lots(more than the cores you have) of TestServers in parallel.
Further technical details
- ASP.NET Core 2.1
- Rider, VS