Skip to content

Commit 4177cd5

Browse files
authored
disable tests unstable on Windows 11 (#59135)
1 parent ca74e9a commit 4177cd5

File tree

4 files changed

+29
-2
lines changed

4 files changed

+29
-2
lines changed

src/libraries/System.Net.Security/tests/FunctionalTests/LoggingTest.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
using System.Diagnostics;
66
using System.Diagnostics.Tracing;
77
using Microsoft.DotNet.RemoteExecutor;
8+
using Microsoft.DotNet.XUnitExtensions;
89
using Xunit;
910

1011
namespace System.Net.Security.Tests
@@ -26,6 +27,12 @@ public void EventSource_ExistsWithCorrectId()
2627
[ConditionalFact(typeof(RemoteExecutor), nameof(RemoteExecutor.IsSupported))]
2728
public void EventSource_EventsRaisedAsExpected()
2829
{
30+
if (PlatformDetection.IsWindows10Version22000OrGreater)
31+
{
32+
// [ActiveIssue("https://github.com/dotnet/runtime/issues/58927")]
33+
throw new SkipTestException("Unstable on Windows 11");
34+
}
35+
2936
RemoteExecutor.Invoke(() =>
3037
{
3138
using (var listener = new TestEventListener("Private.InternalDiagnostics.System.Net.Security", EventLevel.Verbose))

src/libraries/System.Net.Security/tests/FunctionalTests/SslStreamNetworkStreamTest.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -413,6 +413,12 @@ await Assert.ThrowsAsync<InvalidOperationException>(()=>
413413
[PlatformSpecific(TestPlatforms.Windows)]
414414
public async Task SslStream_NegotiateClientCertificateAsyncTls13_Succeeds(bool sendClientCertificate)
415415
{
416+
if (PlatformDetection.IsWindows10Version22000OrGreater)
417+
{
418+
// [ActiveIssue("https://github.com/dotnet/runtime/issues/58927")]
419+
throw new SkipTestException("Unstable on Windows 11");
420+
}
421+
416422
bool negotiateClientCertificateCalled = false;
417423
using CancellationTokenSource cts = new CancellationTokenSource();
418424
cts.CancelAfter(TestConfiguration.PassingTestTimeout);

src/libraries/System.Net.Security/tests/FunctionalTests/SslStreamStreamToStreamTest.cs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
using System.Text;
1212
using System.Threading;
1313
using System.Threading.Tasks;
14+
using Microsoft.DotNet.XUnitExtensions;
1415
using Xunit;
1516

1617
namespace System.Net.Security.Tests
@@ -66,11 +67,18 @@ public static IEnumerable<object[]> SslStream_StreamToStream_Authentication_Succ
6667
}
6768
}
6869

69-
[Theory]
70+
[ConditionalTheory]
7071
[MemberData(nameof(SslStream_StreamToStream_Authentication_Success_MemberData))]
7172
[SkipOnPlatform(TestPlatforms.iOS | TestPlatforms.tvOS, "X509 certificate store is not supported on iOS or tvOS.")]
7273
public async Task SslStream_StreamToStream_Authentication_Success(X509Certificate serverCert = null, X509Certificate clientCert = null)
7374
{
75+
76+
if (PlatformDetection.IsWindows10Version22000OrGreater)
77+
{
78+
// [ActiveIssue("https://github.com/dotnet/runtime/issues/58927")]
79+
throw new SkipTestException("Unstable on Windows 11");
80+
}
81+
7482
(Stream stream1, Stream stream2) = TestHelper.GetConnectedStreams();
7583
using (var client = new SslStream(stream1, false, AllowAnyServerCertificate))
7684
using (var server = new SslStream(stream2, false, delegate { return true; }))

src/libraries/System.Net.Security/tests/FunctionalTests/SslStreamSystemDefaultsTest.cs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
using System.Security.Cryptography.X509Certificates;
99
using System.Security.Authentication;
1010
using System.Threading.Tasks;
11-
11+
using Microsoft.DotNet.XUnitExtensions;
1212
using Xunit;
1313

1414
namespace System.Net.Security.Tests
@@ -76,6 +76,12 @@ public static IEnumerable<object[]> OneOrBothUseDefaulData()
7676
[MemberData(nameof(OneOrBothUseDefaulData))]
7777
public async Task ClientAndServer_OneOrBothUseDefault_Ok(SslProtocols? clientProtocols, SslProtocols? serverProtocols)
7878
{
79+
if (PlatformDetection.IsWindows10Version22000OrGreater)
80+
{
81+
// [ActiveIssue("https://github.com/dotnet/runtime/issues/58927")]
82+
throw new SkipTestException("Unstable on Windows 11");
83+
}
84+
7985
using (X509Certificate2 serverCertificate = Configuration.Certificates.GetServerCertificate())
8086
using (X509Certificate2 clientCertificate = Configuration.Certificates.GetClientCertificate())
8187
{

0 commit comments

Comments
 (0)