Skip to content

Commit

Permalink
Merge pull request #292 from AbhitejJohn/fixdiscoveryhang
Browse files Browse the repository at this point in the history
  • Loading branch information
clairernovotny committed Feb 8, 2022
2 parents 277a7a4 + a1b50c5 commit 65cf2b7
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions src/xunit.runner.visualstudio/Sinks/VsDiscoverySink.cs
Expand Up @@ -189,9 +189,16 @@ void HandleTestCaseDiscoveryMessage(MessageHandlerArgs<ITestCaseDiscoveryMessage

void HandleDiscoveryCompleteMessage(MessageHandlerArgs<IDiscoveryCompleteMessage> args)
{
SendExistingTestCases();

Finished.Set();
try
{
SendExistingTestCases();
}
finally
{
// Set test discovery complete despite any potential issues
// with sending test cases over. This would avoid causing test discovery to hang for the entire session.
Finished.Set();
}

HandleCancellation(args);
}
Expand Down

0 comments on commit 65cf2b7

Please sign in to comment.