Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Commit da8f7ea

Browse files
authored
remove instrumentation and move unreliable tests to Outerloop (#35113)
1 parent 5012dfe commit da8f7ea

File tree

1 file changed

+2
-20
lines changed

1 file changed

+2
-20
lines changed

src/System.Net.NameResolution/tests/PalTests/NameResolutionPalTests.cs

Lines changed: 2 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ public void TryGetAddrInfo_LocalHost()
3636
}
3737

3838
[Fact]
39+
[OuterLoop("Uses external server")]
3940
public void TryGetAddrInfo_HostName()
4041
{
4142
string hostName = NameResolutionPal.GetHostName();
@@ -51,16 +52,6 @@ public void TryGetAddrInfo_HostName()
5152
return;
5253
}
5354

54-
// Temporary instrumentation for #32797
55-
if (error == SocketError.TryAgain && Environment.OSVersion.Platform == PlatformID.Unix)
56-
{
57-
error = NameResolutionPal.TryGetAddrInfo(hostName, out hostEntry, out nativeErrorCode);
58-
if (error != SocketError.TryAgain)
59-
{
60-
throw new InvalidOperationException("Name resolution failure preventable with retry");
61-
}
62-
}
63-
6455
Assert.Equal(SocketError.Success, error);
6556
Assert.NotNull(hostEntry);
6657
Assert.NotNull(hostEntry.HostName);
@@ -103,6 +94,7 @@ public void TryGetAddrInfo_LocalHost_TryGetNameInfo()
10394
}
10495

10596
[Fact]
97+
[OuterLoop("Uses external server")]
10698
public void TryGetAddrInfo_HostName_TryGetNameInfo()
10799
{
108100
string hostName = NameResolutionPal.GetHostName();
@@ -119,16 +111,6 @@ public void TryGetAddrInfo_HostName_TryGetNameInfo()
119111
return;
120112
}
121113

122-
// Temporary instrumentation for #32797
123-
if (error == SocketError.TryAgain && Environment.OSVersion.Platform == PlatformID.Unix)
124-
{
125-
error = NameResolutionPal.TryGetAddrInfo(hostName, out hostEntry, out nativeErrorCode);
126-
if (error != SocketError.TryAgain)
127-
{
128-
throw new InvalidOperationException("Name resolution failure preventable with retry");
129-
}
130-
}
131-
132114
Assert.Equal(SocketError.Success, error);
133115
Assert.NotNull(hostEntry);
134116

0 commit comments

Comments
 (0)