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/06 18:57:10 UTC

[camel] branch quartz created (now 1746f1ca1e5)

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

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


      at 1746f1ca1e5 camel-quartz - Fix flaky test

This branch includes the following new commits:

     new 1746f1ca1e5 camel-quartz - Fix flaky test

The 1 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.



[camel] 01/01: camel-quartz - Fix flaky test

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

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

commit 1746f1ca1e57e24c8f872cdb42fb20c59412720f
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Sun Aug 6 20:56:58 2023 +0200

    camel-quartz - Fix flaky test
---
 .../routepolicy/quartz/CronScheduledRoutePolicyTest.java     | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/components/camel-quartz/src/test/java/org/apache/camel/routepolicy/quartz/CronScheduledRoutePolicyTest.java b/components/camel-quartz/src/test/java/org/apache/camel/routepolicy/quartz/CronScheduledRoutePolicyTest.java
index 3fa7a6f6505..3b62cafe483 100644
--- a/components/camel-quartz/src/test/java/org/apache/camel/routepolicy/quartz/CronScheduledRoutePolicyTest.java
+++ b/components/camel-quartz/src/test/java/org/apache/camel/routepolicy/quartz/CronScheduledRoutePolicyTest.java
@@ -72,8 +72,10 @@ public class CronScheduledRoutePolicyTest {
 
             Awaitility.await().atMost(5, TimeUnit.SECONDS)
                     .untilAsserted(
-                            () -> assertSame(ServiceStatus.Started, context.getRouteController().getRouteStatus("test1")));
-            assertSame(ServiceStatus.Started, context.getRouteController().getRouteStatus("test2"));
+                            () -> {
+                                assertSame(ServiceStatus.Started, context.getRouteController().getRouteStatus("test1"));
+                                assertSame(ServiceStatus.Started, context.getRouteController().getRouteStatus("test2"));
+                            });
             template.sendBody("direct:start1", "Ready or not, Here, I come");
             template.sendBody("direct:start2", "Ready or not, Here, I come");
 
@@ -111,8 +113,10 @@ public class CronScheduledRoutePolicyTest {
 
             Awaitility.await().atMost(5, TimeUnit.SECONDS)
                     .untilAsserted(
-                            () -> assertSame(ServiceStatus.Stopped, context.getRouteController().getRouteStatus("test1")));
-            assertSame(ServiceStatus.Stopped, context.getRouteController().getRouteStatus("test2"));
+                            () -> {
+                                assertSame(ServiceStatus.Stopped, context.getRouteController().getRouteStatus("test1"));
+                                assertSame(ServiceStatus.Stopped, context.getRouteController().getRouteStatus("test2"));
+                            });
         }
     }