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 bt...@apache.org on 2018/07/06 09:27:32 UTC
[06/21] james-project git commit: JAMES-2247 Increase poll delay
where needed for stability
JAMES-2247 Increase poll delay where needed for stability
Project: http://git-wip-us.apache.org/repos/asf/james-project/repo
Commit: http://git-wip-us.apache.org/repos/asf/james-project/commit/4ba29b35
Tree: http://git-wip-us.apache.org/repos/asf/james-project/tree/4ba29b35
Diff: http://git-wip-us.apache.org/repos/asf/james-project/diff/4ba29b35
Branch: refs/heads/master
Commit: 4ba29b35779a66164c76130f72a838286a3a5f1b
Parents: cc8b754
Author: benwa <bt...@linagora.com>
Authored: Fri Jul 6 11:47:45 2018 +0700
Committer: benwa <bt...@linagora.com>
Committed: Fri Jul 6 13:31:09 2018 +0700
----------------------------------------------------------------------
.../integration/ForwardIntegrationTest.java | 21 +++++++++++++++-----
.../integration/SetMessagesMethodTest.java | 5 ++++-
2 files changed, 20 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/james-project/blob/4ba29b35/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/java/org/apache/james/jmap/methods/integration/ForwardIntegrationTest.java
----------------------------------------------------------------------
diff --git a/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/java/org/apache/james/jmap/methods/integration/ForwardIntegrationTest.java b/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/java/org/apache/james/jmap/methods/integration/ForwardIntegrationTest.java
index 1b5550f..d91876a 100644
--- a/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/java/org/apache/james/jmap/methods/integration/ForwardIntegrationTest.java
+++ b/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/java/org/apache/james/jmap/methods/integration/ForwardIntegrationTest.java
@@ -55,6 +55,7 @@ import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
+import com.jayway.awaitility.Duration;
import com.jayway.restassured.RestAssured;
import com.jayway.restassured.specification.RequestSpecification;
@@ -126,7 +127,9 @@ public abstract class ForwardIntegrationTest {
.post("/jmap");
AccessToken bobAccessToken = authenticateJamesUser(baseUri(jmapServer), BOB, BOB_PASSWORD);
- calmlyAwait.atMost(30, TimeUnit.SECONDS).until(() -> isAnyMessageFoundInRecipientsMailboxes(bobAccessToken));
+ calmlyAwait
+ .pollDelay(Duration.FIVE_HUNDRED_MILLISECONDS)
+ .atMost(30, TimeUnit.SECONDS).until(() -> isAnyMessageFoundInRecipientsMailboxes(bobAccessToken));
given()
.header("Authorization", bobAccessToken.serialize())
.body("[[\"getMessageList\", {}, \"#0\"]]")
@@ -173,7 +176,9 @@ public abstract class ForwardIntegrationTest {
.post("/jmap");
AccessToken bobAccessToken = authenticateJamesUser(baseUri(jmapServer), BOB, BOB_PASSWORD);
- calmlyAwait.atMost(30, TimeUnit.SECONDS).until(() -> isAnyMessageFoundInRecipientsMailboxes(bobAccessToken));
+ calmlyAwait
+ .pollDelay(Duration.FIVE_HUNDRED_MILLISECONDS)
+ .atMost(30, TimeUnit.SECONDS).until(() -> isAnyMessageFoundInRecipientsMailboxes(bobAccessToken));
given()
.header("Authorization", bobAccessToken.serialize())
.body("[[\"getMessageList\", {}, \"#0\"]]")
@@ -230,7 +235,9 @@ public abstract class ForwardIntegrationTest {
.post("/jmap");
AccessToken bobAccessToken = authenticateJamesUser(baseUri(jmapServer), BOB, BOB_PASSWORD);
- calmlyAwait.atMost(30, TimeUnit.SECONDS).until(() -> isAnyMessageFoundInRecipientsMailboxes(bobAccessToken));
+ calmlyAwait
+ .pollDelay(Duration.FIVE_HUNDRED_MILLISECONDS)
+ .atMost(30, TimeUnit.SECONDS).until(() -> isAnyMessageFoundInRecipientsMailboxes(bobAccessToken));
given()
.header("Authorization", bobAccessToken.serialize())
.body("[[\"getMessageList\", {}, \"#0\"]]")
@@ -277,7 +284,9 @@ public abstract class ForwardIntegrationTest {
.body(requestBody)
.post("/jmap");
- calmlyAwait.atMost(30, TimeUnit.SECONDS).until(() -> isAnyMessageFoundInRecipientsMailboxes(aliceAccessToken));
+ calmlyAwait
+ .pollDelay(Duration.FIVE_HUNDRED_MILLISECONDS)
+ .atMost(30, TimeUnit.SECONDS).until(() -> isAnyMessageFoundInRecipientsMailboxes(aliceAccessToken));
given()
.header("Authorization", aliceAccessToken.serialize())
.body("[[\"getMessageList\", {}, \"#0\"]]")
@@ -323,7 +332,9 @@ public abstract class ForwardIntegrationTest {
.post("/jmap");
AccessToken bobAccessToken = authenticateJamesUser(baseUri(jmapServer), BOB, BOB_PASSWORD);
- calmlyAwait.atMost(30, TimeUnit.SECONDS).until(() -> isAnyMessageFoundInRecipientsMailboxes(bobAccessToken));
+ calmlyAwait
+ .pollDelay(Duration.FIVE_HUNDRED_MILLISECONDS)
+ .atMost(30, TimeUnit.SECONDS).until(() -> isAnyMessageFoundInRecipientsMailboxes(bobAccessToken));
given()
.header("Authorization", aliceAccessToken.serialize())
http://git-wip-us.apache.org/repos/asf/james-project/blob/4ba29b35/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/java/org/apache/james/jmap/methods/integration/SetMessagesMethodTest.java
----------------------------------------------------------------------
diff --git a/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/java/org/apache/james/jmap/methods/integration/SetMessagesMethodTest.java b/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/java/org/apache/james/jmap/methods/integration/SetMessagesMethodTest.java
index f3cbaa3..24ba7fd 100644
--- a/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/java/org/apache/james/jmap/methods/integration/SetMessagesMethodTest.java
+++ b/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/java/org/apache/james/jmap/methods/integration/SetMessagesMethodTest.java
@@ -122,6 +122,7 @@ import org.junit.Test;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.Lists;
import com.google.common.io.ByteStreams;
+import com.jayway.awaitility.Duration;
import com.jayway.restassured.RestAssured;
import com.jayway.restassured.builder.RequestSpecBuilder;
import com.jayway.restassured.http.ContentType;
@@ -2069,7 +2070,9 @@ public abstract class SetMessagesMethodTest {
.body(moveDraftToOutBox)
.post("/jmap");
- calmlyAwait.atMost(30, TimeUnit.SECONDS).until(() -> isAnyMessageFoundInRecipientsMailboxes(bobAccessToken));
+ calmlyAwait
+ .pollDelay(Duration.FIVE_HUNDRED_MILLISECONDS)
+ .atMost(30, TimeUnit.SECONDS).until(() -> isAnyMessageFoundInRecipientsMailboxes(bobAccessToken));
}
@Test
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org