Skip to content

Commit

Permalink
Test for !Windows instead excluding several Unix-flavors
Browse files Browse the repository at this point in the history
  • Loading branch information
gfoidl committed Jan 14, 2021
1 parent 89a7c5a commit dd1e245
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public void TryGetAddrInfo_LocalHost(bool justAddresses)
public void TryGetAddrInfo_EmptyHost(bool justAddresses)
{
SocketError error = NameResolutionPal.TryGetAddrInfo("", justAddresses, AddressFamily.Unspecified, out string hostName, out string[] aliases, out IPAddress[] addresses, out int nativeErrorCode);
if (error == SocketError.HostNotFound && (OperatingSystem.IsLinux() || OperatingSystem.IsMacOS()))
if (error == SocketError.HostNotFound && !OperatingSystem.IsWindows())
{
// On Unix, we are not guaranteed to be able to resove the local host. The ability to do so depends on the
// machine configurations, which varies by distro and is often inconsistent.
Expand All @@ -78,7 +78,7 @@ public void TryGetAddrInfo_HostName(bool justAddresses)
Assert.NotNull(hostName);

SocketError error = NameResolutionPal.TryGetAddrInfo(hostName, justAddresses, AddressFamily.Unspecified, out hostName, out string[] aliases, out IPAddress[] addresses, out int nativeErrorCode);
if (error == SocketError.HostNotFound && (OperatingSystem.IsLinux() || OperatingSystem.IsMacOS()))
if (error == SocketError.HostNotFound && !OperatingSystem.IsWindows())
{
// On Unix, we are not guaranteed to be able to resove the local host. The ability to do so depends on the
// machine configurations, which varies by distro and is often inconsistent.
Expand Down Expand Up @@ -289,7 +289,7 @@ public async Task GetAddrInfoAsync_EmptyHost(bool justAddresses)
{
SocketError error = ex.SocketErrorCode;

if (error == SocketError.HostNotFound && (OperatingSystem.IsLinux() || OperatingSystem.IsMacOS()))
if (error == SocketError.HostNotFound && !OperatingSystem.IsWindows())
{
// On Unix, we are not guaranteed to be able to resove the local host. The ability to do so depends on the
// machine configurations, which varies by distro and is often inconsistent.
Expand Down Expand Up @@ -339,7 +339,7 @@ public async Task GetAddrInfoAsync_HostName(bool justAddresses)
{
SocketError error = ex.SocketErrorCode;

if (error == SocketError.HostNotFound && (OperatingSystem.IsLinux() || OperatingSystem.IsMacOS()))
if (error == SocketError.HostNotFound && !OperatingSystem.IsWindows())
{
// On Unix, we are not guaranteed to be able to resove the local host. The ability to do so depends on the
// machine configurations, which varies by distro and is often inconsistent.
Expand Down

0 comments on commit dd1e245

Please sign in to comment.