[
https://issues.apache.org/jira/browse/ZOOKEEPER-2650?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15769412#comment-15769412
]
ASF GitHub Bot commented on ZOOKEEPER-2650:
-------------------------------------------
Github user rakeshadr commented on a diff in the pull request:
https://github.com/apache/zookeeper/pull/131#discussion_r93579277
--- 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 --
Done
> Test Improvement by adding more QuorumPeer Auth related test cases
> ------------------------------------------------------------------
>
> Key: ZOOKEEPER-2650
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2650
> Project: ZooKeeper
> Issue Type: Test
> Reporter: Rakesh R
> Assignee: Rakesh R
> Fix For: 3.4.10
>
>
> This jira to add more test cases to the ZOOKEEPER-1045 feature.
> Cases:-
> 1) Ensemble with auth enabled Observer.
> 2) Connecting non-auth Observer to auth enabled quorum.
> 3) Quorum re-election with auth enabled servers.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)