Assert.NotNull(hostEntry.Aliases);
}
- [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotArm64Process))] // [ActiveIssue(32797)]
public void TryGetAddrInfo_HostName()
{
string hostName = NameResolutionPal.GetHostName();
// machine configurations, which varies by distro and is often inconsistent.
return;
}
+
+ // Temporary instrumentation for #32797
+ if (error == SocketError.TryAgain && Environment.OSVersion.Platform == PlatformID.Unix)
+ {
+ error = NameResolutionPal.TryGetAddrInfo(hostName, out hostEntry, out nativeErrorCode);
+ if (error != SocketError.TryAgain)
+ {
+ throw new InvalidOperationException("Name resolution failure preventable with retry");
+ }
+ }
Assert.Equal(SocketError.Success, error);
Assert.NotNull(hostEntry);
Assert.NotNull(name);
}
- [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotArm64Process))] // [ActiveIssue(32797)]
public void TryGetAddrInfo_HostName_TryGetNameInfo()
{
string hostName = NameResolutionPal.GetHostName();
return;
}
+ // Temporary instrumentation for #32797
+ if (error == SocketError.TryAgain && Environment.OSVersion.Platform == PlatformID.Unix)
+ {
+ error = NameResolutionPal.TryGetAddrInfo(hostName, out hostEntry, out nativeErrorCode);
+ if (error != SocketError.TryAgain)
+ {
+ throw new InvalidOperationException("Name resolution failure preventable with retry");
+ }
+ }
+
Assert.Equal(SocketError.Success, error);
Assert.NotNull(hostEntry);