Skip to content

Commit 6f7daef

Browse files
authored
Skip NegotiateStream_StreamToStream_Authentication_EmptyCredentials_Fails on WinSrv 2025 (#112472)
1 parent 8f02c83 commit 6f7daef

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
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
@@ -26,6 +26,7 @@ public static partial class PlatformDetection
2626
public static bool IsWindows10OrLater => IsWindowsVersionOrLater(10, 0);
2727
public static bool IsWindowsServer2019 => IsWindows && IsNotWindowsNanoServer && GetWindowsVersion() == 10 && GetWindowsMinorVersion() == 0 && GetWindowsBuildVersion() == 17763;
2828
public static bool IsWindowsServer2022 => IsWindows && IsNotWindowsNanoServer && GetWindowsVersion() == 10 && GetWindowsMinorVersion() == 0 && GetWindowsBuildVersion() == 20348;
29+
public static bool IsWindowsServer2025 => IsWindows && IsNotWindowsNanoServer && GetWindowsVersion() == 10 && GetWindowsMinorVersion() == 0 && GetWindowsBuildVersion() == 26100;
2930
public static bool IsWindowsNanoServer => IsWindows && (IsNotWindowsIoTCore && GetWindowsInstallationType().Equals("Nano Server", StringComparison.OrdinalIgnoreCase));
3031
public static bool IsWindowsServerCore => IsWindows && GetWindowsInstallationType().Equals("Server Core", StringComparison.OrdinalIgnoreCase);
3132
public static int WindowsVersion => IsWindows ? (int)GetWindowsVersion() : -1;

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

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,9 @@
99
using System.Text;
1010
using System.Threading;
1111
using System.Threading.Tasks;
12-
12+
using Microsoft.DotNet.XUnitExtensions;
1313
using Xunit;
14+
using Xunit.Abstractions;
1415

1516
namespace System.Net.Security.Tests
1617
{
@@ -192,6 +193,11 @@ public async Task NegotiateStream_StreamToStream_Authentication_EmptyCredentials
192193
{
193194
string targetName = "testTargetName";
194195

196+
if (PlatformDetection.IsWindowsServer2025)
197+
{
198+
throw new SkipTestException("Empty credentials not supported on Server 2025");
199+
}
200+
195201
// Ensure there is no confusion between DefaultCredentials / DefaultNetworkCredentials and a
196202
// NetworkCredential object with empty user, password and domain.
197203
NetworkCredential emptyNetworkCredential = new NetworkCredential("", "", "");

0 commit comments

Comments
 (0)