Skip to content

Commit fd327b6

Browse files
committed
Ensure both failed tests and errors cancel for stopOnFail
1 parent 4e86b43 commit fd327b6

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Versions.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<NSubstituteVersion>5.0.0</NSubstituteVersion>
1010
<TunnelVisionLabsReferenceAssemblyAnnotatorVersion>1.0.0-alpha.160</TunnelVisionLabsReferenceAssemblyAnnotatorVersion>
1111
<XunitAnalyzersVersion>1.2.0-pre.48</XunitAnalyzersVersion>
12-
<XunitVersion>2.5.0-pre.44</XunitVersion>
12+
<XunitVersion>2.5.0-pre.45</XunitVersion>
1313
</PropertyGroup>
1414

1515
</Project>

src/xunit.runner.visualstudio/VsTestRunner.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -578,7 +578,7 @@ void RunTestsInAssembly(
578578
resultsSink.Finished.WaitOne();
579579

580580
reporterMessageHandler.OnMessage(new TestAssemblyExecutionFinished(assembly, executionOptions, resultsSink.ExecutionSummary));
581-
if (resultsSink.ExecutionSummary.Failed != 0 && executionOptions.GetStopOnTestFailOrDefault())
581+
if ((resultsSink.ExecutionSummary.Failed != 0 || resultsSink.ExecutionSummary.Errors != 0) && executionOptions.GetStopOnTestFailOrDefault())
582582
{
583583
logger.Log("Canceling due to test failure...");
584584
cancelled = true;

0 commit comments

Comments
 (0)