Unplanned
Last Updated: 13 Apr 2023 08:40 by Ivo
Ivo
Created on: 13 Apr 2023 08:40
Type: Bug Report
0
Static mocking Task.Delay or System.TimeSpan hangs with the debugger attached

The following code snippet causes a hang in the test execution while being debugged:

Mock.SetupStatic(typeof(TimeSpan), Behavior.CallOriginal, StaticConstructor.NonMocked);
Mock.Arrange(() => TimeSpan.FromSeconds(15)).Returns(TimeSpan.MinValue);

The issue can be temporary solved by disabling the DebugWindow via JustMock extension menu. 

0 comments