Skip to content

Commit

Permalink
Fix testResolveIp to make it work in some special environment
Browse files Browse the repository at this point in the history
Motivation:

As "getHostName" may do a reverse name lookup and return a host name based on the system configured name lookup service, testResolveIp may fail in some special environment. See netty#4720

Modifications:

Use getHostAddress instead of getHostName

Result:

testResolveIp works in all environments
  • Loading branch information
windie authored and normanmaurer committed Jan 18, 2016
1 parent 1848e73 commit 9e76b53
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -499,7 +499,7 @@ public void testResolveIp() {
try {
InetAddress address = resolver.resolve("10.0.0.1").syncUninterruptibly().getNow();

assertEquals("10.0.0.1", address.getHostName());
assertEquals("10.0.0.1", address.getHostAddress());
} finally {
resolver.close();
}
Expand Down

0 comments on commit 9e76b53

Please sign in to comment.