We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7fc3da2 commit 06f86cdCopy full SHA for 06f86cd
src/Servers/Kestrel/shared/test/TransportTestHelpers/HostNameIsReachableAttribute.cs
@@ -4,6 +4,7 @@
4
using System;
5
using System.Net;
6
using System.Net.Sockets;
7
+using System.Runtime.InteropServices;
8
using System.Threading.Tasks;
9
using Microsoft.AspNetCore.Testing.xunit;
10
@@ -30,6 +31,12 @@ public bool IsMet
30
31
32
private async Task<bool> HostNameIsReachable()
33
{
34
+ if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
35
+ {
36
+ // Code below is unreliable on macOS and tests fail on that platform.
37
+ return false;
38
+ }
39
+
40
try
41
42
_hostname = Dns.GetHostName();
0 commit comments