Core: dotnet test hangs on linux with dotnet 2.2.300

Created on 14 Jun 2019  路  14Comments  路  Source: dotnet/core

dotnet test hangs at:

Starting test execution, please wait...

Both on my machine and in CI using Microsoft official sdk image.

Reverting to 2.2.202 seems to fix the issue.

Broken image is mcr.microsoft.com/dotnet/core/sdk:2.2.300

All 14 comments

We've seen the same behaviour. For us it's happening on Ubuntu 16.04 (CircleCI image), running tests written in XUnit.

Here's the relevant parts of the build script and output log from CI:

wget -q https://packages.microsoft.com/config/ubuntu/16.04/packages-microsoft-prod.deb
sudo dpkg -i packages-microsoft-prod.deb
sudo apt-get install apt-transport-https
sudo apt-get update
sudo apt-get install dotnet-sdk-2.2
dotnet tool install --tool-path . Cake.Tool
chmod 755 dotnet-cake
echo 'export PATH=$PATH:/home/circleci/.local/bin' >> $BASH_ENV
./dotnet-cake --target=Test-All

Our Cake build file just runs dotnet test for each test project in parallel.

========================================
Test-Unit
========================================
Testing '/home/circleci/project/tests/XXX.Tests/XXX.Tests.csproj'...
Testing '/home/circleci/project/tests/YYY.Tests/YYY.Tests.csproj'...
Testing '/home/circleci/project/tests/BBB.Tests/BBB.Tests.csproj'...
Testing '/home/circleci/project/tests/ZZZ.Tests/ZZZ.Tests.csproj'...
Test run for /home/circleci/project/tests/YYY.Tests/bin/Release/netcoreapp2.1/YYY.Tests.dll(.NETCoreApp,Version=v2.1)
Test run for /home/circleci/project/tests/BBB.Tests/bin/Release/netcoreapp2.1/BBB.Tests.dll(.NETCoreApp,Version=v2.1)
Test run for /home/circleci/project/tests/XXX.Tests/bin/Release/netcoreapp2.1/XXX.Tests.dll(.NETCoreApp,Version=v2.1)
Testing '/home/circleci/project/tests/AAA.Tests/AAA.Tests.csproj'...
Microsoft (R) Test Execution Command Line Tool Version 16.1.0
Copyright (c) Microsoft Corporation.  All rights reserved.

Microsoft (R) Test Execution Command Line Tool Version 16.1.0
Copyright (c) Microsoft Corporation.  All rights reserved.

Microsoft (R) Test Execution Command Line Tool Version 16.1.0
Copyright (c) Microsoft Corporation.  All rights reserved.

Starting test execution, please wait...
Starting test execution, please wait...
Starting test execution, please wait...
Test run for /home/circleci/project/tests/ZZZ.Tests/bin/Release/netcoreapp2.1/ZZZ.Tests.dll(.NETCoreApp,Version=v2.1)
Microsoft (R) Test Execution Command Line Tool Version 16.1.0
Copyright (c) Microsoft Corporation.  All rights reserved.

Starting test execution, please wait...
Test run for /home/circleci/project/tests/AAA.Tests/bin/Release/netcoreapp2.1/AAA.Tests.dll(.NETCoreApp,Version=v2.1)
Microsoft (R) Test Execution Command Line Tool Version 16.1.0
Copyright (c) Microsoft Corporation.  All rights reserved.

Starting test execution, please wait...
Test run in progress.Too long with no output (exceeded 10m0s)

Swapping for
sudo apt-get install dotnet-sdk-2.2=2.2.204-1
fixes it

I'm having this issue also.

I think I'm having the same issue when running tests inside a Docker container with Concourse CI.

Here's some of the output I see when watching the container with fly watch:

                                                                                                                                                                                                                                      Test run in progress.^[[63;252R^[[63;262R 
                                                                                                                                                                                                                                   Test run in progress.^[[63;249R^[[63;259R    
                                                                                                                                                                                                                                Test run in progress.^[[63;246R^[[63;256R       
                                                                                                                                                                                                                             Test run in progress.^[[63;243R^[[63;253R          
                                                                                                                                                                                                                          Test run in progress.^[[63;240R^[[63;250R             
                                                                                                                                                                                                                       Test run in progress.^[[63;237R^[[63;247R                
                                                                                                                                                                                                                    Test run in progress.^[[63;234R^[[63;244R                   
                                                                                                                                                                                                                 Test run in progress.^[[63;231R^[[63;241R                      
                                                                                                                                                                                                              Test run in progress.^[[63;228R^[[63;238R                         
                                                                                                                                                                                                           Test run in progress.^[[63;225R^[[63;235R                            
                                                                                                                                                                                                        Test run in progress.^[[63;222R^[[63;232R                               
                                                                                                                                                                                                     Test run in progress.^[[63;219R^[[63;229R                                  
                                                                                                                                                                                                  Test run in progress.^[[63;216R^[[63;226R                                     
                                                                                                                                                                                               Test run in progress.^[[63;213R^[[63;223R                                        
                                                                                                                                                                                            Test run in progress.^[[63;210R^[[63;220R

As you can see there is a lot of whitespace before the actual output.

This is the command I'm running inside the container: dotnet test MySolutionFile.sln

I can confirm that using the older version :2.2.204 does not suffer from this issue.

I鈥檓 having the same problem with dotnet version 2.2.300, downgrading to dotnet version 2.2.204-1 fixed it.

@livarcocc @nguerrera is this something you can assist with?

this should go to @singhsarab.

I also experienced the same issue and as adviced, downgrading to 2.2.204 fixed it for both the docker image and Linux agent.

It seems to be related to #2775, executing the tests with verbosity argument outputs some tests results on my side rather than hanging at the beginning.

dotnet test --verbosity d

Updating to SDK 2.2.301 (released 9 days ago) fixed the issue. I also updated to VSTest 16.1.1

I think this can be closed, do you agree?

Yes, I agree!

Closing per comments above.

Upgrading to v2.2.301 has fixed the issue for me as well. 馃憤

Was this page helpful?
0 / 5 - 0 ratings