Note: This applies to [After] hook as well, so I suspect all the hooks are affected?
Using the below:
public class Class1
{
[ Before ( Test ) ]
public void Before ( )
{
throw new ArgumentException ( "Bad Bad Leroy Brown" ) ;
}
[ Test ]
public void TestMethod ( )
{
}
}
The logs yield the following in 0.61.58:
Message:
BeforeTest hook failed
Stack Trace:
HookExecutor.ExecuteBeforeTestHooksAsync(AbstractExecutableTest test, CancellationToken cancellationToken)
TestExecutor.ExecuteAsync(AbstractExecutableTest executableTest, CancellationToken cancellationToken)
TestExecutor.ExecuteAsync(AbstractExecutableTest executableTest, CancellationToken cancellationToken)
TestExecutor.ExecuteAsync(AbstractExecutableTest executableTest, CancellationToken cancellationToken)
<<ExecuteTestInternalAsync>b__0>d.MoveNext()
--- End of stack trace from previous location ---
RetryHelper.ExecuteWithRetry(TestContext testContext, Func`1 action)
RetryHelper.ExecuteWithRetry(TestContext testContext, Func`1 action)
TestCoordinator.ExecuteTestInternalAsync(AbstractExecutableTest test, CancellationToken cancellationToken)
This was working as expected in 0.57.24, so something has changed between then and now.
Message:
Bad Bad Leroy Brown
Stack Trace:
Class1.Before() line 8
<>c__DisplayClass2_0.<global_ClassLibrary2_Class1_Before_0Params_Body>b__0() line 80
GeneratedHookRegistry.global_ClassLibrary2_Class1_Before_0Params_Body(Object instance, TestContext context, CancellationToken cancellationToken) line 80
<<CreateTimeoutHookAction>b__1>d.MoveNext()
--- End of stack trace from previous location ---
<<CreateInstanceHookDelegateAsync>b__0>d.MoveNext()
--- End of stack trace from previous location ---
SingleTestExecutor.ExecuteBeforeTestHooksAsync(IReadOnlyList`1 hooks, TestContext context, CancellationToken cancellationToken)
SingleTestExecutor.ExecuteBeforeTestHooksAsync(IReadOnlyList`1 hooks, TestContext context, CancellationToken cancellationToken)
SingleTestExecutor.ExecuteTestWithHooksAsync(AbstractExecutableTest test, Object instance, CancellationToken cancellationToken)
SingleTestExecutor.ExecuteTestWithHooksAsync(AbstractExecutableTest test, Object instance, CancellationToken cancellationToken)
SingleTestExecutor.ExecuteTestInternalAsync(AbstractExecutableTest test, CancellationToken cancellationToken)
Reactions are currently unavailable
Note: This applies to [After] hook as well, so I suspect all the hooks are affected?
Using the below:
The logs yield the following in
0.61.58:This was working as expected in
0.57.24, so something has changed between then and now.