Skip to content

Commit

Permalink
Disable System.Net.* tests on Mono that are also disabled on CoreCLR (#…
Browse files Browse the repository at this point in the history
…2318)

Should help with #2316
  • Loading branch information
akoeplinger authored Jan 29, 2020
1 parent 29381aa commit 7365ddb
Show file tree
Hide file tree
Showing 11 changed files with 30 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 { }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)]
Original file line number Diff line number Diff line change
Expand Up @@ -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")]
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
using System.Text;
using System.Threading.Tasks;
using Xunit;
using Microsoft.DotNet.XUnitExtensions.Attributes;

namespace System.Net.Tests
{
Expand Down Expand Up @@ -57,7 +58,8 @@ protected async Task<HttpListenerResponse> 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
{
Expand Down Expand Up @@ -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() ?? "";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down Expand Up @@ -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();
Expand All @@ -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();
Expand Down
4 changes: 3 additions & 1 deletion src/libraries/System.Net.Requests/tests/LoggingTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,16 @@

using System.Diagnostics.Tracing;
using Xunit;
using Microsoft.DotNet.XUnitExtensions.Attributes;

namespace System.Net.Tests
{
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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
using System.Threading;
using System.Threading.Tasks;
using Xunit;
using Microsoft.DotNet.XUnitExtensions.Attributes;

namespace System.Net.Security.Tests
{
Expand Down Expand Up @@ -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) =>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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")]

0 comments on commit 7365ddb

Please sign in to comment.