JAMES-2544 some tests probably need more time than expected

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

Branch: refs/heads/master
Commit: e4194fddead8f05ff64b71de5d5a585ab7b45863
Parents: 97fa968
Author: Matthieu Baechler <matth...@apache.org>
Authored: Mon Nov 19 17:07:31 2018 +0100
Committer: Matthieu Baechler <matth...@apache.org>
Committed: Wed Feb 6 10:07:09 2019 +0100

----------------------------------------------------------------------
 .../jmap/methods/integration/QuotaMailingTest.java      | 12 ++++++------
 .../jmap/methods/integration/SendMDNMethodTest.java     |  5 ++---
 2 files changed, 8 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/james-project/blob/e4194fdd/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/java/org/apache/james/jmap/methods/integration/QuotaMailingTest.java
----------------------------------------------------------------------
diff --git 
a/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/java/org/apache/james/jmap/methods/integration/QuotaMailingTest.java
 
b/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/java/org/apache/james/jmap/methods/integration/QuotaMailingTest.java
index 7bfde75..b27bcba 100644
--- 
a/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/java/org/apache/james/jmap/methods/integration/QuotaMailingTest.java
+++ 
b/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/java/org/apache/james/jmap/methods/integration/QuotaMailingTest.java
@@ -50,6 +50,8 @@ import org.apache.james.modules.QuotaProbesImpl;
 import org.apache.james.probe.DataProbe;
 import org.apache.james.utils.DataProbeImpl;
 import org.apache.james.utils.JmapGuiceProbe;
+import org.awaitility.Duration;
+import org.awaitility.core.ConditionFactory;
 import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
@@ -65,6 +67,7 @@ public abstract class QuotaMailingTest {
     private static final String BART = "bart@" + DOMAIN;
     private static final String PASSWORD = "password";
     private static final String BOB_PASSWORD = "bobPassword";
+    private static final ConditionFactory WAIT_TWO_MINUTES = 
calmlyAwait.atMost(Duration.TWO_MINUTES);
 
     protected abstract GuiceJamesServer createJmapServer() throws IOException;
 
@@ -107,8 +110,7 @@ public abstract class QuotaMailingTest {
         bartSendMessageToHomer();
         // Homer receives a mail big enough to trigger a configured threshold
 
-        calmlyAwait.atMost(30, TimeUnit.SECONDS)
-            .until(() -> listMessageIdsForAccount(homerAccessToken).size() == 
2);
+        WAIT_TWO_MINUTES.until(() -> 
listMessageIdsForAccount(homerAccessToken).size() == 2);
 
         List<String> ids = listMessageIdsForAccount(homerAccessToken);
         String idString = ids.stream()
@@ -135,13 +137,11 @@ public abstract class QuotaMailingTest {
 
         bartSendMessageToHomer();
         // Homer receives a mail big enough to trigger a 10% configured 
threshold
-        calmlyAwait.atMost(30, TimeUnit.SECONDS)
-            .until(() -> listMessageIdsForAccount(homerAccessToken).size() == 
2);
+        WAIT_TWO_MINUTES.until(() -> 
listMessageIdsForAccount(homerAccessToken).size() == 2);
 
         bartSendMessageToHomer();
         // Homer receives a mail big enough to trigger a 20% configured 
threshold
-        calmlyAwait.atMost(30, TimeUnit.SECONDS)
-            .until(() -> listMessageIdsForAccount(homerAccessToken).size() == 
4);
+        WAIT_TWO_MINUTES.until(() -> 
listMessageIdsForAccount(homerAccessToken).size() == 4);
 
         List<String> ids = listMessageIdsForAccount(homerAccessToken);
         String idString = ids.stream()

http://git-wip-us.apache.org/repos/asf/james-project/blob/e4194fdd/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/java/org/apache/james/jmap/methods/integration/SendMDNMethodTest.java
----------------------------------------------------------------------
diff --git 
a/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/java/org/apache/james/jmap/methods/integration/SendMDNMethodTest.java
 
b/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/java/org/apache/james/jmap/methods/integration/SendMDNMethodTest.java
index 8cd79a3..740c478 100644
--- 
a/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/java/org/apache/james/jmap/methods/integration/SendMDNMethodTest.java
+++ 
b/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/java/org/apache/james/jmap/methods/integration/SendMDNMethodTest.java
@@ -32,7 +32,7 @@ import static org.apache.james.jmap.TestingConstants.DOMAIN;
 import static org.apache.james.jmap.TestingConstants.NAME;
 import static org.apache.james.jmap.TestingConstants.calmlyAwait;
 import static org.apache.james.jmap.TestingConstants.jmapRequestSpecBuilder;
-import static org.awaitility.Duration.ONE_MINUTE;
+import static org.awaitility.Duration.TWO_MINUTES;
 import static org.hamcrest.Matchers.contains;
 import static org.hamcrest.Matchers.containsString;
 import static org.hamcrest.Matchers.equalTo;
@@ -68,7 +68,6 @@ import org.junit.Test;
 import org.junit.experimental.categories.Category;
 
 import com.google.common.collect.Iterables;
-
 import io.restassured.RestAssured;
 import io.restassured.parsing.Parser;
 
@@ -308,7 +307,7 @@ public abstract class SendMDNMethodTest {
             .post("/jmap");
 
         // BART should have received it
-        calmlyAwait.atMost(ONE_MINUTE).until(() -> 
!listMessageIdsInMailbox(bartAccessToken, 
getInboxId(bartAccessToken)).isEmpty());
+        calmlyAwait.atMost(TWO_MINUTES).until(() -> 
!listMessageIdsInMailbox(bartAccessToken, 
getInboxId(bartAccessToken)).isEmpty());
         String bartInboxMessageIds = 
Iterables.getOnlyElement(listMessageIdsInMailbox(bartAccessToken, 
getInboxId(bartAccessToken)));
 
         String firstMessage = ARGUMENTS + ".list[0]";


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

Reply via email to