zookeeper-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From h...@apache.org
Subject [zookeeper] branch master updated: ZOOKEEPER-3480: Fix the flaky test in CommitProcessorMetricsTest
Date Mon, 05 Aug 2019 23:49:24 GMT
This is an automated email from the ASF dual-hosted git repository.

hanm 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 8fbeec0  ZOOKEEPER-3480: Fix the flaky test in CommitProcessorMetricsTest
8fbeec0 is described below

commit 8fbeec0db8010461ddeae88d15c3a0b1e59a3c64
Author: Fangmin Lyu <fangmin@apache.org>
AuthorDate: Mon Aug 5 16:49:20 2019 -0700

    ZOOKEEPER-3480: Fix the flaky test in CommitProcessorMetricsTest
    This test is pretty flaky on Jenkins, the previous code doesn't wait all requests being
processed, which may cause flaky.
    Author: Fangmin Lyu <fangmin@apache.org>
    Reviewers: Norbert Kalmar <nkalmar@yahoo.com>, maoling <maoling199210191@sina.com>,
Michael Han <hanm@apache.org>
    Closes #1035 from lvfangmin/ZOOKEEPER-3480
 .../org/apache/zookeeper/server/quorum/CommitProcessorMetricsTest.java  | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/zookeeper-server/src/test/java/org/apache/zookeeper/server/quorum/CommitProcessorMetricsTest.java
index f284052..2bef688 100644
--- a/zookeeper-server/src/test/java/org/apache/zookeeper/server/quorum/CommitProcessorMetricsTest.java
+++ b/zookeeper-server/src/test/java/org/apache/zookeeper/server/quorum/CommitProcessorMetricsTest.java
@@ -377,9 +377,11 @@ public class CommitProcessorMetricsTest extends ZKTestCase {
         //three read requests will be processed in parallel
         commitSeen = new CountDownLatch(1);
+        requestScheduled = new CountDownLatch(3);
         commitProcessor.processRequest(createReadRequest(1l, 2));
         commitProcessor.processRequest(createReadRequest(1l, 3));
         commitProcessor.processRequest(createReadRequest(1l, 4));
+        requestScheduled.await(5, TimeUnit.SECONDS);
         //add a commit request to trigger waitForEmptyPool, which will record number of requests
being proccessed
         poolEmpytied = new CountDownLatch(1);

View raw message