You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by GitBox <gi...@apache.org> on 2022/10/11 12:44:16 UTC

[GitHub] [camel-quarkus] aldettinger commented on a diff in pull request #4133: Improve test coverage for scheduler component.

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


##########
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(() -> {

Review Comment:
   Could the body could be > 1 even if withDelay is never called ?
   At the end of the day, we could maybe better to separate `withDelay` and `useFixedDelay`.
   So, 2 distinct tests and 2 distinct atomic integers.
   What do you think ?



-- 
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-unsubscribe@camel.apache.org

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