Why does VSTest hang for over 45 minutes before running a few unit tests?

I have about 20 unit tests. when I run them from Test Explorer they complete very fast. When I run them on the console with dotnet test they take more than 45 minutes.

So, I ran dotnet test --no-build -p:VSTestVerbosity=diag -p:VSTestDiag=c:\temp\test.log. I got two files:

  • test.log
  • test.host.20-11-24_21-25-00_45838_6.log

The logs show the same pattern. One second later, the first log starts showing

TpTrace Verbose: 0 : 66568, 10, 2020/11/24, 21:25:01.363, 63471109902700, vstest.console.dll, TcpClientExtensions.MessageLoopAsync: Polling on remoteEndPoint: 127.0.0.1:20496 localEndPoint: 127.0.0.1:20495

And will show these messages for the next 44 minutes before successfully completing.

Around the same time the second log starts showing

TpTrace Verbose: 0 : 59460, 10, 2020/11/24, 21:25:02.029, 63471116570605, testhost.dll, TcpClientExtensions.MessageLoopAsync: Polling on remoteEndPoint: [::ffff:127.0.0.1]:20495 localEndPoint: [::ffff:127.0.0.1]:20496

And will be showing such messages for the next 45 minutes as well. After that something clicks and the test completes.

All the tests have SingleThreaded attribute on their fixture.

Can anyone explain to me what does it all mean?