You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by pp...@apache.org on 2020/09/02 13:34:52 UTC
[camel-quarkus] branch master updated: Fix Google gmail itest to
wait for deletion of mail
This is an automated email from the ASF dual-hosted git repository.
ppalaga pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel-quarkus.git
The following commit(s) were added to refs/heads/master by this push:
new 3d70a48 Fix Google gmail itest to wait for deletion of mail
3d70a48 is described below
commit 3d70a485811081e709a44c16aadb4c68b95da8d5
Author: Lukas Lowinger <ll...@redhat.com>
AuthorDate: Wed Sep 2 13:20:53 2020 +0200
Fix Google gmail itest to wait for deletion of mail
---
.../component/google/it/GoogleComponentsTest.java | 17 ++++++++++++-----
1 file changed, 12 insertions(+), 5 deletions(-)
diff --git a/integration-tests/google/src/test/java/org/apache/camel/quarkus/component/google/it/GoogleComponentsTest.java b/integration-tests/google/src/test/java/org/apache/camel/quarkus/component/google/it/GoogleComponentsTest.java
index ee0ba6f..52df73e 100644
--- a/integration-tests/google/src/test/java/org/apache/camel/quarkus/component/google/it/GoogleComponentsTest.java
+++ b/integration-tests/google/src/test/java/org/apache/camel/quarkus/component/google/it/GoogleComponentsTest.java
@@ -180,11 +180,18 @@ class GoogleComponentsTest {
.body(is(message));
// Delete
- RestAssured.given()
- .queryParam("messageId", messageId)
- .delete("/google-mail/delete")
- .then()
- .statusCode(204);
+ Awaitility.await()
+ .pollDelay(500, TimeUnit.MILLISECONDS)
+ .pollInterval(100, TimeUnit.MILLISECONDS)
+ .atMost(10, TimeUnit.SECONDS).until(() -> {
+ final int code = RestAssured.given()
+ .queryParam("messageId", messageId)
+ .delete("/google-mail/delete")
+ .then()
+ .extract()
+ .statusCode();
+ return code == 204;
+ });
RestAssured.given()
.queryParam("messageId", messageId)