You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@curator.apache.org by "kezhuw (via GitHub)" <gi...@apache.org> on 2023/03/29 01:36:39 UTC

[GitHub] [curator] kezhuw commented on a diff in pull request #452: CURATOR-638: Use getHostString() to build connection string in EnsembleTracker even for wildcard addresses

kezhuw commented on code in PR #452:
URL: https://github.com/apache/curator/pull/452#discussion_r1151305511


##########
curator-client/src/main/java/org/apache/curator/utils/Compatibility.java:
##########
@@ -88,7 +88,7 @@ public static boolean hasAddrField()
         return (addrField != null);
     }
 
-    public static String getHostAddress(QuorumPeer.QuorumServer server)
+    public static String getHostString(QuorumPeer.QuorumServer server)

Review Comment:
   I think it is ok for this renaming as `Compatibility` is not intended for external usage .



##########
curator-framework/src/test/java/org/apache/curator/framework/imps/TestReconfiguration.java:
##########
@@ -477,11 +477,35 @@ public void testConfigToConnectionStringNoClientAddrOrPort() throws Exception
     }
 
     @Test
-    public void testHostname() throws Exception
+    public void testConfigToConnectionStringPreservesHostnameNormal() throws Exception
     {
-        String config = "server.1=localhost:2888:3888:participant;localhost:2181";
+        String config = "server.1=server.addr:2888:3888:participant;client.addr:2181";

Review Comment:
   Thank you for correct this, it is my fault in creating this misunderstanding test.



-- 
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: commits-unsubscribe@curator.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org