smengcl commented on code in PR #8669:
URL: https://github.com/apache/hadoop/pull/8669#discussion_r4100668729
##########
hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/security/TestSecurityUtil.java:
##########
@@ -366,6 +366,14 @@ public void testSocketAddrWithIP() {
verifyServiceAddr(staticHost, "127.0.0.1");
}
+ @Test
+ public void testSocketAddrWithIPv6() throws Exception {
+ SecurityUtil.setTokenServiceUseIp(false);
+ String host = "::1";
+ InetSocketAddress addr = NetUtils.createSocketAddr("[::1]:123");
+ verifyAddress(addr, host, InetAddress.getByName(host).getHostAddress(),
123);
Review Comment:
Done. Static resolution keeps the IPv6 hostname stable across systems, while
the test still verifies both token-service modes
--
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]