From 20d049716391dd644b0fcdf96e7c2602b88d38b1 Mon Sep 17 00:00:00 2001 From: Mikael Mengistu Date: Thu, 2 May 2019 14:47:22 -0700 Subject: [PATCH] Remove HubProtocol minor version (#9898) --- .../csharp/Client.Core/src/HubConnection.cs | 3 --- .../Client/test/UnitTests/TestConnection.cs | 2 +- ...re.SignalR.Protocols.Json.netcoreapp3.0.cs | 1 - ...e.SignalR.Protocols.Json.netstandard2.0.cs | 1 - .../src/Protocol/JsonHubProtocol.cs | 4 --- ...lR.Protocols.MessagePack.netstandard2.0.cs | 1 - .../src/Protocol/MessagePackHubProtocol.cs | 4 --- ...Protocols.NewtonsoftJson.netstandard2.0.cs | 1 - .../src/Protocol/NewtonsoftJsonHubProtocol.cs | 4 --- ...AspNetCore.SignalR.Common.netcoreapp3.0.cs | 4 --- ...spNetCore.SignalR.Common.netstandard2.0.cs | 4 --- .../src/Protocol/HandshakeProtocol.cs | 13 ++-------- .../src/Protocol/HandshakeResponseMessage.cs | 25 ++----------------- .../src/Protocol/IHubProtocol.cs | 5 ---- .../Protocol/HandshakeProtocolTests.cs | 13 +--------- .../HandshakeProtocolBenchmark.cs | 4 +-- .../RedisHubLifetimeManagerBenchmark.cs | 1 - .../server/Core/src/HubConnectionContext.cs | 2 +- .../SignalR/test/HubConnectionHandlerTests.cs | 2 -- 19 files changed, 9 insertions(+), 85 deletions(-) diff --git a/src/SignalR/clients/csharp/Client.Core/src/HubConnection.cs b/src/SignalR/clients/csharp/Client.Core/src/HubConnection.cs index fb027315c6..cdbd7f7caa 100644 --- a/src/SignalR/clients/csharp/Client.Core/src/HubConnection.cs +++ b/src/SignalR/clients/csharp/Client.Core/src/HubConnection.cs @@ -72,7 +72,6 @@ namespace Microsoft.AspNetCore.SignalR.Client // Transient state to a connection private ConnectionState _connectionState; - private int _serverProtocolMinorVersion; /// /// Occurs when the connection is closed. The connection could be closed due to an error or due to either the server or client intentionally @@ -953,8 +952,6 @@ namespace Microsoft.AspNetCore.SignalR.Client $"Unable to complete handshake with the server due to an error: {message.Error}"); } - _serverProtocolMinorVersion = message.MinorVersion; - break; } } diff --git a/src/SignalR/clients/csharp/Client/test/UnitTests/TestConnection.cs b/src/SignalR/clients/csharp/Client/test/UnitTests/TestConnection.cs index 432d4595a8..dc9e1b9d56 100644 --- a/src/SignalR/clients/csharp/Client/test/UnitTests/TestConnection.cs +++ b/src/SignalR/clients/csharp/Client/test/UnitTests/TestConnection.cs @@ -87,7 +87,7 @@ namespace Microsoft.AspNetCore.SignalR.Client.Tests var output = MemoryBufferWriter.Get(); try { - HandshakeProtocol.WriteResponseMessage(new HandshakeResponseMessage(minorVersion), output); + HandshakeProtocol.WriteResponseMessage(HandshakeResponseMessage.Empty, output); response = output.ToArray(); } finally diff --git a/src/SignalR/common/Protocols.Json/ref/Microsoft.AspNetCore.SignalR.Protocols.Json.netcoreapp3.0.cs b/src/SignalR/common/Protocols.Json/ref/Microsoft.AspNetCore.SignalR.Protocols.Json.netcoreapp3.0.cs index aa468508cd..feda524ab2 100644 --- a/src/SignalR/common/Protocols.Json/ref/Microsoft.AspNetCore.SignalR.Protocols.Json.netcoreapp3.0.cs +++ b/src/SignalR/common/Protocols.Json/ref/Microsoft.AspNetCore.SignalR.Protocols.Json.netcoreapp3.0.cs @@ -18,7 +18,6 @@ namespace Microsoft.AspNetCore.SignalR.Protocol { public JsonHubProtocol() { } public JsonHubProtocol(Microsoft.Extensions.Options.IOptions options) { } - public int MinorVersion { get { throw null; } } public string Name { get { throw null; } } public Microsoft.AspNetCore.Connections.TransferFormat TransferFormat { get { throw null; } } public int Version { get { throw null; } } diff --git a/src/SignalR/common/Protocols.Json/ref/Microsoft.AspNetCore.SignalR.Protocols.Json.netstandard2.0.cs b/src/SignalR/common/Protocols.Json/ref/Microsoft.AspNetCore.SignalR.Protocols.Json.netstandard2.0.cs index aa468508cd..feda524ab2 100644 --- a/src/SignalR/common/Protocols.Json/ref/Microsoft.AspNetCore.SignalR.Protocols.Json.netstandard2.0.cs +++ b/src/SignalR/common/Protocols.Json/ref/Microsoft.AspNetCore.SignalR.Protocols.Json.netstandard2.0.cs @@ -18,7 +18,6 @@ namespace Microsoft.AspNetCore.SignalR.Protocol { public JsonHubProtocol() { } public JsonHubProtocol(Microsoft.Extensions.Options.IOptions options) { } - public int MinorVersion { get { throw null; } } public string Name { get { throw null; } } public Microsoft.AspNetCore.Connections.TransferFormat TransferFormat { get { throw null; } } public int Version { get { throw null; } } diff --git a/src/SignalR/common/Protocols.Json/src/Protocol/JsonHubProtocol.cs b/src/SignalR/common/Protocols.Json/src/Protocol/JsonHubProtocol.cs index abed0026c1..1e30e252d8 100644 --- a/src/SignalR/common/Protocols.Json/src/Protocol/JsonHubProtocol.cs +++ b/src/SignalR/common/Protocols.Json/src/Protocol/JsonHubProtocol.cs @@ -42,7 +42,6 @@ namespace Microsoft.AspNetCore.SignalR.Protocol private static readonly string ProtocolName = "json"; private static readonly int ProtocolVersion = 1; - private static readonly int ProtocolMinorVersion = 0; /// /// Gets the serializer used to serialize invocation arguments and return values. @@ -71,9 +70,6 @@ namespace Microsoft.AspNetCore.SignalR.Protocol /// public int Version => ProtocolVersion; - /// - public int MinorVersion => ProtocolMinorVersion; - /// public TransferFormat TransferFormat => TransferFormat.Text; diff --git a/src/SignalR/common/Protocols.MessagePack/ref/Microsoft.AspNetCore.SignalR.Protocols.MessagePack.netstandard2.0.cs b/src/SignalR/common/Protocols.MessagePack/ref/Microsoft.AspNetCore.SignalR.Protocols.MessagePack.netstandard2.0.cs index 6854f01d1c..ec222f2318 100644 --- a/src/SignalR/common/Protocols.MessagePack/ref/Microsoft.AspNetCore.SignalR.Protocols.MessagePack.netstandard2.0.cs +++ b/src/SignalR/common/Protocols.MessagePack/ref/Microsoft.AspNetCore.SignalR.Protocols.MessagePack.netstandard2.0.cs @@ -15,7 +15,6 @@ namespace Microsoft.AspNetCore.SignalR.Protocol { public MessagePackHubProtocol() { } public MessagePackHubProtocol(Microsoft.Extensions.Options.IOptions options) { } - public int MinorVersion { get { throw null; } } public string Name { get { throw null; } } public Microsoft.AspNetCore.Connections.TransferFormat TransferFormat { get { throw null; } } public int Version { get { throw null; } } diff --git a/src/SignalR/common/Protocols.MessagePack/src/Protocol/MessagePackHubProtocol.cs b/src/SignalR/common/Protocols.MessagePack/src/Protocol/MessagePackHubProtocol.cs index 0fcbc54bea..44fe3eeaa0 100644 --- a/src/SignalR/common/Protocols.MessagePack/src/Protocol/MessagePackHubProtocol.cs +++ b/src/SignalR/common/Protocols.MessagePack/src/Protocol/MessagePackHubProtocol.cs @@ -29,7 +29,6 @@ namespace Microsoft.AspNetCore.SignalR.Protocol private static readonly string ProtocolName = "messagepack"; private static readonly int ProtocolVersion = 1; - private static readonly int ProtocolMinorVersion = 0; /// public string Name => ProtocolName; @@ -37,9 +36,6 @@ namespace Microsoft.AspNetCore.SignalR.Protocol /// public int Version => ProtocolVersion; - /// - public int MinorVersion => ProtocolMinorVersion; - /// public TransferFormat TransferFormat => TransferFormat.Binary; diff --git a/src/SignalR/common/Protocols.NewtonsoftJson/ref/Microsoft.AspNetCore.SignalR.Protocols.NewtonsoftJson.netstandard2.0.cs b/src/SignalR/common/Protocols.NewtonsoftJson/ref/Microsoft.AspNetCore.SignalR.Protocols.NewtonsoftJson.netstandard2.0.cs index ad4c03b106..e04928abf7 100644 --- a/src/SignalR/common/Protocols.NewtonsoftJson/ref/Microsoft.AspNetCore.SignalR.Protocols.NewtonsoftJson.netstandard2.0.cs +++ b/src/SignalR/common/Protocols.NewtonsoftJson/ref/Microsoft.AspNetCore.SignalR.Protocols.NewtonsoftJson.netstandard2.0.cs @@ -15,7 +15,6 @@ namespace Microsoft.AspNetCore.SignalR.Protocol { public NewtonsoftJsonHubProtocol() { } public NewtonsoftJsonHubProtocol(Microsoft.Extensions.Options.IOptions options) { } - public int MinorVersion { get { throw null; } } public string Name { get { throw null; } } public Newtonsoft.Json.JsonSerializer PayloadSerializer { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } public Microsoft.AspNetCore.Connections.TransferFormat TransferFormat { get { throw null; } } diff --git a/src/SignalR/common/Protocols.NewtonsoftJson/src/Protocol/NewtonsoftJsonHubProtocol.cs b/src/SignalR/common/Protocols.NewtonsoftJson/src/Protocol/NewtonsoftJsonHubProtocol.cs index 69d71900b4..420d32d9b5 100644 --- a/src/SignalR/common/Protocols.NewtonsoftJson/src/Protocol/NewtonsoftJsonHubProtocol.cs +++ b/src/SignalR/common/Protocols.NewtonsoftJson/src/Protocol/NewtonsoftJsonHubProtocol.cs @@ -33,7 +33,6 @@ namespace Microsoft.AspNetCore.SignalR.Protocol private static readonly string ProtocolName = "json"; private static readonly int ProtocolVersion = 1; - private static readonly int ProtocolMinorVersion = 0; /// /// Gets the serializer used to serialize invocation arguments and return values. @@ -62,9 +61,6 @@ namespace Microsoft.AspNetCore.SignalR.Protocol /// public int Version => ProtocolVersion; - /// - public int MinorVersion => ProtocolMinorVersion; - /// public TransferFormat TransferFormat => TransferFormat.Text; diff --git a/src/SignalR/common/SignalR.Common/ref/Microsoft.AspNetCore.SignalR.Common.netcoreapp3.0.cs b/src/SignalR/common/SignalR.Common/ref/Microsoft.AspNetCore.SignalR.Common.netcoreapp3.0.cs index b2537951c2..9e20659d98 100644 --- a/src/SignalR/common/SignalR.Common/ref/Microsoft.AspNetCore.SignalR.Common.netcoreapp3.0.cs +++ b/src/SignalR/common/SignalR.Common/ref/Microsoft.AspNetCore.SignalR.Common.netcoreapp3.0.cs @@ -61,11 +61,8 @@ namespace Microsoft.AspNetCore.SignalR.Protocol public partial class HandshakeResponseMessage : Microsoft.AspNetCore.SignalR.Protocol.HubMessage { public static readonly Microsoft.AspNetCore.SignalR.Protocol.HandshakeResponseMessage Empty; - public HandshakeResponseMessage(int minorVersion) { } - public HandshakeResponseMessage(int? minorVersion, string error) { } public HandshakeResponseMessage(string error) { } public string Error { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } - public int MinorVersion { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } } public abstract partial class HubInvocationMessage : Microsoft.AspNetCore.SignalR.Protocol.HubMessage { @@ -101,7 +98,6 @@ namespace Microsoft.AspNetCore.SignalR.Protocol } public partial interface IHubProtocol { - int MinorVersion { get; } string Name { get; } Microsoft.AspNetCore.Connections.TransferFormat TransferFormat { get; } int Version { get; } diff --git a/src/SignalR/common/SignalR.Common/ref/Microsoft.AspNetCore.SignalR.Common.netstandard2.0.cs b/src/SignalR/common/SignalR.Common/ref/Microsoft.AspNetCore.SignalR.Common.netstandard2.0.cs index b2537951c2..9e20659d98 100644 --- a/src/SignalR/common/SignalR.Common/ref/Microsoft.AspNetCore.SignalR.Common.netstandard2.0.cs +++ b/src/SignalR/common/SignalR.Common/ref/Microsoft.AspNetCore.SignalR.Common.netstandard2.0.cs @@ -61,11 +61,8 @@ namespace Microsoft.AspNetCore.SignalR.Protocol public partial class HandshakeResponseMessage : Microsoft.AspNetCore.SignalR.Protocol.HubMessage { public static readonly Microsoft.AspNetCore.SignalR.Protocol.HandshakeResponseMessage Empty; - public HandshakeResponseMessage(int minorVersion) { } - public HandshakeResponseMessage(int? minorVersion, string error) { } public HandshakeResponseMessage(string error) { } public string Error { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } - public int MinorVersion { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } } public abstract partial class HubInvocationMessage : Microsoft.AspNetCore.SignalR.Protocol.HubMessage { @@ -101,7 +98,6 @@ namespace Microsoft.AspNetCore.SignalR.Protocol } public partial interface IHubProtocol { - int MinorVersion { get; } string Name { get; } Microsoft.AspNetCore.Connections.TransferFormat TransferFormat { get; } int Version { get; } diff --git a/src/SignalR/common/SignalR.Common/src/Protocol/HandshakeProtocol.cs b/src/SignalR/common/SignalR.Common/src/Protocol/HandshakeProtocol.cs index 283bafcb29..7aa032d9e2 100644 --- a/src/SignalR/common/SignalR.Common/src/Protocol/HandshakeProtocol.cs +++ b/src/SignalR/common/SignalR.Common/src/Protocol/HandshakeProtocol.cs @@ -23,8 +23,6 @@ namespace Microsoft.AspNetCore.SignalR.Protocol private static ReadOnlySpan ProtocolPropertyNameBytes => new byte[] { (byte)'p', (byte)'r', (byte)'o', (byte)'t', (byte)'o', (byte)'c', (byte)'o', (byte)'l' }; private const string ProtocolVersionPropertyName = "version"; private static ReadOnlySpan ProtocolVersionPropertyNameBytes => new byte[] { (byte)'v', (byte)'e', (byte)'r', (byte)'s', (byte)'i', (byte)'o', (byte)'n' }; - private const string MinorVersionPropertyName = "minorVersion"; - private static ReadOnlySpan MinorVersionPropertyNameBytes => new byte[] { (byte)'m', (byte)'i', (byte)'n', (byte)'o', (byte)'r', (byte)'V', (byte)'e', (byte)'r', (byte)'s', (byte)'i', (byte)'o', (byte)'n' }; private const string ErrorPropertyName = "error"; private static ReadOnlySpan ErrorPropertyNameBytes => new byte[] { (byte)'e', (byte)'r', (byte)'r', (byte)'o', (byte)'r' }; private const string TypePropertyName = "type"; @@ -40,7 +38,7 @@ namespace Microsoft.AspNetCore.SignalR.Protocol var memoryBufferWriter = MemoryBufferWriter.Get(); try { - WriteResponseMessage(new HandshakeResponseMessage(protocol.MinorVersion), memoryBufferWriter); + WriteResponseMessage(HandshakeResponseMessage.Empty, memoryBufferWriter); result = memoryBufferWriter.ToArray(); _messageCache.TryAdd(protocol, result); } @@ -100,8 +98,6 @@ namespace Microsoft.AspNetCore.SignalR.Protocol writer.WriteString(ErrorPropertyNameBytes, responseMessage.Error); } - writer.WriteNumber(MinorVersionPropertyNameBytes, responseMessage.MinorVersion); - writer.WriteEndObject(); writer.Flush(); Debug.Assert(writer.CurrentDepth == 0); @@ -133,7 +129,6 @@ namespace Microsoft.AspNetCore.SignalR.Protocol reader.CheckRead(); reader.EnsureObjectStart(); - int? minorVersion = null; string error = null; while (reader.CheckRead()) @@ -150,10 +145,6 @@ namespace Microsoft.AspNetCore.SignalR.Protocol { error = reader.ReadAsString(ErrorPropertyName); } - else if (reader.TextEquals(MinorVersionPropertyNameBytes)) - { - minorVersion = reader.ReadAsInt32(MinorVersionPropertyName); - } else { reader.Skip(); @@ -169,7 +160,7 @@ namespace Microsoft.AspNetCore.SignalR.Protocol } }; - responseMessage = new HandshakeResponseMessage(minorVersion, error); + responseMessage = new HandshakeResponseMessage(error); return true; } diff --git a/src/SignalR/common/SignalR.Common/src/Protocol/HandshakeResponseMessage.cs b/src/SignalR/common/SignalR.Common/src/Protocol/HandshakeResponseMessage.cs index 9e2454bbe9..836da79bb4 100644 --- a/src/SignalR/common/SignalR.Common/src/Protocol/HandshakeResponseMessage.cs +++ b/src/SignalR/common/SignalR.Common/src/Protocol/HandshakeResponseMessage.cs @@ -1,4 +1,4 @@ -// Copyright (c) .NET Foundation. All rights reserved. +// Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. namespace Microsoft.AspNetCore.SignalR.Protocol @@ -18,34 +18,13 @@ namespace Microsoft.AspNetCore.SignalR.Protocol /// public string Error { get; } - /// - /// Highest minor protocol version that the server supports. - /// - public int MinorVersion { get; } - /// /// Initializes a new instance of the class. /// An error response does need a minor version. Since the handshake has failed, any extra data will be ignored. /// /// Error encountered by the server, indicating why the handshake has failed. - public HandshakeResponseMessage(string error) : this(null, error) { } - - /// - /// Initializes a new instance of the class. - /// A reponse with a minor version indicates success, and doesn't require an error field. - /// - /// The highest protocol minor version that the server supports. - public HandshakeResponseMessage(int minorVersion) : this(minorVersion, null) { } - - /// - /// Initializes a new instance of the class. - /// - /// Error encountered by the server, indicating why the handshake has failed. - /// The highest protocol minor version that the server supports. - public HandshakeResponseMessage(int? minorVersion, string error) + public HandshakeResponseMessage(string error) { - // MinorVersion defaults to 0, because old servers don't send a minor version - MinorVersion = minorVersion ?? 0; Error = error; } } diff --git a/src/SignalR/common/SignalR.Common/src/Protocol/IHubProtocol.cs b/src/SignalR/common/SignalR.Common/src/Protocol/IHubProtocol.cs index 99b7fe5d36..b235e14e54 100644 --- a/src/SignalR/common/SignalR.Common/src/Protocol/IHubProtocol.cs +++ b/src/SignalR/common/SignalR.Common/src/Protocol/IHubProtocol.cs @@ -22,11 +22,6 @@ namespace Microsoft.AspNetCore.SignalR.Protocol /// int Version { get; } - /// - /// Gets the minor version of the protocol. - /// - int MinorVersion { get; } - /// /// Gets the transfer format of the protocol. /// diff --git a/src/SignalR/common/SignalR.Common/test/Internal/Protocol/HandshakeProtocolTests.cs b/src/SignalR/common/SignalR.Common/test/Internal/Protocol/HandshakeProtocolTests.cs index 58bc7b2b70..27560c502a 100644 --- a/src/SignalR/common/SignalR.Common/test/Internal/Protocol/HandshakeProtocolTests.cs +++ b/src/SignalR/common/SignalR.Common/test/Internal/Protocol/HandshakeProtocolTests.cs @@ -1,4 +1,4 @@ -// Copyright (c) .NET Foundation. All rights reserved. +// Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System.Buffers; @@ -59,17 +59,6 @@ namespace Microsoft.AspNetCore.SignalR.Common.Tests.Internal.Protocol Assert.Equal("dummy", response.Error); } - [Theory] - [InlineData("{\"error\":\"\",\"minorVersion\":34}\u001e", 34)] - [InlineData("{\"error\":\"flump flump flump\",\"minorVersion\":112}\u001e", 112)] - public void ParsingResponseMessageGivesMinorVersion(string json, int version) - { - var message = new ReadOnlySequence(Encoding.UTF8.GetBytes(json)); - - Assert.True(HandshakeProtocol.TryParseResponseMessage(ref message, out var response)); - Assert.Equal(version, response.MinorVersion); - } - [Fact] public void ParsingHandshakeRequestNotCompleteReturnsFalse() { diff --git a/src/SignalR/perf/Microbenchmarks/HandshakeProtocolBenchmark.cs b/src/SignalR/perf/Microbenchmarks/HandshakeProtocolBenchmark.cs index c14b6125d0..07df0b633f 100644 --- a/src/SignalR/perf/Microbenchmarks/HandshakeProtocolBenchmark.cs +++ b/src/SignalR/perf/Microbenchmarks/HandshakeProtocolBenchmark.cs @@ -63,7 +63,7 @@ namespace Microsoft.AspNetCore.SignalR.Microbenchmarks var memoryBufferWriter = MemoryBufferWriter.Get(); try { - HandshakeProtocol.WriteResponseMessage(new HandshakeResponseMessage(1), memoryBufferWriter); + HandshakeProtocol.WriteResponseMessage(HandshakeResponseMessage.Empty, memoryBufferWriter); result = memoryBufferWriter.ToArray(); } finally @@ -195,4 +195,4 @@ namespace Microsoft.AspNetCore.SignalR.Microbenchmarks } } } -} \ No newline at end of file +} diff --git a/src/SignalR/perf/Microbenchmarks/RedisHubLifetimeManagerBenchmark.cs b/src/SignalR/perf/Microbenchmarks/RedisHubLifetimeManagerBenchmark.cs index 486ef8fa49..36afc0cac1 100644 --- a/src/SignalR/perf/Microbenchmarks/RedisHubLifetimeManagerBenchmark.cs +++ b/src/SignalR/perf/Microbenchmarks/RedisHubLifetimeManagerBenchmark.cs @@ -178,7 +178,6 @@ namespace Microsoft.AspNetCore.SignalR.Microbenchmarks public string Name => _name; public int Version => _innerProtocol.Version; - public int MinorVersion => _innerProtocol.MinorVersion; public TransferFormat TransferFormat => _innerProtocol.TransferFormat; diff --git a/src/SignalR/server/Core/src/HubConnectionContext.cs b/src/SignalR/server/Core/src/HubConnectionContext.cs index 86b735cd35..9e649f1b4e 100644 --- a/src/SignalR/server/Core/src/HubConnectionContext.cs +++ b/src/SignalR/server/Core/src/HubConnectionContext.cs @@ -441,7 +441,7 @@ namespace Microsoft.AspNetCore.SignalR Log.HandshakeComplete(_logger, Protocol.Name); - await WriteHandshakeResponseAsync(new HandshakeResponseMessage(Protocol.MinorVersion)); + await WriteHandshakeResponseAsync(HandshakeResponseMessage.Empty); return true; } } diff --git a/src/SignalR/server/SignalR/test/HubConnectionHandlerTests.cs b/src/SignalR/server/SignalR/test/HubConnectionHandlerTests.cs index 16e99efb39..f74aee9a56 100644 --- a/src/SignalR/server/SignalR/test/HubConnectionHandlerTests.cs +++ b/src/SignalR/server/SignalR/test/HubConnectionHandlerTests.cs @@ -3063,7 +3063,6 @@ namespace Microsoft.AspNetCore.SignalR.Tests { var testProtocol = new Mock(); testProtocol.Setup(m => m.Name).Returns("CustomProtocol"); - testProtocol.Setup(m => m.MinorVersion).Returns(112); testProtocol.Setup(m => m.IsVersionSupported(It.IsAny())).Returns(true); testProtocol.Setup(m => m.TransferFormat).Returns(TransferFormat.Binary); @@ -3075,7 +3074,6 @@ namespace Microsoft.AspNetCore.SignalR.Tests var connectionHandlerTask = await client.ConnectAsync(connectionHandler).OrTimeout(); Assert.NotNull(client.HandshakeResponseMessage); - Assert.Equal(112, client.HandshakeResponseMessage.MinorVersion); client.Dispose(); await connectionHandlerTask.OrTimeout();