james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From adup...@apache.org
Subject [11/17] james-project git commit: JAMES-2489 Decrease delay for connection retry in RabbitMQ
Date Mon, 05 Nov 2018 10:52:14 GMT
JAMES-2489 Decrease delay for connection retry in RabbitMQ

This created long retries upon RabbitMQ healthCheck test.

Testing time went from 3 min 42 s to 26 s on my machine


Project: http://git-wip-us.apache.org/repos/asf/james-project/repo
Commit: http://git-wip-us.apache.org/repos/asf/james-project/commit/f6d6f57b
Tree: http://git-wip-us.apache.org/repos/asf/james-project/tree/f6d6f57b
Diff: http://git-wip-us.apache.org/repos/asf/james-project/diff/f6d6f57b

Branch: refs/heads/master
Commit: f6d6f57bdb8e121ab9d0caa02d5f6d386a7635ea
Parents: 384d3f8
Author: Benoit Tellier <btellier@linagora.com>
Authored: Thu Nov 1 14:45:55 2018 +0700
Committer: Benoit Tellier <btellier@linagora.com>
Committed: Thu Nov 1 14:45:55 2018 +0700

----------------------------------------------------------------------
 .../org/apache/james/backend/rabbitmq/RabbitMQExtension.java    | 5 +++++
 1 file changed, 5 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/james-project/blob/f6d6f57b/backends-common/rabbitmq/src/test/java/org/apache/james/backend/rabbitmq/RabbitMQExtension.java
----------------------------------------------------------------------
diff --git a/backends-common/rabbitmq/src/test/java/org/apache/james/backend/rabbitmq/RabbitMQExtension.java
b/backends-common/rabbitmq/src/test/java/org/apache/james/backend/rabbitmq/RabbitMQExtension.java
index 0080c95..e7f2889 100644
--- a/backends-common/rabbitmq/src/test/java/org/apache/james/backend/rabbitmq/RabbitMQExtension.java
+++ b/backends-common/rabbitmq/src/test/java/org/apache/james/backend/rabbitmq/RabbitMQExtension.java
@@ -36,6 +36,9 @@ import com.nurkiewicz.asyncretry.AsyncRetryExecutor;
 
 public class RabbitMQExtension implements BeforeAllCallback, BeforeEachCallback, AfterAllCallback,
AfterEachCallback, ParameterResolver {
 
+    private static final int THREE_RETRIES = 3;
+    private static final int ONE_HUNDRED_MILLISECONDS = 100;
+
     private DockerRabbitMQ rabbitMQ;
     private SimpleChannelPool simpleChannelPool;
 
@@ -85,6 +88,8 @@ public class RabbitMQExtension implements BeforeAllCallback, BeforeEachCallback,
             .amqpUri(rabbitMQ.amqpUri())
             .managementUri(rabbitMQ.managementUri())
             .managementCredentials(DEFAULT_MANAGEMENT_CREDENTIAL)
+            .maxRetries(THREE_RETRIES)
+            .minDelay(ONE_HUNDRED_MILLISECONDS)
             .build();
 
         return new RabbitMQConnectionFactory(


---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


Mime
View raw message