-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Description
Describe the bug
In some cases, dotnet test
hangs doing or after a build with .NET9 RC1.
Prior to .NET9 RC1, this worked without a problem - for previous versions as well.
Full "log" can be found here (as I was unsure which team to put the issue to): dotnet/core#9496 (comment)
To Reproduce
Make a CI build in GitHub Actions using Ubuntu and this repo: https://github.com/gimlichael/Cuemon
The main branch will fail on these two projects:
- Cuemon.AspNetCore.Mvc.FunctionalTests
- Cuemon.AspNetCore.Mvc.Tests
If you use this branch instead, https://github.com/gimlichael/Cuemon/tree/v9.0.0/net9rc1-gha-troubleshoot, all .NET9 RC1 updates has been reverted to .NET9 preview 7, and the two test projects mentioned above, runs fine.
Exceptions (if any)
No exceptions, but the test will hang - and for me, timeout after 15 minutes (cause I don't like the built-in timeout of 6 hours or so).
Further technical details
After thorough investigation over the last two days, my conclusion is that something has changed for dotnet test
with .NET9 RC1.
Oddly enough, it works fine on Windows 2022 CI build as well.
Locally, using Windows 11, Docker and WSL (Ubuntu) it works as expected as well.
Workaround for .NET9 RC1 and RC2
Segregate dotnet build
and dotnet test
.
NOK:
dotnet test --configuration Debug --verbosity normal --logger trx --results-directory $RUNNER_TEMP/TestResults --collect:"XPlat Code Coverage;Format=opencover" -p:CoverletOutputFormat=opencover -p:UseSourceLink=true -p:SkipSignAssembly=true
OK:
dotnet build --configuration Debug --verbosity normal -p:SkipSignAssembly=true
dotnet test --no-build --configuration Debug --verbosity normal --logger trx --results-directory $RUNNER_TEMP/TestResults --collect:"XPlat Code Coverage;Format=opencover" --blame-hang-timeout 10m --blame-hang-dump-type mini -p:CoverletOutputFormat=opencover -p:UseSourceLink=true