You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by ro...@apache.org on 2019/03/07 16:32:52 UTC

[james-project] branch master updated (2d149c3 -> 1d0ed36)

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

rouazana pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/james-project.git.


    from 2d149c3  Merge remote-tracking branch 'mbaechler/MAILET-164'
     new 41ae53d  JAMES-2675 Index all messages from a range, not only the first one
     new 5b6ba76  JAMES-2675 Workaround RabbitMQ slowness to send indexation requests
     new 1d0ed36  JAMES-2675 Add a simple unit test about indexing upon large copies

The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 mailbox/elasticsearch/pom.xml                      |  5 ++++
 mailbox/lucene/pom.xml                             |  5 ++++
 mailbox/scanning-search/pom.xml                    |  5 ++++
 mailbox/store/pom.xml                              |  5 ++++
 .../store/search/ListeningMessageSearchIndex.java  |  6 ++---
 .../search/AbstractMessageSearchIndexTest.java     | 27 ++++++++++++++++++++++
 ....java => CassandraIMAPInconsistenciesTest.java} |  4 ++--
 .../cucumber/GetMessageListMethodStepdefs.java     | 24 +++++++++++++------
 .../methods/integration/cucumber/ImapStepdefs.java |  7 ++++++
 ...ownloadPost.feature => ImapConsistency.feature} | 25 ++++++++++----------
 ...est.java => MemoryIMAPInconsistenciesTest.java} |  5 ++--
 ...t.java => RabbitMQIMAPInconsistenciesTest.java} |  4 ++--
 .../org/apache/james/utils/IMAPMessageReader.java  |  5 ++++
 13 files changed, 98 insertions(+), 29 deletions(-)
 copy server/protocols/jmap-integration-testing/cassandra-jmap-integration-testing/src/test/java/org/apache/james/jmap/cassandra/cucumber/{CassandraIMAPKeywordsInconsistenciesTest.java => CassandraIMAPInconsistenciesTest.java} (92%)
 copy server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/resources/cucumber/{DownloadPost.feature => ImapConsistency.feature} (60%)
 copy server/protocols/jmap-integration-testing/memory-jmap-integration-testing/src/test/java/org/apache/james/jmap/memory/cucumber/{MemoryIMAPKeywordsInconsistenciesTest.java => MemoryIMAPInconsistenciesTest.java} (91%)
 copy server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/java/org/apache/james/jmap/rabbitmq/cucumber/{RabbitMQIMAPKeywordsInconsistenciesTest.java => RabbitMQIMAPInconsistenciesTest.java} (92%)


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


[james-project] 02/03: JAMES-2675 Workaround RabbitMQ slowness to send indexation requests

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rouazana pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/james-project.git

commit 5b6ba76b4faaf54de7cd895f8a1b623c01b05511
Author: Raphael Ouazana <ra...@linagora.com>
AuthorDate: Wed Mar 6 17:30:46 2019 +0100

    JAMES-2675 Workaround RabbitMQ slowness to send indexation requests
---
 .../cucumber/GetMessageListMethodStepdefs.java     | 24 +++++++++++++++-------
 1 file changed, 17 insertions(+), 7 deletions(-)

diff --git a/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/java/org/apache/james/jmap/methods/integration/cucumber/GetMessageListMethodStepdefs.java b/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/java/org/apache/james/jmap/methods/integration/cucumber/GetMessageListMethodStepdefs.java
index c3b99af..d2e4156 100644
--- a/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/java/org/apache/james/jmap/methods/integration/cucumber/GetMessageListMethodStepdefs.java
+++ b/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/java/org/apache/james/jmap/methods/integration/cucumber/GetMessageListMethodStepdefs.java
@@ -20,9 +20,10 @@
 package org.apache.james.jmap.methods.integration.cucumber;
 
 import static org.apache.james.jmap.TestingConstants.ARGUMENTS;
-import static org.assertj.core.api.Assertions.assertThat;
+import static org.apache.james.jmap.TestingConstants.calmlyAwait;
 
 import java.util.List;
+import java.util.concurrent.TimeUnit;
 
 import javax.inject.Inject;
 
@@ -103,20 +104,29 @@ public class GetMessageListMethodStepdefs {
 
     @Then("^the message list is empty$")
     public void assertEmpty() {
-        assertThat(httpClient.response.getStatusLine().getStatusCode()).isEqualTo(200);
-        assertThat(httpClient.jsonPath.<List<String>>read(ARGUMENTS + ".messageIds")).isEmpty();
+        calmlyAwait
+            .atMost(30, TimeUnit.SECONDS)
+            .until(
+                () -> httpClient.response.getStatusLine().getStatusCode() == 200
+                    && httpClient.jsonPath.<List<String>>read(ARGUMENTS + ".messageIds").isEmpty());
     }
 
     @Then("^the message list has size (\\d+)")
     public void assertSize(int size) {
-        assertThat(httpClient.response.getStatusLine().getStatusCode()).isEqualTo(200);
-        assertThat(httpClient.jsonPath.<List<String>>read(ARGUMENTS + ".messageIds")).hasSize(size);
+        calmlyAwait
+            .atMost(30, TimeUnit.SECONDS)
+            .until(
+                () -> httpClient.response.getStatusLine().getStatusCode() == 200
+                    && httpClient.jsonPath.<List<String>>read(ARGUMENTS + ".messageIds").size() == size);
     }
 
     @Then("^the message list contains \"([^\"]*)\"")
     public void assertContains(String message) {
         MessageId messageId = messageIdStepdefs.getMessageId(message);
-        assertThat(httpClient.response.getStatusLine().getStatusCode()).isEqualTo(200);
-        assertThat(httpClient.jsonPath.<List<String>>read(ARGUMENTS + ".messageIds")).contains(messageId.serialize());
+        calmlyAwait
+            .atMost(30, TimeUnit.SECONDS)
+            .until(
+                () -> httpClient.response.getStatusLine().getStatusCode() == 200
+                    && httpClient.jsonPath.<List<String>>read(ARGUMENTS + ".messageIds").contains(messageId.serialize()));
     }
 }


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


[james-project] 03/03: JAMES-2675 Add a simple unit test about indexing upon large copies

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rouazana pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/james-project.git

commit 1d0ed3619272c0cf63f678f4b6bc706cb0bfd2e9
Author: Benoit Tellier <bt...@linagora.com>
AuthorDate: Thu Mar 7 14:49:02 2019 +0700

    JAMES-2675 Add a simple unit test about indexing upon large copies
---
 mailbox/elasticsearch/pom.xml                      |  5 ++++
 mailbox/lucene/pom.xml                             |  5 ++++
 mailbox/scanning-search/pom.xml                    |  5 ++++
 mailbox/store/pom.xml                              |  5 ++++
 .../search/AbstractMessageSearchIndexTest.java     | 27 ++++++++++++++++++++++
 5 files changed, 47 insertions(+)

diff --git a/mailbox/elasticsearch/pom.xml b/mailbox/elasticsearch/pom.xml
index 5a78c03..b47a071 100644
--- a/mailbox/elasticsearch/pom.xml
+++ b/mailbox/elasticsearch/pom.xml
@@ -126,6 +126,11 @@
             <artifactId>guava</artifactId>
         </dependency>
         <dependency>
+            <groupId>com.jayway.awaitility</groupId>
+            <artifactId>awaitility</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
             <groupId>com.sun.mail</groupId>
             <artifactId>javax.mail</artifactId>
         </dependency>
diff --git a/mailbox/lucene/pom.xml b/mailbox/lucene/pom.xml
index 5247bd6..8a709a6 100644
--- a/mailbox/lucene/pom.xml
+++ b/mailbox/lucene/pom.xml
@@ -77,6 +77,11 @@
             <artifactId>apache-mime4j-dom</artifactId>
         </dependency>
         <dependency>
+            <groupId>com.jayway.awaitility</groupId>
+            <artifactId>awaitility</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
             <groupId>com.sun.mail</groupId>
             <artifactId>javax.mail</artifactId>
         </dependency>
diff --git a/mailbox/scanning-search/pom.xml b/mailbox/scanning-search/pom.xml
index 5aafd7c..1b51127 100644
--- a/mailbox/scanning-search/pom.xml
+++ b/mailbox/scanning-search/pom.xml
@@ -69,6 +69,11 @@
             <scope>test</scope>
         </dependency>
         <dependency>
+            <groupId>com.jayway.awaitility</groupId>
+            <artifactId>awaitility</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
             <groupId>junit</groupId>
             <artifactId>junit</artifactId>
             <scope>test</scope>
diff --git a/mailbox/store/pom.xml b/mailbox/store/pom.xml
index dbca17c..16dd512 100644
--- a/mailbox/store/pom.xml
+++ b/mailbox/store/pom.xml
@@ -97,6 +97,11 @@
             <artifactId>guava</artifactId>
         </dependency>
         <dependency>
+            <groupId>com.jayway.awaitility</groupId>
+            <artifactId>awaitility</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
             <groupId>com.sun.mail</groupId>
             <artifactId>javax.mail</artifactId>
         </dependency>
diff --git a/mailbox/store/src/test/java/org/apache/james/mailbox/store/search/AbstractMessageSearchIndexTest.java b/mailbox/store/src/test/java/org/apache/james/mailbox/store/search/AbstractMessageSearchIndexTest.java
index e60475e..7a7748a 100644
--- a/mailbox/store/src/test/java/org/apache/james/mailbox/store/search/AbstractMessageSearchIndexTest.java
+++ b/mailbox/store/src/test/java/org/apache/james/mailbox/store/search/AbstractMessageSearchIndexTest.java
@@ -28,6 +28,7 @@ import java.time.ZoneId;
 import java.util.Date;
 import java.util.List;
 import java.util.TimeZone;
+import java.util.concurrent.TimeUnit;
 
 import javax.mail.Flags;
 
@@ -37,8 +38,10 @@ import org.apache.james.mailbox.MessageIdManager;
 import org.apache.james.mailbox.MessageManager;
 import org.apache.james.mailbox.exception.MailboxException;
 import org.apache.james.mailbox.model.ComposedMessageId;
+import org.apache.james.mailbox.model.MailboxId;
 import org.apache.james.mailbox.model.MailboxPath;
 import org.apache.james.mailbox.model.MessageId;
+import org.apache.james.mailbox.model.MessageRange;
 import org.apache.james.mailbox.model.SearchQuery;
 import org.apache.james.mailbox.model.SearchQuery.AddressType;
 import org.apache.james.mailbox.model.SearchQuery.DateResolution;
@@ -59,6 +62,9 @@ import org.junit.Before;
 import org.junit.Test;
 
 import com.google.common.collect.ImmutableList;
+import com.google.common.collect.Iterators;
+import com.jayway.awaitility.Awaitility;
+import com.jayway.awaitility.Duration;
 
 public abstract class AbstractMessageSearchIndexTest {
 
@@ -1453,6 +1459,27 @@ public abstract class AbstractMessageSearchIndexTest {
     }
 
     @Test
+    public void copiedMessageShouldAllBeIndexed() throws Exception {
+        MailboxPath newBoxPath = MailboxPath.forUser(USERNAME, "newBox");
+        MailboxId newBoxId = storeMailboxManager.createMailbox(newBoxPath, session).get();
+
+        storeMailboxManager.copyMessages(MessageRange.all(), inboxMessageManager.getId(), newBoxId, session);
+
+        SearchQuery searchQuery = new SearchQuery();
+
+        StoreMessageManager newBox = (StoreMessageManager) storeMailboxManager.getMailbox(newBoxId, session);
+
+        Awaitility.with()
+            .pollInterval(Duration.ONE_HUNDRED_MILLISECONDS)
+            .and().with()
+            .pollDelay(new Duration(1, TimeUnit.MILLISECONDS))
+            .await()
+            .atMost(30, TimeUnit.SECONDS)
+            .until(
+                () -> Iterators.size(messageSearchIndex.search(session, newBox.getMailboxEntity(), searchQuery)) == 9);
+    }
+
+    @Test
     public void searchShouldRetrieveMailByAttachmentFileName() throws Exception {
         Assume.assumeTrue(messageSearchIndex.getSupportedCapabilities(storeMailboxManager.getSupportedMessageCapabilities())
             .contains(MailboxManager.SearchCapabilities.AttachmentFileName));


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


[james-project] 01/03: JAMES-2675 Index all messages from a range, not only the first one

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rouazana pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/james-project.git

commit 41ae53ddfcee16595afe3632f4e2f1cf8da4d548
Author: Raphael Ouazana <ra...@linagora.com>
AuthorDate: Mon Mar 4 15:41:21 2019 +0100

    JAMES-2675 Index all messages from a range, not only the first one
---
 .../store/search/ListeningMessageSearchIndex.java  |  6 ++--
 .../cucumber/CassandraIMAPInconsistenciesTest.java | 36 ++++++++++++++++++++++
 .../methods/integration/cucumber/ImapStepdefs.java |  7 +++++
 .../resources/cucumber/ImapConsistency.feature     | 36 ++++++++++++++++++++++
 .../cucumber/MemoryIMAPInconsistenciesTest.java    | 33 ++++++++++++++++++++
 .../cucumber/RabbitMQIMAPInconsistenciesTest.java  | 36 ++++++++++++++++++++++
 .../org/apache/james/utils/IMAPMessageReader.java  |  5 +++
 7 files changed, 156 insertions(+), 3 deletions(-)

diff --git a/mailbox/store/src/main/java/org/apache/james/mailbox/store/search/ListeningMessageSearchIndex.java b/mailbox/store/src/main/java/org/apache/james/mailbox/store/search/ListeningMessageSearchIndex.java
index f010e0e..510c4cf 100644
--- a/mailbox/store/src/main/java/org/apache/james/mailbox/store/search/ListeningMessageSearchIndex.java
+++ b/mailbox/store/src/main/java/org/apache/james/mailbox/store/search/ListeningMessageSearchIndex.java
@@ -33,6 +33,7 @@ import org.apache.james.mailbox.store.SessionProvider;
 import org.apache.james.mailbox.store.mail.MessageMapper.FetchType;
 import org.apache.james.mailbox.store.mail.model.Mailbox;
 import org.apache.james.mailbox.store.mail.model.MailboxMessage;
+import org.apache.james.util.streams.Iterators;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -96,9 +97,8 @@ public abstract class ListeningMessageSearchIndex implements MessageSearchIndex,
 
     private Stream<MailboxMessage> retrieveMailboxMessages(MailboxSession session, Mailbox mailbox, MessageRange range) {
         try {
-            return Stream.of(factory.getMessageMapper(session)
-                .findInMailbox(mailbox, range, FetchType.Full, UNLIMITED)
-                .next());
+            return Iterators.toStream(factory.getMessageMapper(session)
+                    .findInMailbox(mailbox, range, FetchType.Full, UNLIMITED));
         } catch (Exception e) {
             LOGGER.error("Could not retrieve message {} in mailbox {}", range.toString(), mailbox.getMailboxId().serialize(), e);
             return Stream.empty();
diff --git a/server/protocols/jmap-integration-testing/cassandra-jmap-integration-testing/src/test/java/org/apache/james/jmap/cassandra/cucumber/CassandraIMAPInconsistenciesTest.java b/server/protocols/jmap-integration-testing/cassandra-jmap-integration-testing/src/test/java/org/apache/james/jmap/cassandra/cucumber/CassandraIMAPInconsistenciesTest.java
new file mode 100644
index 0000000..740ab2b
--- /dev/null
+++ b/server/protocols/jmap-integration-testing/cassandra-jmap-integration-testing/src/test/java/org/apache/james/jmap/cassandra/cucumber/CassandraIMAPInconsistenciesTest.java
@@ -0,0 +1,36 @@
+/****************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one   *
+ * or more contributor license agreements.  See the NOTICE file *
+ * distributed with this work for additional information        *
+ * regarding copyright ownership.  The ASF licenses this file   *
+ * to you under the Apache License, Version 2.0 (the            *
+ * "License"); you may not use this file except in compliance   *
+ * with the License.  You may obtain a copy of the License at   *
+ *                                                              *
+ *   http://www.apache.org/licenses/LICENSE-2.0                 *
+ *                                                              *
+ * Unless required by applicable law or agreed to in writing,   *
+ * software distributed under the License is distributed on an  *
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY       *
+ * KIND, either express or implied.  See the License for the    *
+ * specific language governing permissions and limitations      *
+ * under the License.                                           *
+ ****************************************************************/
+
+package org.apache.james.jmap.cassandra.cucumber;
+
+import org.apache.james.jmap.categories.EnableCucumber;
+import org.junit.experimental.categories.Category;
+import org.junit.runner.RunWith;
+
+import cucumber.api.CucumberOptions;
+import cucumber.api.junit.Cucumber;
+
+@RunWith(Cucumber.class)
+@CucumberOptions(features = "classpath:cucumber/ImapConsistency.feature",
+    glue = {"org.apache.james.jmap.methods.integration", "org.apache.james.jmap.cassandra.cucumber"},
+    tags = {"not @Ignore", "@BasicFeature"},
+    strict = true)
+@Category(EnableCucumber.class)
+public class CassandraIMAPInconsistenciesTest {
+}
diff --git a/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/java/org/apache/james/jmap/methods/integration/cucumber/ImapStepdefs.java b/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/java/org/apache/james/jmap/methods/integration/cucumber/ImapStepdefs.java
index b09b4d8..03194d0 100644
--- a/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/java/org/apache/james/jmap/methods/integration/cucumber/ImapStepdefs.java
+++ b/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/java/org/apache/james/jmap/methods/integration/cucumber/ImapStepdefs.java
@@ -122,6 +122,13 @@ public class ImapStepdefs {
         mainStepdefs.awaitMethod.run();
     }
 
+    @Then("^the user copies via IMAP all messages from mailbox \"([^\"]*)\" to mailbox \"([^\"]*)\"$")
+    public void copyAllMessagesViaIMAPInMailbox(String sourceMailbox, String destinationMailbox) throws Throwable {
+        IMAPMessageReader imapMessageReader = imapConnections.get(sourceMailbox);
+        imapMessageReader.copyAllMessagesInMailboxTo(destinationMailbox);
+        mainStepdefs.awaitMethod.run();
+    }
+
     @Then("^the user has a IMAP RECENT and a notification about (\\d+) new messages on connection for mailbox \"([^\"]*)\"$")
     public void checkNotificationForNewMessageOnActiveConnection(int numberOfMessages, String mailbox) throws Throwable {
         IMAPMessageReader imapMessageReader = imapConnections.get(mailbox);
diff --git a/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/resources/cucumber/ImapConsistency.feature b/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/resources/cucumber/ImapConsistency.feature
new file mode 100644
index 0000000..4354208
--- /dev/null
+++ b/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/resources/cucumber/ImapConsistency.feature
@@ -0,0 +1,36 @@
+#***************************************************************
+# Licensed to the Apache Software Foundation (ASF) under one   *
+# or more contributor license agreements.  See the NOTICE file *
+# distributed with this work for additional information        *
+# regarding copyright ownership.  The ASF licenses this file   *
+# to you under the Apache License, Version 2.0 (the            *
+# "License"); you may not use this file except in compliance   *
+# with the License.  You may obtain a copy of the License at   *
+#                                                              *
+#   http://www.apache.org/licenses/LICENSE-2.0                 *
+#                                                              *
+# Unless required by applicable law or agreed to in writing,   *
+# software distributed under the License is distributed on an  *
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY       *
+# KIND, either express or implied.  See the License for the    *
+# specific language governing permissions and limitations      *
+# under the License.                                           *
+# **************************************************************/
+Feature: Impact of IMAP on JMAP consistency
+
+  Background:
+    Given a domain named "domain.tld"
+    And a connected user "username@domain.tld"
+    And "username@domain.tld" has a mailbox "source"
+    And "username@domain.tld" has a mailbox "trash"
+
+  @BasicFeature
+  Scenario: Two messages copied in one step via IMAP should be seen via JMAP
+    Given the user has a message "m1" in "source" mailbox with subject "My awesome subject 1", content "This is the content 1"
+    And the user has a message "m2" in "source" mailbox with subject "My awesome subject 2", content "This is the content 2"
+    And the user has an open IMAP connection with mailbox "source" selected
+    And the user copies via IMAP all messages from mailbox "source" to mailbox "trash"
+    When "username@domain.tld" asks for message list in mailbox "trash"
+    Then the message list has size 2
+    And the message list contains "m1"
+    And the message list contains "m2"
\ No newline at end of file
diff --git a/server/protocols/jmap-integration-testing/memory-jmap-integration-testing/src/test/java/org/apache/james/jmap/memory/cucumber/MemoryIMAPInconsistenciesTest.java b/server/protocols/jmap-integration-testing/memory-jmap-integration-testing/src/test/java/org/apache/james/jmap/memory/cucumber/MemoryIMAPInconsistenciesTest.java
new file mode 100644
index 0000000..3ff06e2
--- /dev/null
+++ b/server/protocols/jmap-integration-testing/memory-jmap-integration-testing/src/test/java/org/apache/james/jmap/memory/cucumber/MemoryIMAPInconsistenciesTest.java
@@ -0,0 +1,33 @@
+/****************************************************************
+
+ * Licensed to the Apache Software Foundation (ASF) under one   *
+ * or more contributor license agreements.  See the NOTICE file *
+ * distributed with this work for additional information        *
+ * regarding copyright ownership.  The ASF licenses this file   *
+ * to you under the Apache License, Version 2.0 (the            *
+ * "License"); you may not use this file except in compliance   *
+ * with the License.  You may obtain a copy of the License at   *
+ *                                                              *
+ *   http://www.apache.org/licenses/LICENSE-2.0                 *
+ *                                                              *
+ * Unless required by applicable law or agreed to in writing,   *
+ * software distributed under the License is distributed on an  *
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY       *
+ * KIND, either express or implied.  See the License for the    *
+ * specific language governing permissions and limitations      *
+ * under the License.                                           *
+ ****************************************************************/
+
+package org.apache.james.jmap.memory.cucumber;
+
+import org.junit.runner.RunWith;
+
+import cucumber.api.CucumberOptions;
+import cucumber.api.junit.Cucumber;
+
+@RunWith(Cucumber.class)
+@CucumberOptions(features = "classpath:cucumber/ImapConsistency.feature",
+    glue = {"org.apache.james.jmap.methods.integration", "org.apache.james.jmap.memory.cucumber"},
+    strict = true)
+public class MemoryIMAPInconsistenciesTest {
+}
diff --git a/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/java/org/apache/james/jmap/rabbitmq/cucumber/RabbitMQIMAPInconsistenciesTest.java b/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/java/org/apache/james/jmap/rabbitmq/cucumber/RabbitMQIMAPInconsistenciesTest.java
new file mode 100644
index 0000000..5aec9d3
--- /dev/null
+++ b/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/java/org/apache/james/jmap/rabbitmq/cucumber/RabbitMQIMAPInconsistenciesTest.java
@@ -0,0 +1,36 @@
+/****************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one   *
+ * or more contributor license agreements.  See the NOTICE file *
+ * distributed with this work for additional information        *
+ * regarding copyright ownership.  The ASF licenses this file   *
+ * to you under the Apache License, Version 2.0 (the            *
+ * "License"); you may not use this file except in compliance   *
+ * with the License.  You may obtain a copy of the License at   *
+ *                                                              *
+ *   http://www.apache.org/licenses/LICENSE-2.0                 *
+ *                                                              *
+ * Unless required by applicable law or agreed to in writing,   *
+ * software distributed under the License is distributed on an  *
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY       *
+ * KIND, either express or implied.  See the License for the    *
+ * specific language governing permissions and limitations      *
+ * under the License.                                           *
+ ****************************************************************/
+
+package org.apache.james.jmap.rabbitmq.cucumber;
+
+import org.apache.james.jmap.categories.EnableCucumber;
+import org.junit.experimental.categories.Category;
+import org.junit.runner.RunWith;
+
+import cucumber.api.CucumberOptions;
+import cucumber.api.junit.Cucumber;
+
+@RunWith(Cucumber.class)
+@CucumberOptions(features = "classpath:cucumber/ImapConsistency.feature",
+    glue = {"org.apache.james.jmap.methods.integration", "org.apache.james.jmap.rabbitmq.cucumber"},
+    tags = {"not @Ignore", "@BasicFeature"},
+    strict = true)
+@Category(EnableCucumber.class)
+public class RabbitMQIMAPInconsistenciesTest {
+}
diff --git a/server/testing/src/main/java/org/apache/james/utils/IMAPMessageReader.java b/server/testing/src/main/java/org/apache/james/utils/IMAPMessageReader.java
index 7e80983..80d2786 100644
--- a/server/testing/src/main/java/org/apache/james/utils/IMAPMessageReader.java
+++ b/server/testing/src/main/java/org/apache/james/utils/IMAPMessageReader.java
@@ -142,6 +142,11 @@ public class IMAPMessageReader extends ExternalResource implements Closeable, Af
         return imapClient.getReplyString();
     }
 
+    public String copyAllMessagesInMailboxTo(String mailboxName) throws IOException {
+        imapClient.copy("1:*", mailboxName);
+        return imapClient.getReplyString();
+    }
+
     private String readFirstMessageInMailbox(String parameters) throws IOException {
         imapClient.fetch("1:1", parameters);
         return imapClient.getReplyString();


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