Skip to content

Commit

Permalink
Latest dependencies (and use ExecutionSink instead of delegating sinks)
Browse files Browse the repository at this point in the history
  • Loading branch information
bradwilson committed Nov 22, 2023
1 parent 1f419e6 commit 56db5de
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
4 changes: 2 additions & 2 deletions Versions.props
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
<NerdbankGitVersioningVersion>3.6.133</NerdbankGitVersioningVersion>
<NSubstituteVersion>5.1.0</NSubstituteVersion>
<TunnelVisionLabsReferenceAssemblyAnnotatorVersion>1.0.0-alpha.160</TunnelVisionLabsReferenceAssemblyAnnotatorVersion>
<XunitAnalyzersVersion>1.6.0</XunitAnalyzersVersion>
<XunitVersion>2.6.2</XunitVersion>
<XunitAnalyzersVersion>1.7.0-pre.10</XunitAnalyzersVersion>
<XunitVersion>2.6.3-pre.3</XunitVersion>
</PropertyGroup>

</Project>
12 changes: 7 additions & 5 deletions src/xunit.runner.visualstudio/VsTestRunner.cs
Original file line number Diff line number Diff line change
Expand Up @@ -541,11 +541,13 @@ void RunTestsInAssembly(
reporterMessageHandler.OnMessage(new TestAssemblyExecutionStarting(runInfo.Assembly, executionOptions));

using var vsExecutionSink = new VsExecutionSink(reporterMessageHandler, frameworkHandle, logger, testCasesMap, () => cancelled);
IExecutionSink resultsSink = vsExecutionSink;
if (longRunningSeconds > 0)
resultsSink = new DelegatingLongRunningTestDetectionSink(resultsSink, TimeSpan.FromSeconds(longRunningSeconds), diagnosticsSinkLocal);
if (configuration.FailSkipsOrDefault)
resultsSink = new DelegatingFailSkipSink(resultsSink);
var executionSinkOptions = new ExecutionSinkOptions
{
DiagnosticMessageSink = diagnosticsSinkRemote,
FailSkips = configuration.FailSkipsOrDefault,
LongRunningTestTime = TimeSpan.FromSeconds(longRunningSeconds),
};
var resultsSink = new ExecutionSink(vsExecutionSink, executionSinkOptions);

controller.RunTests(testCases, resultsSink, executionOptions);
resultsSink.Finished.WaitOne();
Expand Down

0 comments on commit 56db5de

Please sign in to comment.