Skip to content

Commit

Permalink
Do not run hostname tests on macOS
Browse files Browse the repository at this point in the history
- ports 522088b to this branch
  • Loading branch information
dougbu committed Aug 12, 2020
1 parent 7fc3da2 commit 06f86cd
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
using System;
using System.Net;
using System.Net.Sockets;
using System.Runtime.InteropServices;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Testing.xunit;

Expand All @@ -30,6 +31,12 @@ public bool IsMet

private async Task<bool> HostNameIsReachable()
{
if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
{
// Code below is unreliable on macOS and tests fail on that platform.
return false;
}

try
{
_hostname = Dns.GetHostName();
Expand Down

0 comments on commit 06f86cd

Please sign in to comment.