zookeeper-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From an...@apache.org
Subject [zookeeper] branch master updated: ZOOKEEPER-3202: Add timing margin to improve reliability of testClientServerSSL()
Date Mon, 14 Jan 2019 14:36:18 GMT
This is an automated email from the ASF dual-hosted git repository.

andor pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/zookeeper.git


The following commit(s) were added to refs/heads/master by this push:
     new 14eefcb  ZOOKEEPER-3202: Add timing margin to improve reliability of testClientServerSSL()
14eefcb is described below

commit 14eefcb7bbd1cc93d4738998ca7343cd9cae8277
Author: Michael Edwards <Michael Edwards>
AuthorDate: Mon Jan 14 07:36:15 2019 -0700

    ZOOKEEPER-3202: Add timing margin to improve reliability of testClientServerSSL()
    
    Allowing just 5 seconds for 3 quorum peers to start and elect a leader is a bit tight,
at least when running 4 test processes in parallel inside a (Linux) Docker container on a
(non-Linux) laptop.  Add up to 10 seconds of extra margin.
    
    Author: Michael Edwards <Michael Edwards>
    
    Reviewers: andor@apache.org
    
    Closes #723 from mkedwards/ZOOKEEPER-3202
---
 .../src/test/java/org/apache/zookeeper/test/ClientSSLTest.java        | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/zookeeper-server/src/test/java/org/apache/zookeeper/test/ClientSSLTest.java b/zookeeper-server/src/test/java/org/apache/zookeeper/test/ClientSSLTest.java
index a09fc89..1504834 100644
--- a/zookeeper-server/src/test/java/org/apache/zookeeper/test/ClientSSLTest.java
+++ b/zookeeper-server/src/test/java/org/apache/zookeeper/test/ClientSSLTest.java
@@ -95,6 +95,10 @@ public class ClientSSLTest extends QuorumPeerTestBase {
             mt[i].start();
         }
 
+        // Add some timing margin for the quorum to elect a leader
+        // (without this margin, timeouts have been observed in parallel test runs)
+        ClientBase.waitForServerUp("127.0.0.1:" + clientPorts[0], 2 * TIMEOUT);
+
         // Servers have been set up. Now go test if secure connection is successful.
         for (int i = 0; i < SERVER_COUNT; i++) {
             Assert.assertTrue("waiting for server " + i + " being up",


Mime
View raw message