aldettinger commented on code in PR #4133:
URL: https://github.com/apache/camel-quarkus/pull/4133#discussion_r992280042


##########
integration-test-groups/foundation/scheduler/src/test/java/org/apache/camel/quarkus/component/scheduler/it/SchedulerTest.java:
##########
@@ -28,12 +28,42 @@
 class SchedulerTest {
 
     @Test
-    public void test() throws Exception {
-        // wait until the scheduler has run and return a counter that is > 0
+    public void testInitialDelay() throws Exception {
         await().atMost(5, TimeUnit.SECONDS).until(() -> {
             String body = 
RestAssured.get("/scheduler/get").then().statusCode(200).extract().body().asString();
             return !body.equals("0");
         });
     }
 
+    @Test
+    public void testDelay() throws Exception {
+
+        await().atMost(2, TimeUnit.SECONDS).until(() -> {
+            String body = 
RestAssured.get("/scheduler/get-count").then().statusCode(200).extract().body().asString();
+            return Integer.parseInt(body) > 1;
+        });
+
+        await().atMost(2, TimeUnit.SECONDS).until(() -> {
+            String body = 
RestAssured.get("/scheduler/get-count").then().statusCode(200).extract().body().asString();
+            return Integer.parseInt(body) > 2;
+        });
+    }
+
+    @Test
+    public void testDelayWithRepeat() throws Exception {
+        await().atMost(4, TimeUnit.SECONDS).until(() -> {
+            String body = 
RestAssured.get("/scheduler/get-items").then().statusCode(200).extract().body().asString();
+            return body.split(",").length >= 4;

Review Comment:
   Here, we expect a list of items >= 4. Can't we do that with a simple 
AtomicInteger ?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@camel.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to