question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Regression: `dotnet test` hangs for 15 minutes after test run completed on mac and linux

See original GitHub issue

Our builds on VSTS include dotnet test, which restores, builds, and tests our product. With dotnet CLI 2.1.100 all went well. But when we upgraded to 2.1.300, the dotnet tool doesn’t exit for 15 minutes after the test run is completed with no output to explain the delay.

Expected behavior

The dotnet tool exits immediately, as can be seen on this 2.1.100 run:

image

Actual behavior

The dotnet tool exits after waiting 15 minutes, as can be seen on this 2.1.300 run:

image

Steps to reproduce

Please contact me via my microsoft.com email address for links to the builds if you’d like to investigate further.

Issue Analytics

  • State:open
  • Created 5 years ago
  • Reactions:11
  • Comments:44 (15 by maintainers)

github_iconTop GitHub Comments

16reactions
wakuflaircommented, Dec 20, 2019

I can confirm that this still happens on .NET Core 3.1

ubuntu@VM-0-4-ubuntu:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 18.04.1 LTS
Release:        18.04
Codename:       bionic
root@195d912bb800:/# dotnet --version
3.1.100
Test run for ***********************(.NETCoreApp,Version=v3.1)
Microsoft (R) Test Execution Command Line Tool Version 16.3.0
Copyright (c) Microsoft Corporation.  All rights reserved.

Starting test execution, please wait...

A total of 1 test files matched the specified pattern.                      <---- hangs forever

-nodereuse:false doesn’t work either.

8reactions
ThiagoBarradascommented, Mar 19, 2021

Hello Guys, I tried all options said here, but nothing work.

I solves my problem (happening only in azure devops integration) turning off parallel test executing

In my test project > Add folder Properties > Add AssemblyInfo.cs

using Xunit;

[assembly: CollectionBehavior(DisableTestParallelization = true)]
Read more comments on GitHub >

github_iconTop Results From Across the Web

Dotnet test hangs in gitlab gitlab-runner 13.9.0-rc2
Regression : `dotnet test` hangs for 15 minutes after test run completed on mac and linux · dotnet restore hangs indefinitely, spinning CPU....
Read more >
Unit tests slow execution on build server - net core
Found a solution in Regression: dotnet test hangs for 15 minutes after test run completed on mac and linux. Adding the following parameter ......
Read more >
Dotnet Core Testing Randomly Times Out
When running dotnet test the suite hangs and continuously prints out “Test run in progress.” Historically the testing suite has run in under ......
Read more >
Cannot debug net6.0-macos Apps - Developer Community
When I hit debug, the following error is shown in the Terminal: Possible reasons for this include: * You misspelled a built-in dotnet...
Read more >
dotnet test command - .NET CLI
The dotnet test command is used to execute unit tests in a given project.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found