Github user rgs1 commented on a diff in the pull request:

    https://github.com/apache/zookeeper/pull/131#discussion_r93572708
  
    --- Diff: 
src/java/test/org/apache/zookeeper/server/quorum/auth/QuorumAuthTestBase.java 
---
    @@ -78,15 +78,73 @@ protected String startQuorum(final int serverCount,
             return connectStr.toString();
         }
     
    -    protected int[] startQuorum(final int serverCount, StringBuilder 
connectStr,
    -            Map<String, String> authConfigs, int authServerCount) throws 
IOException {
    +    /**
    +     * Starts the given number of quorum servers and will wait for the 
quorum
    +     * formation.
    +     *
    +     * @param serverCount
    +     *            total server count includes participants + observers
    +     * @param ObserverCount
    +     *            number of observers
    +     * @param authConfigs
    +     *            configuration parameters for authentication
    +     * @param authServerCount
    +     *            number of auth enabled servers
    +     * @return client port for the respective servers
    +     * @throws IOException
    +     */
    +    protected String startQuorum(final int serverCount, int ObserverCount,
    +            Map<String, String> authConfigs, int authServerCount)
    +                    throws IOException {
    +        StringBuilder connectStr = new StringBuilder();
    +        final int[] clientPorts = startQuorum(serverCount, 0, connectStr,
    +                authConfigs, authServerCount);
    +        for (int i = 0; i < serverCount; i++) {
    +            Assert.assertTrue("waiting for server " + i + " being up",
    +                    ClientBase.waitForServerUp("127.0.0.1:" + 
clientPorts[i],
    +                            ClientBase.CONNECTION_TIMEOUT));
    +        }
    +        return connectStr.toString();
    +    }
    +
    +    /**
    +     * Starts the given number of quorum servers and won't wait for the 
quorum
    +     * formation.
    +     *
    +     * @param serverCount
    +     *            total server count includes participants + observers
    +     * @param ObserverCount
    +     *            number of observers
    +     * @param connectStr
    +     *            connection string where clients can used for connection
    +     *            establishment
    +     * @param authConfigs
    +     *            configuration parameters for authentication
    +     * @param authServerCount
    +     *            number of auth enabled servers
    +     * @return client port for the respective servers
    +     * @throws IOException
    +     */
    +    protected int[] startQuorum(final int serverCount, int ObserverCount,
    --- End diff --
    
    ditto about variable ObserverCount being uppercased 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to