From 3712daa77a9c21a581d8a392c495afe9c8371929 Mon Sep 17 00:00:00 2001 From: Youssef1313 Date: Sat, 19 Apr 2025 12:14:37 +0200 Subject: [PATCH] Use `PlatformVersion.Version` as the server version --- .../Microsoft.Testing.Platform/Hosts/ServerTestHost.cs | 2 +- .../ServerMode/JsonRpc/PassiveNode.cs | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/Platform/Microsoft.Testing.Platform/Hosts/ServerTestHost.cs b/src/Platform/Microsoft.Testing.Platform/Hosts/ServerTestHost.cs index 0d429e4cc0b..be8ff2dd954 100644 --- a/src/Platform/Microsoft.Testing.Platform/Hosts/ServerTestHost.cs +++ b/src/Platform/Microsoft.Testing.Platform/Hosts/ServerTestHost.cs @@ -23,7 +23,7 @@ namespace Microsoft.Testing.Platform.Hosts; internal sealed partial class ServerTestHost : CommonTestHost, IServerTestHost, IDisposable, IOutputDeviceDataProducer { - public const string ProtocolVersion = "1.0.0"; + public const string ProtocolVersion = PlatformVersion.Version; private readonly Func> _buildTestFrameworkAsync; private readonly IMessageHandlerFactory _messageHandlerFactory; diff --git a/src/Platform/Microsoft.Testing.Platform/ServerMode/JsonRpc/PassiveNode.cs b/src/Platform/Microsoft.Testing.Platform/ServerMode/JsonRpc/PassiveNode.cs index 70a8642f307..a5634948673 100644 --- a/src/Platform/Microsoft.Testing.Platform/ServerMode/JsonRpc/PassiveNode.cs +++ b/src/Platform/Microsoft.Testing.Platform/ServerMode/JsonRpc/PassiveNode.cs @@ -2,7 +2,6 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using Microsoft.Testing.Platform.Helpers; -using Microsoft.Testing.Platform.Hosts; using Microsoft.Testing.Platform.Logging; using Microsoft.Testing.Platform.Services; @@ -63,7 +62,7 @@ public async Task ConnectAsync() var requestMessage = (RequestMessage)message; var responseObject = new InitializeResponseArgs( ProcessId: _processHandler.GetCurrentProcess().Id, - ServerInfo: new ServerInfo("test-anywhere", Version: ServerTestHost.ProtocolVersion), + ServerInfo: new ServerInfo("test-anywhere", Version: PlatformVersion.Version), Capabilities: new ServerCapabilities( new ServerTestingCapabilities( SupportsDiscovery: false,