Do not run hostname tests on macOS
This commit is contained in:
parent
9f03b0acff
commit
522088b6be
|
|
@ -4,6 +4,7 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Net;
|
using System.Net;
|
||||||
using System.Net.Sockets;
|
using System.Net.Sockets;
|
||||||
|
using System.Runtime.InteropServices;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Microsoft.AspNetCore.Testing;
|
using Microsoft.AspNetCore.Testing;
|
||||||
|
|
||||||
|
|
@ -30,6 +31,12 @@ namespace Microsoft.AspNetCore.Server.Kestrel.FunctionalTests
|
||||||
|
|
||||||
private async Task<bool> HostNameIsReachable()
|
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
|
try
|
||||||
{
|
{
|
||||||
_hostname = Dns.GetHostName();
|
_hostname = Dns.GetHostName();
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue