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/07/25 10:03:04 UTC

[camel] branch polish updated: Polish

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

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


The following commit(s) were added to refs/heads/polish by this push:
     new abe97fea1f1 Polish
abe97fea1f1 is described below

commit abe97fea1f14392300ba2a08197b48f86fb1e5a5
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Tue Jul 25 12:02:51 2023 +0200

    Polish
---
 .../quartz/SpringScheduledRoutePolicyTest.java           | 16 ++++------------
 1 file changed, 4 insertions(+), 12 deletions(-)

diff --git a/components/camel-quartz/src/test/java/org/apache/camel/routepolicy/quartz/SpringScheduledRoutePolicyTest.java b/components/camel-quartz/src/test/java/org/apache/camel/routepolicy/quartz/SpringScheduledRoutePolicyTest.java
index 1f415bb60ed..40a50180a4e 100644
--- a/components/camel-quartz/src/test/java/org/apache/camel/routepolicy/quartz/SpringScheduledRoutePolicyTest.java
+++ b/components/camel-quartz/src/test/java/org/apache/camel/routepolicy/quartz/SpringScheduledRoutePolicyTest.java
@@ -56,9 +56,7 @@ public abstract class SpringScheduledRoutePolicyTest {
 
         context.getRouteController().stopRoute("testRoute", 1000, TimeUnit.MILLISECONDS);
 
-        Awaitility.await().atMost(5, TimeUnit.SECONDS).untilAsserted(() -> {
-            assertSame(ServiceStatus.Started, context.getRouteController().getRouteStatus("testRoute"));
-        });
+        Awaitility.await().atMost(5, TimeUnit.SECONDS).untilAsserted(() -> assertSame(ServiceStatus.Started, context.getRouteController().getRouteStatus("testRoute")));
 
         context.createProducerTemplate().sendBody("direct:start?timeout=1000", "Ready or not, Here, I come");
 
@@ -71,9 +69,7 @@ public abstract class SpringScheduledRoutePolicyTest {
 
         CamelContext context = startRouteWithPolicy("stopPolicy");
 
-        Awaitility.await().atMost(5, TimeUnit.SECONDS).untilAsserted(() -> {
-            assertSame(ServiceStatus.Stopped, context.getRouteController().getRouteStatus("testRoute"));
-        });
+        Awaitility.await().atMost(5, TimeUnit.SECONDS).untilAsserted(() -> assertSame(ServiceStatus.Stopped, context.getRouteController().getRouteStatus("testRoute")));
 
         assertThrows(CamelExecutionException.class,
                 () -> context.createProducerTemplate().sendBody("direct:start?timeout=1000", "Ready or not, Here, I come"));
@@ -87,9 +83,7 @@ public abstract class SpringScheduledRoutePolicyTest {
         CamelContext context = startRouteWithPolicy("suspendPolicy");
 
         // wait for route to suspend
-        Awaitility.await().atMost(5, TimeUnit.SECONDS).untilAsserted(() -> {
-            assertTrue(ServiceHelper.isSuspended(context.getRoute("testRoute").getConsumer()));
-        });
+        Awaitility.await().atMost(5, TimeUnit.SECONDS).untilAsserted(() -> assertTrue(ServiceHelper.isSuspended(context.getRoute("testRoute").getConsumer())));
 
         assertThrows(CamelExecutionException.class,
                 () -> context.createProducerTemplate().sendBody("direct:start?timeout=1000", "Ready or not, Here, I come"));
@@ -107,9 +101,7 @@ public abstract class SpringScheduledRoutePolicyTest {
 
         ServiceHelper.suspendService(context.getRoute("testRoute").getConsumer());
 
-        Awaitility.await().atMost(5, TimeUnit.SECONDS).untilAsserted(() -> {
-            assertTrue(ServiceHelper.isStarted(context.getRoute("testRoute").getConsumer()));
-        });
+        Awaitility.await().atMost(5, TimeUnit.SECONDS).untilAsserted(() -> assertTrue(ServiceHelper.isStarted(context.getRoute("testRoute").getConsumer())));
 
         context.createProducerTemplate().sendBody("direct:start?timeout=1000", "Ready or not, Here, I come");