Skip to content

Commit f47ef87

Browse files
committed
Disable Bidirection tests on WS2022
1 parent bd369c6 commit f47ef87

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/libraries/Common/tests/TestUtilities/System/PlatformDetection.Windows.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ public static partial class PlatformDetection
2424
public static bool IsWindows8x => IsWindows && GetWindowsVersion() == 6 && (GetWindowsMinorVersion() == 2 || GetWindowsMinorVersion() == 3);
2525
public static bool IsWindows8xOrLater => IsWindowsVersionOrLater(6, 2);
2626
public static bool IsWindows10OrLater => IsWindowsVersionOrLater(10, 0);
27+
public static bool IsWindowsServer2022 => IsWindows && IsNotWindowsNanoServer && GetWindowsVersion() == 10 && GetWindowsMinorVersion() == 0 && GetWindowsBuildVersion() == 20348;
2728
public static bool IsWindowsNanoServer => IsWindows && (IsNotWindowsIoTCore && GetWindowsInstallationType().Equals("Nano Server", StringComparison.OrdinalIgnoreCase));
2829
public static bool IsWindowsServerCore => IsWindows && GetWindowsInstallationType().Equals("Server Core", StringComparison.OrdinalIgnoreCase);
2930
public static int WindowsVersion => IsWindows ? (int)GetWindowsVersion() : -1;

src/libraries/System.Net.Http.WinHttpHandler/tests/FunctionalTests/BidirectionStreamingTest.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ public BidirectionStreamingTest(ITestOutputHelper output) : base(output)
2222

2323
// Build number suggested by the WinHttp team.
2424
// It can be reduced if bidirectional streaming is backported.
25-
public static bool OsSupportsWinHttpBidirectionalStreaming => Environment.OSVersion.Version >= new Version(10, 0, 22357, 0);
25+
public static bool OsSupportsWinHttpBidirectionalStreaming => Environment.OSVersion.Version >= new Version(10, 0, 22357, 0) && PlatformDetection.IsWindowsServer2022;
2626

27-
public static bool TestsEnabled => OsSupportsWinHttpBidirectionalStreaming && PlatformDetection.SupportsAlpn;
27+
public static bool TestsEnabled => OsSupportsWinHttpBidirectionalStreaming && PlatformDetection.SupportsAlpn && !PlatformDetection.IsWindowsServer2022;
2828

2929
public static bool TestsBackwardsCompatibilityEnabled => !OsSupportsWinHttpBidirectionalStreaming && PlatformDetection.SupportsAlpn;
3030

0 commit comments

Comments
 (0)