james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From btell...@apache.org
Subject [10/22] james-project git commit: MAILBOX-350 Solve double added events firing upon copies
Date Wed, 21 Nov 2018 10:07:20 GMT
MAILBOX-350 Solve double added events firing upon copies


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

Branch: refs/heads/master
Commit: c4007e5862bb6acfa8f5c17b5a7cfb4b5928673d
Parents: e7c9167
Author: Benoit Tellier <btellier@linagora.com>
Authored: Tue Nov 20 14:33:33 2018 +0700
Committer: Benoit Tellier <btellier@linagora.com>
Committed: Wed Nov 21 16:46:46 2018 +0700

----------------------------------------------------------------------
 .../src/test/java/org/apache/james/mailbox/MailboxManagerTest.java | 2 --
 .../java/org/apache/james/mailbox/store/StoreMessageManager.java   | 1 -
 2 files changed, 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/james-project/blob/c4007e58/mailbox/api/src/test/java/org/apache/james/mailbox/MailboxManagerTest.java
----------------------------------------------------------------------
diff --git a/mailbox/api/src/test/java/org/apache/james/mailbox/MailboxManagerTest.java b/mailbox/api/src/test/java/org/apache/james/mailbox/MailboxManagerTest.java
index 460e1d7..59593cb 100644
--- a/mailbox/api/src/test/java/org/apache/james/mailbox/MailboxManagerTest.java
+++ b/mailbox/api/src/test/java/org/apache/james/mailbox/MailboxManagerTest.java
@@ -58,7 +58,6 @@ import org.apache.james.mime4j.dom.Message;
 import org.apache.james.util.concurrency.ConcurrentTestRunner;
 import org.junit.jupiter.api.AfterEach;
 import org.junit.jupiter.api.BeforeEach;
-import org.junit.jupiter.api.Disabled;
 import org.junit.jupiter.api.Nested;
 import org.junit.jupiter.api.Test;
 
@@ -520,7 +519,6 @@ public abstract class MailboxManagerTest {
                 .satisfies(event -> assertThat(event.getUids()).hasSize(1));
         }
 
-        @Disabled("This event is fired two times. Will be addressed in a next commit")
         @Test
         void copyShouldFireAddedEventInTargetMailbox() throws Exception {
             mailboxManager.createMailbox(newPath, session);

http://git-wip-us.apache.org/repos/asf/james-project/blob/c4007e58/mailbox/store/src/main/java/org/apache/james/mailbox/store/StoreMessageManager.java
----------------------------------------------------------------------
diff --git a/mailbox/store/src/main/java/org/apache/james/mailbox/store/StoreMessageManager.java
b/mailbox/store/src/main/java/org/apache/james/mailbox/store/StoreMessageManager.java
index 0c6c156..fc5492f 100644
--- a/mailbox/store/src/main/java/org/apache/james/mailbox/store/StoreMessageManager.java
+++ b/mailbox/store/src/main/java/org/apache/james/mailbox/store/StoreMessageManager.java
@@ -709,7 +709,6 @@ public class StoreMessageManager implements org.apache.james.mailbox.MessageMana
                 .tryAddition(1, originalMessage.getFullContentOctets());
             MessageMetaData data = messageMapper.execute(
                 () -> messageMapper.copy(getMailboxEntity(), originalMessage));
-            dispatcher.added(session, this.getMailboxEntity(), immutableMailboxMessageFactory.from(getMailboxEntity().getMailboxId(),
originalMessage));
             copiedRows.add(data);
         }
         return copiedRows.iterator();


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