From 36267e8bafc2345e536fb937a03946cfd172250c Mon Sep 17 00:00:00 2001 From: Andrew Stanton-Nurse Date: Mon, 3 Feb 2020 13:51:26 -0800 Subject: [PATCH] More quarantining (#18698) * quarantine more * actually quarantine signalr test * more quarantining --- .../Client/test/FunctionalTests/HubConnectionTests.cs | 1 + .../Client/test/FunctionalTests/HubProtocolVersionTests.cs | 1 + src/SignalR/common/testassets/Tests.Utils/TestClient.cs | 6 ++++-- .../server/SignalR/test/HubConnectionHandlerTests.cs | 2 ++ src/Tools/dotnet-user-secrets/test/SecretManagerTests.cs | 3 +++ src/Tools/dotnet-watch/test/ProgramTests.cs | 1 + 6 files changed, 12 insertions(+), 2 deletions(-) diff --git a/src/SignalR/clients/csharp/Client/test/FunctionalTests/HubConnectionTests.cs b/src/SignalR/clients/csharp/Client/test/FunctionalTests/HubConnectionTests.cs index 2220685e82..539caf8c85 100644 --- a/src/SignalR/clients/csharp/Client/test/FunctionalTests/HubConnectionTests.cs +++ b/src/SignalR/clients/csharp/Client/test/FunctionalTests/HubConnectionTests.cs @@ -520,6 +520,7 @@ namespace Microsoft.AspNetCore.SignalR.Client.FunctionalTests [Theory] [MemberData(nameof(HubProtocolsAndTransportsAndHubPaths))] [LogLevel(LogLevel.Trace)] + [Flaky("", FlakyOn.All)] public async Task StreamAsyncTest(string protocolName, HttpTransportType transportType, string path) { var protocol = HubProtocols[protocolName]; diff --git a/src/SignalR/clients/csharp/Client/test/FunctionalTests/HubProtocolVersionTests.cs b/src/SignalR/clients/csharp/Client/test/FunctionalTests/HubProtocolVersionTests.cs index 01c6fa6299..7a288d1b60 100644 --- a/src/SignalR/clients/csharp/Client/test/FunctionalTests/HubProtocolVersionTests.cs +++ b/src/SignalR/clients/csharp/Client/test/FunctionalTests/HubProtocolVersionTests.cs @@ -99,6 +99,7 @@ namespace Microsoft.AspNetCore.SignalR.Client.FunctionalTests [Theory] [MemberData(nameof(TransportTypes))] + [Flaky("", FlakyOn.All)] public async Task ClientUsingNewCallWithNewProtocol(HttpTransportType transportType) { using (var server = await StartServer()) diff --git a/src/SignalR/common/testassets/Tests.Utils/TestClient.cs b/src/SignalR/common/testassets/Tests.Utils/TestClient.cs index 6183691ad4..b5edf50d2e 100644 --- a/src/SignalR/common/testassets/Tests.Utils/TestClient.cs +++ b/src/SignalR/common/testassets/Tests.Utils/TestClient.cs @@ -128,7 +128,8 @@ namespace Microsoft.AspNetCore.SignalR.Tests messages.Add(message); return messages; default: - throw new NotSupportedException("TestClient does not support receiving invocations!"); + // Message implement ToString so this should be helpful. + throw new NotSupportedException($"TestClient recieved an unexpected message: {message}."); } } } @@ -161,7 +162,8 @@ namespace Microsoft.AspNetCore.SignalR.Tests // Pings are ignored break; default: - throw new NotSupportedException("TestClient does not support receiving invocations!"); + // Message implement ToString so this should be helpful. + throw new NotSupportedException($"TestClient recieved an unexpected message: {message}."); } } } diff --git a/src/SignalR/server/SignalR/test/HubConnectionHandlerTests.cs b/src/SignalR/server/SignalR/test/HubConnectionHandlerTests.cs index e86fa54f51..31cd9f5206 100644 --- a/src/SignalR/server/SignalR/test/HubConnectionHandlerTests.cs +++ b/src/SignalR/server/SignalR/test/HubConnectionHandlerTests.cs @@ -19,6 +19,7 @@ using Microsoft.AspNetCore.Http.Connections.Features; using Microsoft.AspNetCore.Http.Connections.Internal; using Microsoft.AspNetCore.SignalR.Internal; using Microsoft.AspNetCore.SignalR.Protocol; +using Microsoft.AspNetCore.Testing; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging.Testing; @@ -1037,6 +1038,7 @@ namespace Microsoft.AspNetCore.SignalR.Tests } [Fact] + [Flaky("", FlakyOn.All)] public async Task HubMethodCanBeRenamedWithAttribute() { using (StartVerifiableLog()) diff --git a/src/Tools/dotnet-user-secrets/test/SecretManagerTests.cs b/src/Tools/dotnet-user-secrets/test/SecretManagerTests.cs index 61a5966f74..8ae6e6d0dd 100644 --- a/src/Tools/dotnet-user-secrets/test/SecretManagerTests.cs +++ b/src/Tools/dotnet-user-secrets/test/SecretManagerTests.cs @@ -39,6 +39,7 @@ namespace Microsoft.Extensions.SecretManager.Tools.Tests [Theory] [InlineData(null)] [InlineData("")] + [Flaky("", FlakyOn.All)] public void Error_MissingId(string id) { var project = Path.Combine(_fixture.CreateProject(id), "TestProject.csproj"); @@ -84,6 +85,7 @@ namespace Microsoft.Extensions.SecretManager.Tools.Tests [Theory] [InlineData(true)] [InlineData(false)] + [Flaky("", FlakyOn.All)] public void SetSecrets(bool fromCurrentDirectory) { var secrets = new KeyValuePair[] @@ -209,6 +211,7 @@ namespace Microsoft.Extensions.SecretManager.Tools.Tests } [Fact] + [Flaky("", FlakyOn.All)] public void List_Flattens_Nested_Objects() { string secretId; diff --git a/src/Tools/dotnet-watch/test/ProgramTests.cs b/src/Tools/dotnet-watch/test/ProgramTests.cs index 6e24eb13d2..c13c449e43 100644 --- a/src/Tools/dotnet-watch/test/ProgramTests.cs +++ b/src/Tools/dotnet-watch/test/ProgramTests.cs @@ -24,6 +24,7 @@ namespace Microsoft.DotNet.Watcher.Tools.Tests } [Fact] + [Flaky("", FlakyOn.All)] public async Task ConsoleCancelKey() { _tempDir