Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve test coverage for scheduler component #4175

Closed
aldettinger opened this issue Oct 12, 2022 · 9 comments
Closed

Improve test coverage for scheduler component #4175

aldettinger opened this issue Oct 12, 2022 · 9 comments
Assignees

Comments

@aldettinger
Copy link
Contributor

No description provided.

@aldettinger
Copy link
Contributor Author

@svkcemk We generally create a ticket unless this is very trivial changes.
The ticket can be referenced in the commit by including "#4175" in the comment.

For traceability purpose, let's state that the PR was #4133 and the commit merged to main is this one:
d72e4fb

The PR has been labelled with backport_2.13.x, so it will be present in next 2.13.x release, probably 2.13.1.

From there @svkcemk, is there any work left in this ticket, like deleting a useless branch, update some docs or opening any follow up issues ? If not, we gonna set the milestone and close this issue.

@jamesnetherton Note that I'm not able to assign this ticket to souvik. Is there anything to tune in the repository ?

@jamesnetherton
Copy link
Contributor

@jamesnetherton Note that I'm not able to assign this ticket to souvik.

Me neither. Pretty sure I could in the past though.....

@jamesnetherton
Copy link
Contributor

Actually, I think for it to work, the user has to interact with the issue. So if @svkcemk adds a comment, I think he will show up in the assignee list.

@svkcemk
Copy link
Contributor

svkcemk commented Oct 13, 2022

@aldettinger please keep it open I am going to raise another PR to add tests for : forcing scheduler to be idle

@jamesnetherton
Copy link
Contributor

Thought I'd report this here. There may be some flakiness with SchedulerTest.testDelay. I noticed it failed on a recent CI run.

2022-10-14T05:47:48.2823783Z [INFO] Running org.apache.camel.quarkus.component.scheduler.it.SchedulerTest
2022-10-14T05:47:55.2012641Z 2022-10-14 05:47:55,097 WARN  [io.qua.arc.dep.SplitPackageProcessor] (build-90) Detected a split package usage which is considered a bad practice and should be avoided. Following packages were detected in multiple archives: 
2022-10-14T05:47:55.2014064Z - "org.apache.camel.vault" found in [org.apache.camel:camel-api::jar, org.apache.camel:camel-main::jar]
2022-10-14T05:47:56.5113169Z 2022-10-14 05:47:56,498 WARN  [io.qua.config] (main) Unrecognized configuration key "quarkus.https.test-port" was provided; it will be ignored; verify that the dependency extension for this configuration is set or that you did not make a typo
2022-10-14T05:47:56.5114957Z 2022-10-14 05:47:56,507 WARN  [io.qua.config] (main) Unrecognized configuration key "quarkus.version" was provided; it will be ignored; verify that the dependency extension for this configuration is set or that you did not make a typo
2022-10-14T05:47:57.1850153Z 2022-10-14 05:47:57,184 INFO  [org.apa.cam.qua.cor.CamelBootstrapRecorder] (main) Bootstrap runtime: org.apache.camel.quarkus.main.CamelMainRuntime
2022-10-14T05:47:57.1888123Z 2022-10-14 05:47:57,187 INFO  [org.apa.cam.mai.MainSupport] (main) Apache Camel (Main) 3.19.0 is starting
2022-10-14T05:47:57.4813683Z 2022-10-14 05:47:57,480 INFO  [org.apa.cam.imp.eng.AbstractCamelContext] (main) Apache Camel 3.19.0 (camel-1) is starting
2022-10-14T05:47:57.5587645Z 2022-10-14 05:47:57,556 INFO  [org.apa.cam.imp.eng.AbstractCamelContext] (main) Routes startup (started:5)
2022-10-14T05:47:57.5589236Z 2022-10-14 05:47:57,556 INFO  [org.apa.cam.imp.eng.AbstractCamelContext] (main)     Started route1 (scheduler://withInitialDelay)
2022-10-14T05:47:57.5590442Z 2022-10-14 05:47:57,556 INFO  [org.apa.cam.imp.eng.AbstractCamelContext] (main)     Started route2 (scheduler://withDelay)
2022-10-14T05:47:57.5599730Z 2022-10-14 05:47:57,556 INFO  [org.apa.cam.imp.eng.AbstractCamelContext] (main)     Started route3 (scheduler://useFixedDelay)
2022-10-14T05:47:57.5600970Z 2022-10-14 05:47:57,556 INFO  [org.apa.cam.imp.eng.AbstractCamelContext] (main)     Started route4 (scheduler://withDelayRepeat)
2022-10-14T05:47:57.5601830Z 2022-10-14 05:47:57,556 INFO  [org.apa.cam.imp.eng.AbstractCamelContext] (main)     Started route5 (scheduler://greedy)
2022-10-14T05:47:57.5602943Z 2022-10-14 05:47:57,556 INFO  [org.apa.cam.imp.eng.AbstractCamelContext] (main) Apache Camel 3.19.0 (camel-1) started in 216ms (build:0ms init:140ms start:76ms)
2022-10-14T05:47:57.8276605Z 2022-10-14 05:47:57,825 INFO  [io.quarkus] (main) camel-quarkus-integration-test-scheduler 2.14.0-SNAPSHOT on JVM (powered by Quarkus 999-SNAPSHOT) started in 4.845s. Listening on: http://localhost:40433
2022-10-14T05:47:57.8277619Z 2022-10-14 05:47:57,825 INFO  [io.quarkus] (main) Profile test activated. 
2022-10-14T05:47:57.8278788Z 2022-10-14 05:47:57,826 INFO  [io.quarkus] (main) Installed features: [camel-core, camel-scheduler, cdi, resteasy, smallrye-context-propagation, vertx]
2022-10-14T05:48:01.6116884Z [ERROR] Tests run: 5, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 13.325 s <<< FAILURE! - in org.apache.camel.quarkus.component.scheduler.it.SchedulerTest
2022-10-14T05:48:01.6121316Z [ERROR] testDelay  Time elapsed: 3.139 s  <<< ERROR!
2022-10-14T05:48:01.6122178Z org.awaitility.core.ConditionTimeoutException: Condition with org.apache.camel.quarkus.component.scheduler.it.SchedulerTest was not fulfilled within 2 seconds.
2022-10-14T05:48:01.6123130Z 	at org.awaitility.core.ConditionAwaiter.await(ConditionAwaiter.java:167)
2022-10-14T05:48:01.6123882Z 	at org.awaitility.core.CallableCondition.await(CallableCondition.java:78)
2022-10-14T05:48:01.6124509Z 	at org.awaitility.core.CallableCondition.await(CallableCondition.java:26)
2022-10-14T05:48:01.6125148Z 	at org.awaitility.core.ConditionFactory.until(ConditionFactory.java:985)
2022-10-14T05:48:01.6125843Z 	at org.awaitility.core.ConditionFactory.until(ConditionFactory.java:954)
2022-10-14T05:48:01.6128088Z 	at org.apache.camel.quarkus.component.scheduler.it.SchedulerTest.testDelay(SchedulerTest.java:40)

@svkcemk
Copy link
Contributor

svkcemk commented Oct 14, 2022

Thanks @jamesnetherton checking..

@svkcemk
Copy link
Contributor

svkcemk commented Oct 14, 2022

Not seeing this in local machine may be we can use a longer delay/timeout to test delay scheduler, what do you think ?

@aldettinger
Copy link
Contributor Author

aldettinger commented Oct 14, 2022 via email

@jamesnetherton
Copy link
Contributor

I can replicate it consistently when running in a Docker container with restricted memory / CPU.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants