Tests hang from dotnet test
See original GitHub issueSteps to reproduce
Tests run on travis CI via dotnet test
now intermittently fail. Failures started after updating to a newer .NET Core SDK. It appears that the test tool increased from 16.0.1 to 16.1.1 with the new SDK.
Source code: https://github.com/grpc/grpc-dotnet/commits/master
Expected behavior
Tests run and exit
Actual behavior
Tests hang and the build is terminated
Diagnostic logs
Failure: https://travis-ci.org/grpc/grpc-dotnet/builds/551562232?utm_source=github_status&utm_medium=notification
Microsoft (R) Test Execution Command Line Tool Version 16.1.1
Success: https://travis-ci.org/grpc/grpc-dotnet/builds/551058627?utm_source=github_status&utm_medium=notification
Microsoft (R) Test Execution Command Line Tool Version 16.0.1
Issue Analytics
- State:
- Created 4 years ago
- Reactions:7
- Comments:42 (16 by maintainers)
Top Results From Across the Web
Howto resolve .net test hangs on "Starting test execution ...
Sometimes xUnit tests hang forever because the test runner pipeline can't handle parallel threads. To check if that's the issue try adding xunit ......
Read more >.Net (DotNet) tests get stuck with no reported errors or ...
Regarding the parameter --blame-hang-timeout 15min I noticed that it did not have any effect. The test continued stuck for more than 15 minutes ......
Read more >Generating a dump file when tests hang on a CI machine
dotnet test has many useful options. One of them is --blame-hang which creates a dump of the process and all the child processes...
Read more >Tracking down a hanging xUnit test in CI: building a custom ...
In this post I describe how we tracked down a hanging xUnit test by building a custom XuniTestFramework implementation.
Read more >dotnet test command - .NET CLI
The dotnet test command is used to execute unit tests in a given ... Run the tests in blame mode and collects a...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I had the same problem, two workaround worked:
Adding
--logger:"console;noprogress=true"
like @tasadar2However, I did not like it because I could not see the progress (
--logger:"console"
has same issue), so instead added< /dev/null
This allow me to see the progress of tests, without hanging.
We are currently experiencing the same issue. We have been using
mcr.microsoft.com/dotnet/core/sdk:2.2.204
to avoid the performance degradation issue which is now resolved. But when attempting the latestmcr.microsoft.com/dotnet/core/sdk
, currentlyb4c25c26dc73f498073fcdb4aefe167793eb3a8c79effa76df768006b5c345b8
, only a couple test runs finish while the rest seem to hang. As with the performance issue, it seems to be related to non-interactive hosts.Situation
<IsTestProject>true</IsTestProject>
set, and we are runningdotnet test
against the solution in a CircleCI environment.Replication I condensed our project to share an example. Each test project has a single test that sleeps for 5sec. Repo: https://github.com/tasadar2/vstest-issue-2080 CircleCI: https://circleci.com/gh/tasadar2/vstest-issue-2080/3
It doesn’t always replicate the issue, but often does.