dotnet / sdk

Core functionality needed to create .NET Core projects, that is shared between Visual Studio and CLI
https://dot.net/core
MIT License
2.66k stars 1.06k forks source link

Dotnet XUnit test hangs when running on a solution in 3.0 preview 7 #10418

Closed UncleSamSwiss closed 4 years ago

UncleSamSwiss commented 5 years ago

Moved from https://github.com/microsoft/vstest/issues/2107

Description

After upgrading our Docker containers from preview 4 to preview 7 (mcr.microsoft.com/dotnet/core/sdk:3.0-buster) all our XUnit tests are hanging.

Command (in the solution directory):

dotnet test --logger "trx;LogFileName=Results.trx" /p:CollectCoverage=true /p:CoverletOutputFormat=opencover /p:Include="[Backend.*]*"

Output:

Test run for /tmp/build/c0907c7d/repo/src/backend/Api.Tests/bin/Debug/netcoreapp3.0/Backend.Api.Tests.dll(.NETCoreApp,Version=v3.0)
Test run for /tmp/build/c0907c7d/repo/src/backend/Ctrl.Tests/bin/Debug/netcoreapp3.0/Backend.Ctrl.Tests.dll(.NETCoreApp,Version=v3.0)
Microsoft (R) Test Execution Command Line Tool Version 16.1.1
Copyright (c) Microsoft Corporation.  All rights reserved.

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

Starting test execution, please wait...
Starting test execution, please wait...

Test Run Successful.
Total tests: 13
     Passed: 13
 Total time: 2.0733 Seconds

After this comes nothing.

I've seen the same (or similar) issue reported here for .NET Core 2.x

It seems to be fixed for 2.1.701 & 2.2.301 (according to https://github.com/dotnet/core/issues/2775#issuecomment-510191569) Should this be fixed with preview 7 or do we have to wait for preview 8?

Currently we can't use preview 7 for solution wide unit tests!

Environment

mcr.microsoft.com/dotnet/core/sdk:3.0-buster as of July 30 (preview 7)

livarcocc commented 5 years ago

This should be fixed in .NET Core 3.0.100-preview8 that is shipping soon.

Over there, we are referencing version 16.3.0-preview-20190715-02 of the test SDK.