Skip to content

Commit 0de95f5

Browse files
committed
[rel/4.0]: Unify TestSessionContext
1 parent e8faa6a commit 0de95f5

15 files changed

+49
-38
lines changed

src/Platform/Microsoft.Testing.Extensions.VSTestBridge/Requests/VSTestDiscoverTestExecutionRequest.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
33

44
using Microsoft.Testing.Platform.Requests;
5-
using Microsoft.Testing.Platform.TestHost;
5+
using Microsoft.Testing.Platform.Services;
66
using Microsoft.VisualStudio.TestPlatform.ObjectModel.Adapter;
77
using Microsoft.VisualStudio.TestPlatform.ObjectModel.Logging;
88

src/Platform/Microsoft.Testing.Extensions.VSTestBridge/Requests/VSTestRunTestExecutionRequest.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
33

44
using Microsoft.Testing.Platform.Requests;
5-
using Microsoft.Testing.Platform.TestHost;
5+
using Microsoft.Testing.Platform.Services;
66
using Microsoft.VisualStudio.TestPlatform.ObjectModel.Adapter;
77

88
namespace Microsoft.Testing.Extensions.VSTestBridge.Requests;

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ protected override async Task<int> InternalRunAsync(CancellationToken cancellati
5252
ITestFrameworkInvoker testAdapterInvoker = ServiceProvider.GetService<ITestFrameworkInvoker>()
5353
?? new TestHostTestFrameworkInvoker(ServiceProvider);
5454

55-
ServiceProvider.TryAddService(new Services.TestSessionContext(cancellationToken));
55+
ServiceProvider.TryAddService(new TestSessionContext(new SessionUid(Guid.NewGuid().ToString()), cancellationToken));
5656
ITestFramework testFramework = await _buildTestFrameworkAsync(new(
5757
ServiceProvider,
5858
new ConsoleTestExecutionRequestFactory(ServiceProvider.GetCommandLineOptions(), testExecutionFilterFactory),

src/Platform/Microsoft.Testing.Platform/Requests/ConsoleTestExecutionRequestFactory.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
using Microsoft.Testing.Platform.CommandLine;
55
using Microsoft.Testing.Platform.Helpers;
66
using Microsoft.Testing.Platform.Resources;
7-
using Microsoft.Testing.Platform.TestHost;
7+
using Microsoft.Testing.Platform.Services;
88

99
namespace Microsoft.Testing.Platform.Requests;
1010

src/Platform/Microsoft.Testing.Platform/Requests/DiscoverTestExecutionRequest.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
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.TestHost;
4+
using Microsoft.Testing.Platform.Services;
55

66
namespace Microsoft.Testing.Platform.Requests;
77

src/Platform/Microsoft.Testing.Platform/Requests/IRequest.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
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.TestHost;
4+
using Microsoft.Testing.Platform.Services;
55

66
namespace Microsoft.Testing.Platform.Requests;
77

src/Platform/Microsoft.Testing.Platform/Requests/ITestExecutionRequestFactory.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
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.TestHost;
4+
using Microsoft.Testing.Platform.Services;
55

66
namespace Microsoft.Testing.Platform.Requests;
77

src/Platform/Microsoft.Testing.Platform/Requests/RunTestExecutionRequest.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
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.TestHost;
4+
using Microsoft.Testing.Platform.Services;
55

66
namespace Microsoft.Testing.Platform.Requests;
77

src/Platform/Microsoft.Testing.Platform/Requests/ServerTestExecutionRequestFactory.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
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.TestHost;
4+
using Microsoft.Testing.Platform.Services;
55

66
namespace Microsoft.Testing.Platform.Requests;
77

src/Platform/Microsoft.Testing.Platform/Requests/TestExecutionRequest.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
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.TestHost;
4+
using Microsoft.Testing.Platform.Services;
55

66
namespace Microsoft.Testing.Platform.Requests;
77

0 commit comments

Comments
 (0)