Skip to content

Commit

Permalink
Disable DNS tests failing on Ubuntu 16.04 and Debian 9 (#56296)
Browse files Browse the repository at this point in the history
Disabled tests tracked by #56295
  • Loading branch information
karelz authored Jul 26, 2021
1 parent 513fa6c commit 49d8889
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ public static partial class PlatformDetection
public static bool IsDebian => IsDistroAndVersion("debian");
public static bool IsAlpine => IsDistroAndVersion("alpine");
public static bool IsDebian8 => IsDistroAndVersion("debian", 8);
public static bool IsDebian9 => IsDistroAndVersion("debian", 9);
public static bool IsDebian10 => IsDistroAndVersion("debian", 10);
public static bool IsUbuntu1604 => IsDistroAndVersion("ubuntu", 16, 4);
public static bool IsUbuntu1704 => IsDistroAndVersion("ubuntu", 17, 4);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,11 +108,12 @@ public void DnsObsoleteGetHostByName_IPv6String_ReturnsOnlyGivenIP()
[ActiveIssue("https://github.com/dotnet/runtime/issues/51377", TestPlatforms.iOS | TestPlatforms.tvOS | TestPlatforms.MacCatalyst)]
public void DnsObsoleteGetHostByName_EmptyString_ReturnsHostName()
{
if (PlatformDetection.IsSLES)
if (PlatformDetection.IsSLES || // [ActiveIssue("https://github.com/dotnet/runtime/issues/55271")]
PlatformDetection.IsUbuntu1604 || PlatformDetection.IsDebian9) // [ActiveIssue("https://github.com/dotnet/runtime/issues/56295")]
{
// See https://github.com/dotnet/runtime/issues/55271
throw new SkipTestException("SLES Tests environment is not configured for this test to work.");
throw new SkipTestException("Test environment is not configured for this test to work.");
}

IPHostEntry entry = Dns.GetHostByName("");

// DNS labels should be compared as case insensitive for ASCII characters. See RFC 4343.
Expand All @@ -124,10 +125,10 @@ public void DnsObsoleteGetHostByName_EmptyString_ReturnsHostName()
[ActiveIssue("https://github.com/dotnet/runtime/issues/51377", TestPlatforms.iOS | TestPlatforms.tvOS | TestPlatforms.MacCatalyst)]
public void DnsObsoleteBeginEndGetHostByName_EmptyString_ReturnsHostName()
{
if (PlatformDetection.IsSLES)
if (PlatformDetection.IsSLES || // [ActiveIssue("https://github.com/dotnet/runtime/issues/55271")]
PlatformDetection.IsUbuntu1604 || PlatformDetection.IsDebian9) // [ActiveIssue("https://github.com/dotnet/runtime/issues/56295")]
{
// See https://github.com/dotnet/runtime/issues/55271
throw new SkipTestException("SLES Tests environment is not configured for this test to work.");
throw new SkipTestException("Test environment is not configured for this test to work.");
}

IPHostEntry entry = Dns.EndGetHostByName(Dns.BeginGetHostByName("", null, null));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@ public async Task Dns_GetHostEntryAsync_IPAddress_Ok()
// [ActiveIssue("https://github.com/dotnet/runtime/issues/51377", TestPlatforms.iOS | TestPlatforms.tvOS | TestPlatforms.MacCatalyst)]
!PlatformDetection.IsiOS && !PlatformDetection.IstvOS && !PlatformDetection.IsMacCatalyst &&
// [ActiveIssue("https://github.com/dotnet/runtime/issues/55271")]
!PlatformDetection.IsSLES;
!PlatformDetection.IsSLES &&
// [ActiveIssue("https://github.com/dotnet/runtime/issues/56295")]
!PlatformDetection.IsUbuntu1604 && !PlatformDetection.IsDebian9;

[ConditionalTheory(nameof(GetHostEntryWorks))]
[InlineData("")]
Expand Down

0 comments on commit 49d8889

Please sign in to comment.