Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -380,16 +380,17 @@ await LogTestHostCreatedAsync(

// ======= TEST HOST ORCHESTRATOR ======== //
TestHostOrchestratorConfiguration testHostOrchestratorConfiguration = await TestHostOrchestratorManager.BuildAsync(serviceProvider);
if (testHostOrchestratorConfiguration.TestHostOrchestrators.Length > 0)
if (testHostOrchestratorConfiguration.TestHostOrchestrators.Length > 0 && !commandLineHandler.IsOptionSet(PlatformCommandLineProvider.DiscoverTestsOptionKey))
{
return new TestHostOrchestratorHost(testHostOrchestratorConfiguration, serviceProvider);
}

// ======= TEST HOST CONTROLLER MODE ======== //
// Check if we're in the test host or we should check test controllers extensions
// Environment variable check should not be needed but in case we will rollback to use only env var we will need it.
if (!testHostControllerInfo.HasTestHostController ||
if ((!testHostControllerInfo.HasTestHostController ||
systemEnvironment.GetEnvironmentVariable($"{EnvironmentVariableConstants.TESTINGPLATFORM_TESTHOSTCONTROLLER_SKIPEXTENSION}_{testHostControllerInfo.GetTestHostControllerPID(true)}") != "1")
&& !commandLineHandler.IsOptionSet(PlatformCommandLineProvider.DiscoverTestsOptionKey))
{
// Clone the service provider to avoid to add the message bus proxy to the main service provider.
var testHostControllersServiceProvider = (ServiceProvider)serviceProvider.Clone();
Expand Down