Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable System.Net.* tests on Mono that are also disabled on CoreCLR #2318

Merged
merged 1 commit into from
Jan 29, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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")]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These attributes are only about stress modes, right? What stress are we running on mono in ci?

(I still think the attributes need to either be renamed or changed to mean what they say.)

cc: @safern

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SkipOnMono is about disabling on Mono at all because the runtime is not yet complete from my understanding.

But yeah for coreclr I was planning on changing it this week when I get some free time for that.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member Author

@akoeplinger akoeplinger Jan 29, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree that we should replace all usages of SkipOn* that don't use the overload for special situations with ActiveIssue instead.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

correctly the way it's used here would skip on CoreCLR all the time.

Not really. It skips it only if running in a checked CoreLib.

https://github.com/dotnet/arcade/blob/master/src/Microsoft.DotNet.XUnitExtensions/src/Discoverers/SkipOnCoreClrDiscoverer.cs#L34

ActiveIssue will skip for all cases, which we want to avoid as these tests are only long running in Checked CoreCLR and on Mono.

I will update SkipOnCoreCLR to be more clear so that even Checked has to be a flag passed down as a parameter when we want to skip it always when running on a checked CoreLib.

For SkipOnMono we don’t even have stress modes as arguments because I was under the impression we don’t do stress runs on mono runtime for libraries tests and we wanted to use this to skip the test always when running in a mono runtime, which is the equivalent of the current RSP files.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will update SkipOnCoreCLR to be more clear so that even Checked has to be a flag passed down as a parameter when we want to skip it always when running on a checked CoreLib.

Thanks, @safern; I appreciate it. So once you make that change, SkipOnCoreCLR without any flags will mean "always skip this when running on any variant of coreclr", right? So presumably you'll also modify all SkipOnCoreCLR usage then to pass flags, unless we actually want it skipped everywhere?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So once you make that change, SkipOnCoreCLR without any flags will mean "always skip this when running on any variant of coreclr", right?

Right 😄

So presumably you'll also modify all SkipOnCoreCLR usage then to pass flags, unless we actually want it skipped everywhere?

Correct I will do the needed changes in runtime repo to react to that behavior change.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah ok, in that case something else is going on as Mono shouldn't show the significant slowdown that Checked CoreCLR has. Weird.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Opened: dotnet/arcade#4724 for the desired behavior of SkipOnCoreClr

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")]