-
Notifications
You must be signed in to change notification settings - Fork 10k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
dotnet test keeps hanging #3443
Comments
@natemcmaster do you know who owns |
From @natemcmaster on August 21, 2018 21:11 That's my team. You can move this to aspnet/Home. |
@dustinmoris can share more logs? What do you see in console before the tests hang? Also, VSTest diagnostic logs may provide information about which process is stuck. Unlike |
Before the tests I just see the normal .NET Core output from building the project:
Because it hangs I had to cancel the build. After running testlog.host.18-08-24_23-22-45_88253_4.txt Seems like this is the point at which it starts hanging. After this line it just keeps saying
Let me know if there's more information I can provide! |
Thanks for the test logs. As far as I can tell, this rules out issues in the test runner itself. There appears to be some kind of deadlock in the test code. Gathering a process dump is the next step for investigating this. When dotnet test runs, there will be several "dotnet.exe" processes. I recommend using Process Explorer to find the right dotnet.exe process for which to collect a full process dump. The dotnet.exe process which is hanging will have startup arguments like this:
Once you have a process dump, we can look at where the threads are stuck. You should be able to open .dmp files in Visual Studio. |
This issue was moved to aspnet/Hosting#1537 |
Sometimes xUnit tests hang forever because the test runner pipeline can't handle parallel threads. To check if that's the issue try adding
And put inside 1 thread config.
|
this seems to be happening more with the newer sdk and xunit
@dmitry-pavlov's solution worked for me. |
From @dustinmoris on August 21, 2018 20:20
Steps to reproduce
.\build.ps1
(or just rundotnet test ./tests/Giraffe.Tests/Giraffe.Tests.fsproj -f netcoreapp2.1
)The build will succeed.
If you go to the
Giraffe.Tests.fsproj
file and changeto
and re-run the tests then you'll see that it will hang forever as if something went into a deadlock.
Previously I was using
dotnet xunit
which also didn't have problems, but sincedotnet xunit
has been discontinued I switched over todotnet test
which is giving me problems now.Also this issue doesn't exist if I downgrade the test project to netcoreapp2.0.
Expected behavior
Tests will not deadlock with
Microsoft.AspNetCore.TestHost
version2.1.*
.Actual behavior
Tests hang forever.
Environment data
dotnet --info
output:Copied from original issue: dotnet/cli#9874
The text was updated successfully, but these errors were encountered: