Dotnet core 1.0.1 preview2 freeze / freeze on dotnet test?

On some systems, and not on others, in my office, it seems that the dotnet core is unstable, maybe something else (visual studio 2017 rc?) Is interfering, and the "dotnet test" commands that work elsewhere, hang (no output, no tests run, just freezes):

xUnit.net .NET CLI test runner (64-bit .NET Core win10-x64) Discovering: xyUnitTests Discovered: xyUnitTests Starting: xyUnitTests 

I am trying to find out what is the reason for this. It blocks CI and developers. I believe that it will be possible to isolate and fix, and I ask about it if someone sees this, or if I find out, I will answer it so that others who are stuck here can peel off.

+6
source share
3 answers

XUnit support for dotnet kernel projects requires very specific versions of the dotnet kernel, the dotnet cluster CLI, xunit, and dotnet-test-xunit CLI, as defined in the xUnit documentation . I also experienced the behavior that you describe when trying to run tests in Visual Studio Team Services, where I, unfortunately, do not control the version of the .NET Core CLI. The same tests run without problems on my local machine, where I confirmed that the xunit package versions and the dotnet snap versions correspond to those supported by xUnit. I suspect that on the computers you are facing, the problems do not have the dotnet tools supported and the xunit package versions.

0
source

I found a solution to my very similar problem. I used anynch methods in my tests and accessed the result using .Result. This can lead to a deadlock situation in the x-unit . Instead, try declaring your methods with async, and then use wait to get the result. I found a solution at fooobar.com/questions/1013005 / ...

0
source

Following the xUnit docs, I switched to the dotnet xunit command instead of the dotnet test . I also had to specify an additional parameter -parallel none . This solved my problem.

-2
source

Source: https://habr.com/ru/post/1013002/


All Articles