Reporter |
|
---|---|
Created | Jan 7, 2019 11:06:44 AM |
Updated | Jan 7, 2019 11:06:44 AM |
Subsystem | Unit Testing |
Assignee | Eugene Strizhok (Eugene.Strizhok) |
Priority | Normal |
State | Submitted |
Type | Bug |
Fix version | No Fix versions |
Affected versions | 2018.3.1 |
Fixed In Version ReSharper | Undefined |
VsVersion | All Versions |
Branch | No branch |
Problem
The following NUnit test passes in ReSharper 2018.2.3, but in 2018.3.1 it causes the whole Resharper test runner process to terminate, not executing any further tests. The given test is marked as "aborted" and a stack trace to the exception is printed to the error log. When using the NUnit runner, everything passes as previously.
public void MyThreadThatCausesAnException()
{
throw new Exception("unit test");
}
[Test]
public void CrashWithThread()
{
Thread t = new Thread(MyThreadThatCausesAnException);
t.Start();
t.Join();
Assert.AreEqual(ThreadState.Stopped, t.ThreadState);
}
Stack trace:
2019.01.07 08:52:05.373 ERROR Process C:\Users[...]JetBrains\Installations\ReSharperPlatformVs15_7e888998_000\ReSharperTestRunner64.exe:314820 exited with code '-532462766':
Unbehandelte Ausnahme: System.Exception: unit test
bei ApplicationLogicUnitTest.Core.StateMachine.ActionExecutorTest.MyThreadThatCausesAnException() in C:\Projects\[...]Test.cs:Zeile 392.
bei System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
bei System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
bei System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
bei System.Threading.ThreadHelper.ThreadStart()
2019.01.07 08:52:05.446 WARN Element[...]CrashWithThread was left running after its run completion.
Expected Result
Old behavior, or at the very least only abort that particular test, not the whole test suite.