You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by lh...@apache.org on 2022/04/08 11:38:54 UTC

[pulsar] branch master updated: Flaky tests: reduce SimpleProducerConsumerTest flakiness (#12420)

This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
     new 8757c3acf34 Flaky tests: reduce SimpleProducerConsumerTest flakiness (#12420)
8757c3acf34 is described below

commit 8757c3acf3456af64d3f4f8ffbb3202a6c18e02a
Author: Nicolò Boschi <bo...@gmail.com>
AuthorDate: Fri Apr 8 13:38:43 2022 +0200

    Flaky tests: reduce SimpleProducerConsumerTest flakiness (#12420)
---
 .../org/apache/pulsar/client/api/SimpleProducerConsumerTest.java   | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/pulsar-broker/src/test/java/org/apache/pulsar/client/api/SimpleProducerConsumerTest.java b/pulsar-broker/src/test/java/org/apache/pulsar/client/api/SimpleProducerConsumerTest.java
index fa1505f4d6f..f0e4cca9a25 100644
--- a/pulsar-broker/src/test/java/org/apache/pulsar/client/api/SimpleProducerConsumerTest.java
+++ b/pulsar-broker/src/test/java/org/apache/pulsar/client/api/SimpleProducerConsumerTest.java
@@ -116,9 +116,10 @@ import org.testng.annotations.Test;
 @Test(groups = "flaky")
 public class SimpleProducerConsumerTest extends ProducerConsumerBase {
     private static final Logger log = LoggerFactory.getLogger(SimpleProducerConsumerTest.class);
-    private static final int RECEIVE_TIMEOUT_SECONDS = 3;
-    private static final int RECEIVE_TIMEOUT_SHORT_MILLIS = 100;
-    private static final int RECEIVE_TIMEOUT_MEDIUM_MILLIS = 500;
+    private static final int TIMEOUT_MULTIPLIER = Integer.getInteger("SimpleProducerConsumerTest.receive.timeout.multiplier", 1);
+    private static final int RECEIVE_TIMEOUT_SECONDS = 5 * TIMEOUT_MULTIPLIER;
+    private static final int RECEIVE_TIMEOUT_SHORT_MILLIS = 200 * TIMEOUT_MULTIPLIER;
+    private static final int RECEIVE_TIMEOUT_MEDIUM_MILLIS = 1000 * TIMEOUT_MULTIPLIER;
 
     @BeforeMethod(alwaysRun = true)
     @Override