You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@james.apache.org by bt...@apache.org on 2020/12/05 07:10:22 UTC
[james-project] 15/17: JAMES-3225 fixes flaky RabbitMQEventBusTest
This is an automated email from the ASF dual-hosted git repository.
btellier pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/james-project.git
commit 4a502eed1881c807ea23d45f1aa92d0c2a5f16a9
Author: Jean Helou <jh...@codamens.fr>
AuthorDate: Thu Nov 26 23:06:12 2020 +0100
JAMES-3225 fixes flaky RabbitMQEventBusTest
EventBusConcurrentTestContract.SingleEventBusConcurrentContract#concurrentDispatchShouldDeliverAllEventsToListenersWithSingleEventBus
Before this patch I was able to trigger the bug within 300 executions
After this patch I ran over 2500 executions without triggering the
exception
---
.../org/apache/james/mailbox/events/KeyRegistrationHandler.java | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/mailbox/event/event-rabbitmq/src/main/java/org/apache/james/mailbox/events/KeyRegistrationHandler.java b/mailbox/event/event-rabbitmq/src/main/java/org/apache/james/mailbox/events/KeyRegistrationHandler.java
index db52aa9..f4d1de5 100644
--- a/mailbox/event/event-rabbitmq/src/main/java/org/apache/james/mailbox/events/KeyRegistrationHandler.java
+++ b/mailbox/event/event-rabbitmq/src/main/java/org/apache/james/mailbox/events/KeyRegistrationHandler.java
@@ -118,13 +118,13 @@ class KeyRegistrationHandler {
}
void stop() {
- receiverSubscriber.filter(Predicate.not(Disposable::isDisposed))
- .ifPresent(Disposable::dispose);
- receiver.close();
sender.delete(QueueSpecification.queue(registrationQueue.asString()))
.timeout(TOPOLOGY_CHANGES_TIMEOUT)
.retryWhen(Retry.backoff(retryBackoff.getMaxRetries(), retryBackoff.getFirstBackoff()).jitter(retryBackoff.getJitterFactor()).scheduler(Schedulers.elastic()))
.block();
+ receiverSubscriber.filter(Predicate.not(Disposable::isDisposed))
+ .ifPresent(Disposable::dispose);
+ receiver.close();
}
Mono<Registration> register(MailboxListener.ReactiveMailboxListener listener, RegistrationKey key) {
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For additional commands, e-mail: notifications-help@james.apache.org