james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From btell...@apache.org
Subject [10/14] james-project git commit: JAMES-2551 Fasting up RabbitMQ cluster startup
Date Wed, 10 Oct 2018 08:48:23 GMT
JAMES-2551 Fasting up RabbitMQ cluster startup

 - No need to start App and await node 1, which is never stopper
 - Doing a single big step run in parallel is more efficient than several little parallel
steps (-30 s)


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

Branch: refs/heads/master
Commit: 33bfd0d7aa5bb30c37decee8eee6b80218300540
Parents: 86961f3
Author: Benoit Tellier <btellier@linagora.com>
Authored: Mon Oct 8 13:23:59 2018 +0700
Committer: Benoit Tellier <btellier@linagora.com>
Committed: Wed Oct 10 15:46:36 2018 +0700

----------------------------------------------------------------------
 .../backend/rabbitmq/DockerClusterRabbitMQExtension.java  | 10 ----------
 .../org/apache/james/backend/rabbitmq/DockerRabbitMQ.java |  2 ++
 2 files changed, 2 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/james-project/blob/33bfd0d7/backends-common/rabbitmq/src/test/java/org/apache/james/backend/rabbitmq/DockerClusterRabbitMQExtension.java
----------------------------------------------------------------------
diff --git a/backends-common/rabbitmq/src/test/java/org/apache/james/backend/rabbitmq/DockerClusterRabbitMQExtension.java
b/backends-common/rabbitmq/src/test/java/org/apache/james/backend/rabbitmq/DockerClusterRabbitMQExtension.java
index 811c768..aede7c6 100644
--- a/backends-common/rabbitmq/src/test/java/org/apache/james/backend/rabbitmq/DockerClusterRabbitMQExtension.java
+++ b/backends-common/rabbitmq/src/test/java/org/apache/james/backend/rabbitmq/DockerClusterRabbitMQExtension.java
@@ -64,17 +64,7 @@ public class DockerClusterRabbitMQExtension implements BeforeEachCallback,
After
             Throwing.runnable(() -> rabbitMQ2.join(rabbitMQ1)),
             Throwing.runnable(() -> rabbitMQ3.join(rabbitMQ1)));
 
-        Runnables.runParallel(
-            Throwing.runnable(rabbitMQ1::startApp),
-            Throwing.runnable(rabbitMQ2::startApp),
-            Throwing.runnable(rabbitMQ3::startApp));
-
         cluster = new DockerRabbitMQCluster(rabbitMQ1, rabbitMQ2, rabbitMQ3);
-
-        Runnables.runParallel(
-            rabbitMQ1::waitForReadyness,
-            rabbitMQ2::waitForReadyness,
-            rabbitMQ3::waitForReadyness);
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/james-project/blob/33bfd0d7/backends-common/rabbitmq/src/test/java/org/apache/james/backend/rabbitmq/DockerRabbitMQ.java
----------------------------------------------------------------------
diff --git a/backends-common/rabbitmq/src/test/java/org/apache/james/backend/rabbitmq/DockerRabbitMQ.java
b/backends-common/rabbitmq/src/test/java/org/apache/james/backend/rabbitmq/DockerRabbitMQ.java
index a546939..29add81 100644
--- a/backends-common/rabbitmq/src/test/java/org/apache/james/backend/rabbitmq/DockerRabbitMQ.java
+++ b/backends-common/rabbitmq/src/test/java/org/apache/james/backend/rabbitmq/DockerRabbitMQ.java
@@ -140,6 +140,8 @@ public class DockerRabbitMQ {
     public void join(DockerRabbitMQ rabbitMQ) throws Exception {
         stopApp();
         joinCluster(rabbitMQ);
+        startApp();
+        waitForReadyness();
     }
 
     public void stopApp() throws java.io.IOException, InterruptedException {


---------------------------------------------------------------------
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