From c515c50411e7bf57f13a13663b52a5d1b127f09c Mon Sep 17 00:00:00 2001 From: Tomas Weinfurt Date: Wed, 8 Sep 2021 19:47:48 -0700 Subject: [PATCH] add W11 test queue (#58570) --- eng/pipelines/libraries/helix-queues-setup.yml | 1 + .../tests/TestUtilities/System/PlatformDetection.Windows.cs | 3 +++ .../tests/System/Diagnostics/Reader/EventLogRecordTests.cs | 3 ++- .../tests/System/Diagnostics/Reader/ProviderMetadataTests.cs | 3 +++ .../src/System/Net/Http/WinHttpHandler.cs | 2 +- 5 files changed, 10 insertions(+), 2 deletions(-) diff --git a/eng/pipelines/libraries/helix-queues-setup.yml b/eng/pipelines/libraries/helix-queues-setup.yml index d5dc31bb599c4..ff9eec765d181 100644 --- a/eng/pipelines/libraries/helix-queues-setup.yml +++ b/eng/pipelines/libraries/helix-queues-setup.yml @@ -141,6 +141,7 @@ jobs: - ${{ if ne(parameters.jobParameters.isFullMatrix, true) }}: - Windows.81.Amd64.Open - Windows.10.Amd64.Server19H1.ES.Open + - Windows.11.Amd64.ClientPre.Open - ${{ if eq(parameters.jobParameters.testScope, 'outerloop') }}: - (Windows.Server.Core.1909.Amd64.Open)windows.10.amd64.server20h1.open@mcr.microsoft.com/dotnet-buildtools/prereqs:windowsservercore-2004-helix-amd64-20200904200251-272704c - ${{ if ne(parameters.jobParameters.runtimeFlavor, 'mono') }}: diff --git a/src/libraries/Common/tests/TestUtilities/System/PlatformDetection.Windows.cs b/src/libraries/Common/tests/TestUtilities/System/PlatformDetection.Windows.cs index 078f29be48e68..d5b2c36e961e0 100644 --- a/src/libraries/Common/tests/TestUtilities/System/PlatformDetection.Windows.cs +++ b/src/libraries/Common/tests/TestUtilities/System/PlatformDetection.Windows.cs @@ -57,6 +57,9 @@ public static partial class PlatformDetection public static bool IsWindows10Version2004Build19573OrGreater => IsWindowsVersionOrLater(10, 0, 19573); + // Windows 11 aka 21H2 + public static bool IsWindows10Version22000OrGreater => IsWindowsVersionOrLater(10, 0, 22000); + public static bool IsWindowsIoTCore { get diff --git a/src/libraries/System.Diagnostics.EventLog/tests/System/Diagnostics/Reader/EventLogRecordTests.cs b/src/libraries/System.Diagnostics.EventLog/tests/System/Diagnostics/Reader/EventLogRecordTests.cs index 6d4f252bdefb4..7808662bcb020 100644 --- a/src/libraries/System.Diagnostics.EventLog/tests/System/Diagnostics/Reader/EventLogRecordTests.cs +++ b/src/libraries/System.Diagnostics.EventLog/tests/System/Diagnostics/Reader/EventLogRecordTests.cs @@ -90,7 +90,8 @@ public void ToXml() [ConditionalFact(typeof(Helpers), nameof(Helpers.SupportsEventLogs))] public void ExceptionOnce() { - if (PlatformDetection.IsWindows7) // Null events in PowerShell log + if (PlatformDetection.IsWindows7 || // Null events in PowerShell log + PlatformDetection.IsWindows10Version22000OrGreater) // ActiveIssue("https://github.com/dotnet/runtime/issues/58829") return; var query = new EventLogQuery("Application", PathType.LogName, "*[System]") { ReverseDirection = true }; var eventLog = new EventLogReader(query, Helpers.GetBookmark("Application", PathType.LogName)); diff --git a/src/libraries/System.Diagnostics.EventLog/tests/System/Diagnostics/Reader/ProviderMetadataTests.cs b/src/libraries/System.Diagnostics.EventLog/tests/System/Diagnostics/Reader/ProviderMetadataTests.cs index 0f7f4511022d6..1a47f63af4322 100644 --- a/src/libraries/System.Diagnostics.EventLog/tests/System/Diagnostics/Reader/ProviderMetadataTests.cs +++ b/src/libraries/System.Diagnostics.EventLog/tests/System/Diagnostics/Reader/ProviderMetadataTests.cs @@ -23,6 +23,9 @@ public void SourceDoesNotExist_Throws() [InlineData(false)] public void ProviderNameTests(bool noProviderName) { + if (PlatformDetection.IsWindows10Version22000OrGreater) // ActiveIssue("https://github.com/dotnet/runtime/issues/58829") + return; + string log = "Application"; string source = "Source_" + nameof(ProviderNameTests); using (var session = new EventLogSession()) diff --git a/src/libraries/System.Net.Http.WinHttpHandler/src/System/Net/Http/WinHttpHandler.cs b/src/libraries/System.Net.Http.WinHttpHandler/src/System/Net/Http/WinHttpHandler.cs index 9fa4c0115e3d4..3b4c247b8b703 100644 --- a/src/libraries/System.Net.Http.WinHttpHandler/src/System/Net/Http/WinHttpHandler.cs +++ b/src/libraries/System.Net.Http.WinHttpHandler/src/System/Net/Http/WinHttpHandler.cs @@ -44,7 +44,7 @@ public class WinHttpHandler : HttpMessageHandler private static readonly StringWithQualityHeaderValue s_gzipHeaderValue = new StringWithQualityHeaderValue("gzip"); private static readonly StringWithQualityHeaderValue s_deflateHeaderValue = new StringWithQualityHeaderValue("deflate"); - private static readonly Lazy s_supportsTls13 = new Lazy(CheckTls13Support()); + private static readonly Lazy s_supportsTls13 = new Lazy(() => CheckTls13Support()); [ThreadStatic] private static StringBuilder? t_requestHeadersBuilder;