From 7365ddbbe91da8a0f08edac1c11f0be2b1d58983 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexander=20K=C3=B6plinger?= Date: Wed, 29 Jan 2020 03:12:47 +0100 Subject: [PATCH] Disable System.Net.* tests on Mono that are also disabled on CoreCLR (#2318) Should help with https://github.com/dotnet/runtime/issues/2316 --- .../RegistrationBuilderAttributedOverrideUnitTests.cs | 2 ++ .../tests/FunctionalTests/AssemblyInfo.cs | 2 ++ .../System.Net.Http/tests/FunctionalTests/AssemblyInfo.cs | 2 ++ .../tests/HttpListenerAuthenticationTests.cs | 4 +++- .../tests/HttpListenerContextTests.cs | 4 +++- .../tests/HttpListenerResponseTests.Cookies.cs | 4 +++- .../tests/HttpListenerResponseTests.cs | 7 +++++-- .../System.Net.Mail/tests/Functional/SmtpClientTest.cs | 3 +++ src/libraries/System.Net.Requests/tests/LoggingTest.cs | 4 +++- .../tests/FunctionalTests/SslStreamSniTest.cs | 2 ++ .../tests/FunctionalTests/AssemblyInfo.cs | 2 ++ 11 files changed, 30 insertions(+), 6 deletions(-) diff --git a/src/libraries/System.ComponentModel.Composition.Registration/tests/System/ComponentModel/Composition/Registration/RegistrationBuilderAttributedOverrideUnitTests.cs b/src/libraries/System.ComponentModel.Composition.Registration/tests/System/ComponentModel/Composition/Registration/RegistrationBuilderAttributedOverrideUnitTests.cs index 778ad07b4f565..7144f04d5ff0e 100644 --- a/src/libraries/System.ComponentModel.Composition.Registration/tests/System/ComponentModel/Composition/Registration/RegistrationBuilderAttributedOverrideUnitTests.cs +++ b/src/libraries/System.ComponentModel.Composition.Registration/tests/System/ComponentModel/Composition/Registration/RegistrationBuilderAttributedOverrideUnitTests.cs @@ -8,10 +8,12 @@ using System.Reflection; using Xunit; using Xunit.Sdk; +using Microsoft.DotNet.XUnitExtensions.Attributes; namespace System.ComponentModel.Composition.Registration.Tests { [SkipOnCoreClr("Test failures on stress tests")] + [SkipOnMono("Test failures on stress tests")] public class RegistrationBuilderAttributedOverrideUnitTests { public interface IContractA { } diff --git a/src/libraries/System.Data.SqlClient/tests/FunctionalTests/AssemblyInfo.cs b/src/libraries/System.Data.SqlClient/tests/FunctionalTests/AssemblyInfo.cs index abe7673853fac..04cc84c580686 100644 --- a/src/libraries/System.Data.SqlClient/tests/FunctionalTests/AssemblyInfo.cs +++ b/src/libraries/System.Data.SqlClient/tests/FunctionalTests/AssemblyInfo.cs @@ -3,5 +3,7 @@ // See the LICENSE file in the project root for more information. using Xunit; +using Microsoft.DotNet.XUnitExtensions.Attributes; [assembly: SkipOnCoreClr("Timeout in stress tests on Linux/arm32", TestPlatforms.Linux)] +[assembly: SkipOnMono("Timeout in stress tests on Linux/arm32", TestPlatforms.Linux)] diff --git a/src/libraries/System.Net.Http/tests/FunctionalTests/AssemblyInfo.cs b/src/libraries/System.Net.Http/tests/FunctionalTests/AssemblyInfo.cs index 282c71ecae151..fe9200ef2ee8b 100644 --- a/src/libraries/System.Net.Http/tests/FunctionalTests/AssemblyInfo.cs +++ b/src/libraries/System.Net.Http/tests/FunctionalTests/AssemblyInfo.cs @@ -3,5 +3,7 @@ // See the LICENSE file in the project root for more information. using Xunit; +using Microsoft.DotNet.XUnitExtensions.Attributes; [assembly: SkipOnCoreClr("System.Net.Tests are flaky and/or long running: https://github.com/dotnet/runtime/issues/131")] +[assembly: SkipOnMono("System.Net.Tests are flaky and/or long running: https://github.com/dotnet/runtime/issues/131")] diff --git a/src/libraries/System.Net.HttpListener/tests/HttpListenerAuthenticationTests.cs b/src/libraries/System.Net.HttpListener/tests/HttpListenerAuthenticationTests.cs index e442f048caea6..15681d8b0487b 100644 --- a/src/libraries/System.Net.HttpListener/tests/HttpListenerAuthenticationTests.cs +++ b/src/libraries/System.Net.HttpListener/tests/HttpListenerAuthenticationTests.cs @@ -10,10 +10,12 @@ using System.Threading; using System.Threading.Tasks; using Xunit; +using Microsoft.DotNet.XUnitExtensions.Attributes; namespace System.Net.Tests { - [SkipOnCoreClr("System.Net.Tests are inestable")] + [SkipOnCoreClr("System.Net.Tests are flaky")] + [SkipOnMono("System.Net.Tests are flaky")] [ConditionalClass(typeof(PlatformDetection), nameof(PlatformDetection.IsNotWindowsNanoServer))] // httpsys component missing in Nano. public class HttpListenerAuthenticationTests : IDisposable { diff --git a/src/libraries/System.Net.HttpListener/tests/HttpListenerContextTests.cs b/src/libraries/System.Net.HttpListener/tests/HttpListenerContextTests.cs index 4a542440c675a..4a79e3b80c3b6 100644 --- a/src/libraries/System.Net.HttpListener/tests/HttpListenerContextTests.cs +++ b/src/libraries/System.Net.HttpListener/tests/HttpListenerContextTests.cs @@ -11,10 +11,12 @@ using System.Threading; using System.Threading.Tasks; using Xunit; +using Microsoft.DotNet.XUnitExtensions.Attributes; namespace System.Net.Tests { - [SkipOnCoreClr("System.Net.Tests are inestable")] + [SkipOnCoreClr("System.Net.Tests are flaky")] + [SkipOnMono("System.Net.Tests are flaky")] [ConditionalClass(typeof(PlatformDetection), nameof(PlatformDetection.IsNotWindowsNanoServer))] // httpsys component missing in Nano. public class HttpListenerContextTests : IDisposable { diff --git a/src/libraries/System.Net.HttpListener/tests/HttpListenerResponseTests.Cookies.cs b/src/libraries/System.Net.HttpListener/tests/HttpListenerResponseTests.Cookies.cs index 4bcfddc7d1ca2..2bac73efd3143 100644 --- a/src/libraries/System.Net.HttpListener/tests/HttpListenerResponseTests.Cookies.cs +++ b/src/libraries/System.Net.HttpListener/tests/HttpListenerResponseTests.Cookies.cs @@ -6,10 +6,12 @@ using System.Linq; using System.Threading.Tasks; using Xunit; +using Microsoft.DotNet.XUnitExtensions.Attributes; namespace System.Net.Tests { - [SkipOnCoreClr("System.Net.Tests are inestable")] + [SkipOnCoreClr("System.Net.Tests are flaky")] + [SkipOnMono("System.Net.Tests are flaky")] [ConditionalClass(typeof(PlatformDetection), nameof(PlatformDetection.IsNotWindowsNanoServer))] // httpsys component missing in Nano. public class HttpListenerResponseCookiesTests : HttpListenerResponseTestBase { diff --git a/src/libraries/System.Net.HttpListener/tests/HttpListenerResponseTests.cs b/src/libraries/System.Net.HttpListener/tests/HttpListenerResponseTests.cs index e38070bd2dad0..dad158e9cca19 100644 --- a/src/libraries/System.Net.HttpListener/tests/HttpListenerResponseTests.cs +++ b/src/libraries/System.Net.HttpListener/tests/HttpListenerResponseTests.cs @@ -7,6 +7,7 @@ using System.Text; using System.Threading.Tasks; using Xunit; +using Microsoft.DotNet.XUnitExtensions.Attributes; namespace System.Net.Tests { @@ -57,7 +58,8 @@ protected async Task GetResponse(string httpVersion = "1.1 } } - [SkipOnCoreClr("System.Net.Tests are inestable")] + [SkipOnCoreClr("System.Net.Tests are flaky")] + [SkipOnMono("System.Net.Tests are flaky")] [ConditionalClass(typeof(PlatformDetection), nameof(PlatformDetection.IsNotWindowsNanoServer))] // httpsys component missing in Nano. public class HttpListenerResponseTests : HttpListenerResponseTestBase { @@ -113,7 +115,8 @@ public async Task CopyFrom_NullTemplateResponse_ThrowsNullReferenceException() [InlineData(" \r \t \n", 123)] [InlineData("http://microsoft.com", 155)] [InlineData(" http://microsoft.com ", 155)] - [SkipOnCoreClr("System.Net.Tests are inestable")] + [SkipOnCoreClr("System.Net.Tests are flaky")] + [SkipOnMono("System.Net.Tests are flaky")] public async Task Redirect_Invoke_SetsRedirectionProperties(string url, int expectedNumberOfBytes) { string expectedUrl = url?.Trim() ?? ""; diff --git a/src/libraries/System.Net.Mail/tests/Functional/SmtpClientTest.cs b/src/libraries/System.Net.Mail/tests/Functional/SmtpClientTest.cs index 6d4be90277d1e..487218fce3198 100644 --- a/src/libraries/System.Net.Mail/tests/Functional/SmtpClientTest.cs +++ b/src/libraries/System.Net.Mail/tests/Functional/SmtpClientTest.cs @@ -16,6 +16,7 @@ using System.Threading.Tasks; using Systen.Net.Mail.Tests; using Xunit; +using Microsoft.DotNet.XUnitExtensions.Attributes; namespace System.Net.Mail.Tests { @@ -340,6 +341,7 @@ public void TestZeroTimeout() [InlineData("")] [InlineData(null)] [SkipOnCoreClr("System.Net.Tests are flaky and/or long running: https://github.com/dotnet/runtime/issues/131")] + [SkipOnMono("System.Net.Tests are flaky and/or long running: https://github.com/dotnet/runtime/issues/131")] public async Task TestMailDeliveryAsync(string body) { using var server = new LoopbackSmtpServer(); @@ -358,6 +360,7 @@ public async Task TestMailDeliveryAsync(string body) [Fact] [PlatformSpecific(TestPlatforms.Windows)] // NTLM support required, see https://github.com/dotnet/corefx/issues/28961 [SkipOnCoreClr("System.Net.Tests are flaky and/or long running: https://github.com/dotnet/runtime/issues/131")] + [SkipOnMono("System.Net.Tests are flaky and/or long running: https://github.com/dotnet/runtime/issues/131")] public async Task TestCredentialsCopyInAsyncContext() { using var server = new LoopbackSmtpServer(); diff --git a/src/libraries/System.Net.Requests/tests/LoggingTest.cs b/src/libraries/System.Net.Requests/tests/LoggingTest.cs index 4994c18d7020d..2a08b2bf48b48 100644 --- a/src/libraries/System.Net.Requests/tests/LoggingTest.cs +++ b/src/libraries/System.Net.Requests/tests/LoggingTest.cs @@ -4,6 +4,7 @@ using System.Diagnostics.Tracing; using Xunit; +using Microsoft.DotNet.XUnitExtensions.Attributes; namespace System.Net.Tests { @@ -11,7 +12,8 @@ public class LoggingTest { [Fact] [SkipOnTargetFramework(TargetFrameworkMonikers.Mono, "NetEventSource is only part of .NET Core.")] - [SkipOnCoreClr("System.Net.Tests are inestable")] + [SkipOnCoreClr("System.Net.Tests are flaky")] + [SkipOnMono("System.Net.Tests are flaky")] public void EventSource_ExistsWithCorrectId() { Type esType = typeof(WebRequest).Assembly.GetType("System.Net.NetEventSource", throwOnError: true, ignoreCase: false); diff --git a/src/libraries/System.Net.Security/tests/FunctionalTests/SslStreamSniTest.cs b/src/libraries/System.Net.Security/tests/FunctionalTests/SslStreamSniTest.cs index f05bdc199c00e..5d4c4968d768f 100644 --- a/src/libraries/System.Net.Security/tests/FunctionalTests/SslStreamSniTest.cs +++ b/src/libraries/System.Net.Security/tests/FunctionalTests/SslStreamSniTest.cs @@ -9,6 +9,7 @@ using System.Threading; using System.Threading.Tasks; using Xunit; +using Microsoft.DotNet.XUnitExtensions.Attributes; namespace System.Net.Security.Tests { @@ -138,6 +139,7 @@ public async Task SslStream_ServerCallbackNotSet_UsesLocalCertificateSelection(s [Fact] [SkipOnCoreClr("System.Net.Tests are flaky and/or long running: https://github.com/dotnet/runtime/issues/131")] + [SkipOnMono("System.Net.Tests are flaky and/or long running: https://github.com/dotnet/runtime/issues/131")] public async Task SslStream_NoSniFromClient_CallbackReturnsNull() { await WithVirtualConnection(async (server, client) => diff --git a/src/libraries/System.Net.Sockets/tests/FunctionalTests/AssemblyInfo.cs b/src/libraries/System.Net.Sockets/tests/FunctionalTests/AssemblyInfo.cs index 282c71ecae151..fe9200ef2ee8b 100644 --- a/src/libraries/System.Net.Sockets/tests/FunctionalTests/AssemblyInfo.cs +++ b/src/libraries/System.Net.Sockets/tests/FunctionalTests/AssemblyInfo.cs @@ -3,5 +3,7 @@ // See the LICENSE file in the project root for more information. using Xunit; +using Microsoft.DotNet.XUnitExtensions.Attributes; [assembly: SkipOnCoreClr("System.Net.Tests are flaky and/or long running: https://github.com/dotnet/runtime/issues/131")] +[assembly: SkipOnMono("System.Net.Tests are flaky and/or long running: https://github.com/dotnet/runtime/issues/131")]