Skip to content

Tests never finish when JsonConvert DefaultSettings changed #1360

@ejcoyle88

Description

@ejcoyle88

Description

Hopefully I am reporting this in the correct place, sorry if not!
Running in either VS2017 or using dotnet test, the runner hangs indefinitely if the JsonConvert.DefaultSettings have been set as below:

JsonConvert.DefaultSettings = () => new JsonSerializerSettings
{
    ContractResolver = new DefaultContractResolver
    {
        NamingStrategy = new SnakeCaseNamingStrategy()
    }
};

I have tested this using MSTest, Nunit and Xunit and the same issue seems to happen across the board, which leads me to believe its the vstest runner itself.

Steps to reproduce

XUnitTestProject1.zip
Above is a sample project with 2 tests. One which hangs and one which doesn't.

Expected behavior

For the tests to finish running

Actual behavior

Tests never finish running. I have to go and end the dotnet process manually.

Diagnostic logs

logs.zip

Environment

Windows 10, .net core 2.0

AB#1866683

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions