Disable tests on CoreCLR using new attribute (#261)
authorSantiago Fernandez Madero <safern@microsoft.com>
Wed, 27 Nov 2019 19:02:52 +0000 (11:02 -0800)
committerGitHub <noreply@github.com>
Wed, 27 Nov 2019 19:02:52 +0000 (11:02 -0800)
* Disable tests on CoreCLR using new attribute

* Address PR Feedback

19 files changed:
src/libraries/System.ComponentModel.Composition.Registration/tests/System/ComponentModel/Composition/Registration/RegistrationBuilderAttributedOverrideUnitTests.cs
src/libraries/System.Data.SqlClient/tests/FunctionalTests/AssemblyInfo.cs [new file with mode: 0644]
src/libraries/System.Data.SqlClient/tests/FunctionalTests/System.Data.SqlClient.Tests.csproj
src/libraries/System.Linq.Expressions/tests/AssemblyInfo.cs [new file with mode: 0644]
src/libraries/System.Linq.Expressions/tests/System.Linq.Expressions.Tests.csproj
src/libraries/System.Net.Http/tests/FunctionalTests/AssemblyInfo.cs [new file with mode: 0644]
src/libraries/System.Net.Http/tests/FunctionalTests/System.Net.Http.Functional.Tests.csproj
src/libraries/System.Net.HttpListener/tests/HttpListenerAuthenticationTests.cs
src/libraries/System.Net.HttpListener/tests/HttpListenerContextTests.cs
src/libraries/System.Net.HttpListener/tests/HttpListenerResponseTests.Cookies.cs
src/libraries/System.Net.HttpListener/tests/HttpListenerResponseTests.cs
src/libraries/System.Net.Mail/tests/Functional/SmtpClientTest.cs
src/libraries/System.Net.Requests/tests/LoggingTest.cs
src/libraries/System.Net.Security/tests/FunctionalTests/SslStreamSniTest.cs
src/libraries/System.Net.Sockets/tests/FunctionalTests/AssemblyInfo.cs [new file with mode: 0644]
src/libraries/System.Net.Sockets/tests/FunctionalTests/System.Net.Sockets.Tests.csproj
src/libraries/System.Runtime.Numerics/tests/BigInteger/BigIntegerToStringTests.cs
src/libraries/System.Runtime.Serialization.Formatters/tests/BinaryFormatterTests.cs
src/libraries/System.Text.RegularExpressions/tests/Regex.Match.Tests.cs

diff --git a/src/libraries/System.Data.SqlClient/tests/FunctionalTests/AssemblyInfo.cs b/src/libraries/System.Data.SqlClient/tests/FunctionalTests/AssemblyInfo.cs
new file mode 100644 (file)
index 0000000..abe7673
--- /dev/null
@@ -0,0 +1,7 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+
+using Xunit;
+
+[assembly: SkipOnCoreClr("Timeout in stress tests on Linux/arm32", TestPlatforms.Linux)]
index a72c9b9..4573bf8 100644 (file)
@@ -4,6 +4,7 @@
     <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;netfx-Windows_NT-Debug;netfx-Windows_NT-Release</Configurations>
   </PropertyGroup>
   <ItemGroup>
+    <Compile Include="AssemblyInfo.cs" />
     <Compile Include="AADAccessTokenTest.cs" />
     <Compile Include="CloneTests.cs" />
     <Compile Include="BaseProviderAsyncTest\BaseProviderAsyncTest.cs" />
diff --git a/src/libraries/System.Linq.Expressions/tests/AssemblyInfo.cs b/src/libraries/System.Linq.Expressions/tests/AssemblyInfo.cs
new file mode 100644 (file)
index 0000000..7860b6f
--- /dev/null
@@ -0,0 +1,7 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+
+using Xunit;
+
+[assembly: SkipOnCoreClr("Long running tests: https://github.com/dotnet/coreclr/issues/25269", RuntimeStressTestModes.CheckedRuntime)]
index c99c38e..1dd4394 100644 (file)
@@ -15,6 +15,7 @@
     <AssembliesBeingTested Include="Microsoft.CSharp" />
   </ItemGroup>
   <ItemGroup>
+    <Compile Include="AssemblyInfo.cs" />
     <Compile Include="CompilerTests.cs" />
     <Compile Include="Array\ArrayAccessTests.cs" />
     <Compile Include="Array\ArrayArrayIndexTests.cs" />
diff --git a/src/libraries/System.Net.Http/tests/FunctionalTests/AssemblyInfo.cs b/src/libraries/System.Net.Http/tests/FunctionalTests/AssemblyInfo.cs
new file mode 100644 (file)
index 0000000..282c71e
--- /dev/null
@@ -0,0 +1,7 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+
+using Xunit;
+
+[assembly: SkipOnCoreClr("System.Net.Tests are flaky and/or long running: https://github.com/dotnet/runtime/issues/131")]
index a08d875..c10bedc 100644 (file)
@@ -85,6 +85,7 @@
     <Compile Include="$(CommonTestPath)System\Threading\Tasks\TaskTimeoutExtensions.cs">
       <Link>Common\System\Threading\Tasks\TaskTimeoutExtensions.cs</Link>
     </Compile>
+    <Compile Include="AssemblyInfo.cs" />
     <Compile Include="ByteArrayContentTest.cs" />
     <Compile Include="ChannelBindingAwareContent.cs" />
     <Compile Include="DribbleStream.cs" />
index 2079594..d2e8003 100644 (file)
@@ -13,6 +13,7 @@ using Xunit;
 
 namespace System.Net.Tests
 {
+    [SkipOnCoreClr("System.Net.Tests are inestable")]
     [ConditionalClass(typeof(PlatformDetection), nameof(PlatformDetection.IsNotWindowsNanoServer))] // httpsys component missing in Nano.
     public class HttpListenerAuthenticationTests : IDisposable
     {
index 137bc18..4a54244 100644 (file)
@@ -14,6 +14,7 @@ using Xunit;
 
 namespace System.Net.Tests
 {
+    [SkipOnCoreClr("System.Net.Tests are inestable")]
     [ConditionalClass(typeof(PlatformDetection), nameof(PlatformDetection.IsNotWindowsNanoServer))] // httpsys component missing in Nano.
     public class HttpListenerContextTests : IDisposable
     {
index 3385545..4bcfddc 100644 (file)
@@ -9,6 +9,7 @@ using Xunit;
 
 namespace System.Net.Tests
 {
+    [SkipOnCoreClr("System.Net.Tests are inestable")]
     [ConditionalClass(typeof(PlatformDetection), nameof(PlatformDetection.IsNotWindowsNanoServer))] // httpsys component missing in Nano.
     public class HttpListenerResponseCookiesTests : HttpListenerResponseTestBase
     {
index 83332ff..a77eb07 100644 (file)
@@ -57,6 +57,7 @@ namespace System.Net.Tests
         }
     }
 
+    [SkipOnCoreClr("System.Net.Tests are inestable")]
     [ConditionalClass(typeof(PlatformDetection), nameof(PlatformDetection.IsNotWindowsNanoServer))] // httpsys component missing in Nano.
     public class HttpListenerResponseTests : HttpListenerResponseTestBase
     {
@@ -112,6 +113,7 @@ namespace System.Net.Tests
         [InlineData(" \r \t \n", 123)]
         [InlineData("http://microsoft.com", 155)]
         [InlineData("  http://microsoft.com  ", 155)]
+        [SkipOnCoreClr("System.Net.Tests are inestable")]
         public async Task Redirect_Invoke_SetsRedirectionProperties(string url, int expectedNumberOfBytes)
         {
             string expectedUrl = url?.Trim() ?? "";
index 01558af..4fe0777 100644 (file)
@@ -340,6 +340,7 @@ namespace System.Net.Mail.Tests
         [InlineData("howdydoo")]
         [InlineData("")]
         [InlineData(null)]
+        [SkipOnCoreClr("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();
index f0b52db..4994c18 100644 (file)
@@ -11,6 +11,7 @@ namespace System.Net.Tests
     {
         [Fact]
         [SkipOnTargetFramework(TargetFrameworkMonikers.Mono, "NetEventSource is only part of .NET Core.")]
+        [SkipOnCoreClr("System.Net.Tests are inestable")]
         public void EventSource_ExistsWithCorrectId()
         {
             Type esType = typeof(WebRequest).Assembly.GetType("System.Net.NetEventSource", throwOnError: true, ignoreCase: false);
index 07696a1..f05bdc1 100644 (file)
@@ -137,6 +137,7 @@ namespace System.Net.Security.Tests
         }
 
         [Fact]
+        [SkipOnCoreClr("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
new file mode 100644 (file)
index 0000000..282c71e
--- /dev/null
@@ -0,0 +1,7 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+
+using Xunit;
+
+[assembly: SkipOnCoreClr("System.Net.Tests are flaky and/or long running: https://github.com/dotnet/runtime/issues/131")]
index 8cf503a..2d90539 100644 (file)
@@ -7,6 +7,7 @@
   <ItemGroup>
     <Compile Include="Accept.cs" />
     <Compile Include="AgnosticListenerTest.cs" />
+    <Compile Include="AssemblyInfo.cs" />
     <Compile Include="ArgumentValidationTests.cs" />
     <Compile Include="DisconnectTest.cs" />
     <Compile Include="HandleTest.cs" />
index 2be886c..2e99d07 100644 (file)
@@ -188,6 +188,7 @@ namespace System.Numerics.Tests
         }
 
         [Fact]
+        [SkipOnCoreClr("Long running tests: https://github.com/dotnet/coreclr/issues/22414", TestPlatforms.Linux, RuntimeStressTestModes.CheckedRuntime)]
         public static void RunRegionSpecificStandardFormatToStringTests()
         {
             CultureInfo[] cultures = new CultureInfo[] { new CultureInfo("en-US"), new CultureInfo("en-GB"), new CultureInfo("fr-CA"),
index 31ecb26..b9b0772 100644 (file)
@@ -23,6 +23,7 @@ namespace System.Runtime.Serialization.Formatters.Tests
     {
         // On 32-bit we can't test these high inputs as they cause OutOfMemoryExceptions.
         [ConditionalTheory(typeof(Environment), nameof(Environment.Is64BitProcess))]
+        [SkipOnCoreClr("Long running tests: https://github.com/dotnet/coreclr/issues/20246", RuntimeStressTestModes.CheckedRuntime)]
         [InlineData(2 * 6_584_983 - 2)] // previous limit
         [InlineData(2 * 7_199_369 - 2)] // last pre-computed prime number
         public void SerializeHugeObjectGraphs(int limit)
index 1666c3e..c2f51e0 100644 (file)
@@ -808,6 +808,7 @@ namespace System.Text.RegularExpressions.Tests
         }
 
         [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotArmProcess))] // times out on ARM
+        [SkipOnCoreClr("Long running tests: https://github.com/dotnet/coreclr/issues/18912", RuntimeStressTestModes.JitMinOpts)]
         public void Match_ExcessPrefix()
         {
             RemoteExecutor.Invoke(() =>