Skip to content

Commit 5fd14ec

Browse files
committed
Delete dead code
1 parent d76e16c commit 5fd14ec

2 files changed

Lines changed: 0 additions & 13 deletions

File tree

src/Platform/Microsoft.Testing.Platform/Hosts/TestHostBuilder.cs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -481,11 +481,6 @@ await LogTestHostCreatedAsync(
481481
policiesService.ProcessRole = TestProcessRole.TestHost;
482482
await proxyOutputDevice.HandleProcessRoleAsync(TestProcessRole.TestHost, testApplicationCancellationTokenSource.CancellationToken).ConfigureAwait(false);
483483

484-
// Setup the test host working folder.
485-
// Out of the test host controller extension the current working directory is the test host working directory.
486-
string? currentWorkingDirectory = configuration[PlatformConfigurationConstants.PlatformCurrentWorkingDirectory];
487-
ApplicationStateGuard.Ensure(currentWorkingDirectory is not null);
488-
489484
testHostControllerInfo.IsCurrentProcessTestHostController = false;
490485

491486
// If we're under test controllers and currently we're inside the started test host we connect to the out of process

src/Platform/Microsoft.Testing.Platform/TestHostControllers/TestHostControllersManager.cs

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
// Copyright (c) Microsoft Corporation. All rights reserved.
22
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
33

4-
using Microsoft.Testing.Platform.Configurations;
54
using Microsoft.Testing.Platform.Extensions;
65
using Microsoft.Testing.Platform.Extensions.TestHostControllers;
76
using Microsoft.Testing.Platform.Helpers;
@@ -108,13 +107,6 @@ public void AddDataConsumer<T>(CompositeExtensionFactory<T> compositeServiceFact
108107

109108
internal async Task<TestHostControllerConfiguration> BuildAsync(ServiceProvider serviceProvider)
110109
{
111-
// For now the test host working directory and the current working directory are the same.
112-
// In future we could move the test host in a different directory for instance in case of
113-
// the need to rewrite binary files. If we don't move files are locked by ourself.
114-
var aggregatedConfiguration = (AggregatedConfiguration)serviceProvider.GetConfiguration();
115-
string? currentWorkingDirectory = aggregatedConfiguration[PlatformConfigurationConstants.PlatformCurrentWorkingDirectory];
116-
ApplicationStateGuard.Ensure(currentWorkingDirectory is not null);
117-
118110
List<(ITestHostEnvironmentVariableProvider TestHostEnvironmentVariableProvider, int RegistrationOrder)> environmentVariableProviders = [];
119111
foreach (Func<IServiceProvider, ITestHostEnvironmentVariableProvider> environmentVariableProviderFactory in _environmentVariableProviderFactories)
120112
{

0 commit comments

Comments
 (0)