rjgoyln commented on code in PR #11130:
URL: https://github.com/apache/ozone/pull/11130#discussion_r3885740096


##########
hadoop-hdds/common/src/test/java/org/apache/hadoop/hdds/TestHddsUtils.java:
##########
@@ -102,6 +106,31 @@ void testGetHostPortString() {
     assertEquals("[2001:db8::1]:9858", 
HddsUtils.getHostPortString("[2001:db8::1]", 9858));
   }
 
+  @Test
+  void testGetHostPortStringFromAddress() {
+    assertEquals("1.2.3.4:9858",
+        HddsUtils.getHostPortString(new InetSocketAddress("1.2.3.4", 9858)));

Review Comment:
   You're completely right about the PTR record risk. I've replaced `1.2.3.4` 
with the RFC 5737/3849 reserved TEST-NET addresses (`192.0.2.1` for IPv4 and 
`2001:db8::1` for IPv6) across the new URI tests to prevent any flaky lookups.



-- 
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]

Reply via email to