ssanchozz commented on code in PR #6491:
URL: https://github.com/apache/hadoop/pull/6491#discussion_r1469233706
##########
hadoop-hdfs-project/hadoop-hdfs-rbf/src/test/java/org/apache/hadoop/hdfs/server/federation/router/TestRouterRpcMultiDestination.java:
##########
@@ -475,7 +475,7 @@ public void testCallerContextWithMultiDestinations() throws
IOException {
String auditFlag = "src=" + dirPath.toString();
String clientIpInfo = "clientIp:"
- + InetAddress.getLocalHost().getHostAddress();
+ + InetAddress.getByName("localhost").getHostAddress();
Review Comment:
I've checked on Windows, works just fine. In Java doc there is no a note
that it's Linux only:
https://docs.oracle.com/javase/8/docs/api/java/net/InetAddress.html#getByName-java.lang.String-
Main:
`System.out.println(System.getProperty("os.name"));`
`InetAddress localhost = InetAddress.getByName("localhost");`
`System.out.println(localhost.getHostAddress());`
Output:
`Windows 10`
`127.0.0.1`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]