Skip to content

Commit

Permalink
[rel/17.6] Fix no-suitable provider found (#4474)
Browse files Browse the repository at this point in the history
  • Loading branch information
nohwnd authored May 23, 2023
1 parent 44971e4 commit 9333aa2
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,17 @@ public void DiscoverTests(DiscoveryCriteria discoveryCriteria, ITestDiscoveryEve
// marked as NotDiscovered.
_dataAggregator.MarkSourcesWithStatus(discoveryCriteria.Sources, DiscoveryStatus.NotDiscovered);

_parallelOperationManager.StartWork(workloads, eventHandler, GetParallelEventHandler, InitializeDiscoverTestsOnConcurrentManager, DiscoverTestsOnConcurrentManager);
if (nonRunnableWorkloads.Count > 0)
{
// We found some sources that don't associate to any runtime provider and so they cannot run.
// Mark the sources as skipped.

_dataAggregator.MarkSourcesWithStatus(nonRunnableWorkloads.SelectMany(w => w.Work.Sources), DiscoveryStatus.SkippedDiscovery);
// TODO: in strict mode keep them as non-discovered, and mark the run as aborted.
// _dataAggregator.MarkAsAborted();
}

_parallelOperationManager.StartWork(runnableWorkloads, eventHandler, GetParallelEventHandler, InitializeDiscoverTestsOnConcurrentManager, DiscoverTestsOnConcurrentManager);
}

private ITestDiscoveryEventsHandler2 GetParallelEventHandler(ITestDiscoveryEventsHandler2 eventHandler, IProxyDiscoveryManager concurrentManager)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ public int StartTestRun(TestRunCriteria testRunCriteria, IInternalTestRunEventsH
// _currentRunDataAggregator.MarkAsAborted();
}

_parallelOperationManager.StartWork(workloads, eventHandler, GetParallelEventHandler, PrepareTestRunOnConcurrentManager, StartTestRunOnConcurrentManager);
_parallelOperationManager.StartWork(runnableWorkloads, eventHandler, GetParallelEventHandler, PrepareTestRunOnConcurrentManager, StartTestRunOnConcurrentManager);

// Why 1? Because this is supposed to be a processId, and that is just the default that was chosen by someone before me,
// and maybe is checked somewhere, but I don't see it checked in our codebase.
Expand Down

0 comments on commit 9333aa2

Please sign in to comment.