Skip to content

Commit d6be630

Browse files
authored
Change assertion in IPGlobalProperties_DomainName_ReturnsEmptyStringWhenNotSet (#110070)
Accept "localdomain" as a valid DomainName on Android.
1 parent 9eba6f1 commit d6be630

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/libraries/System.Net.NetworkInformation/tests/FunctionalTests/IPGlobalPropertiesTest.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,10 @@ public async Task GetUnicastAddresses_NotEmpty()
212212
public void IPGlobalProperties_DomainName_ReturnsEmptyStringWhenNotSet()
213213
{
214214
IPGlobalProperties gp = IPGlobalProperties.GetIPGlobalProperties();
215-
Assert.Equal(string.Empty, gp.DomainName);
215+
216+
// [ActiveIssue("https://github.com/dotnet/runtime/issues/109280")]
217+
string expectedDomainName = PlatformDetection.IsAndroid ? "localdomain" : string.Empty;
218+
Assert.Equal(expectedDomainName, gp.DomainName);
216219
}
217220
}
218221
}

0 commit comments

Comments
 (0)