UnixResolverDnsServerAddressStreamProviderTest failure
Motivation: InetSocketAddress#getHostName() may attempt a reverse lookup which may lead to test failures because the expected address will not match. Modifications: - Use InetSocketAddress#getHostString() which will not attempt any lookups and instead return the original String Result: UnixResolverDnsServerAddressStreamProviderTest is more reliable.
This commit is contained in:
parent
4d51eca218
commit
d040c939e5
@ -111,6 +111,6 @@ public class UnixResolverDnsServerAddressStreamProviderTest {
|
||||
}
|
||||
|
||||
private static void assertHostNameEquals(String expectedHostname, InetSocketAddress next) {
|
||||
assertEquals("unexpected hostname: " + next, expectedHostname, next.getHostName());
|
||||
assertEquals("unexpected hostname: " + next, expectedHostname, next.getHostString());
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user