zookeeper-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [zookeeper] symat commented on a change in pull request #1048: ZOOKEEPER-3188: Improve resilience to network
Date Wed, 09 Oct 2019 08:58:02 GMT
symat commented on a change in pull request #1048: ZOOKEEPER-3188: Improve resilience to network
URL: https://github.com/apache/zookeeper/pull/1048#discussion_r332900576
 
 

 ##########
 File path: zookeeper-server/src/test/java/org/apache/zookeeper/test/ReconfigTest.java
 ##########
 @@ -1152,4 +1171,74 @@ private void assertRemotePeerMXBeanAttributes(QuorumServer qs, String
beanName)
             getAddrPortFromBean(beanName, "QuorumAddress"));
     }
 
+
+    /*
+     * A helper class to parse / compare server address config lines.
+     * Example: server.1=127.0.0.1:11228:11231|127.0.0.1:11230:11229:participant;0.0.0.0:11227
+     */
+    private static class ServerConfigLine {
 
 Review comment:
   I know about this place in `QuorumPeer`: https://github.com/apache/zookeeper/blob/2dcb5e799ec02a2c6a6c7bad80c47169dc095271/zookeeper-server/src/main/java/org/apache/zookeeper/server/quorum/QuorumPeer.java#L240
   
   In my case I want to compare complete server config lines during the test for verification
(without caring the syntactical correctness or order of the actual addresses), so what I need
is a bit different.
   
   It might be nice to create a re-usable helper class for this, but also I don't mind if
this logic gets duplicated in the test code. 
   
   Beside: even nicer would be to use some more extendable config format, like JSON. (but
it is out of the scope here)

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message