You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2023/08/17 14:15:21 UTC

[camel] branch main updated: Attempt to fix flaky test on slower CI boxes

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

davsclaus pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git


The following commit(s) were added to refs/heads/main by this push:
     new 69615d41cd3 Attempt to fix flaky test on slower CI boxes
69615d41cd3 is described below

commit 69615d41cd32ae627af0fa4c700dd4fedc426960
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Thu Aug 17 16:15:01 2023 +0200

    Attempt to fix flaky test on slower CI boxes
---
 .../camel/processor/aggregator/DistributedTimeoutTest.java       | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/core/camel-core/src/test/java/org/apache/camel/processor/aggregator/DistributedTimeoutTest.java b/core/camel-core/src/test/java/org/apache/camel/processor/aggregator/DistributedTimeoutTest.java
index c519ef5d9a6..7c8c1f165fd 100644
--- a/core/camel-core/src/test/java/org/apache/camel/processor/aggregator/DistributedTimeoutTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/processor/aggregator/DistributedTimeoutTest.java
@@ -24,6 +24,7 @@ import org.apache.camel.Exchange;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.component.mock.MockEndpoint;
 import org.apache.camel.processor.aggregate.MemoryAggregationRepository;
+import org.awaitility.Awaitility;
 import org.junit.jupiter.api.Test;
 
 import static org.awaitility.Awaitility.await;
@@ -72,9 +73,11 @@ public class DistributedTimeoutTest extends AbstractDistributedTest {
         template2.sendBodyAndHeader("direct:start", "B", "id", 123);
         template2.sendBodyAndHeader("direct:start", "C", "id", 123);
 
-        // should complete before timeout
-        mock2.assertIsSatisfied(500);
-        mock.assertIsSatisfied(500);
+        Awaitility.await().untilAsserted(() -> {
+            // should complete before timeout
+            mock2.assertIsSatisfied(500);
+            mock.assertIsSatisfied(500);
+        });
 
         // should have not invoked the timeout method anymore
         assertEquals(1, invoked.get());