-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Fix SimpleScheduler pause functionality #13532
Conversation
Thanks for your pull request! The title of your pull request does not follow our editorial rules. Could you have a look?
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch and thank you for the PR @sultansoy. Do you think we can add a test for this?
We can take inspiration from https://github.com/quarkusio/quarkus/blob/04842681f5f46f3ef4be84921838a2a10bf22ecf/extensions/scheduler/deployment/src/test/java/io/quarkus/scheduler/test/DisabledSchedulerTest.java by enabling quarkus.scheduler.enabled=true
and pausing the scheduler and check that no scheduled method was called.
45c8c1e
to
cbcf737
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a quick note that this needs to be squashed before merging. Please dismiss when done.
...nsions/scheduler/deployment/src/test/java/io/quarkus/scheduler/test/PausedSchedulerTest.java
Outdated
Show resolved
Hide resolved
Add return in SimpleScheduler::checkTriggers method if !running. Unit test for SimpleScheduler::pause functionality Pause and check isRunning returns false and scheduler doesn't trigger CountDownLatch::countDown
63ed5da
to
5bbc400
Compare
Thanks @sultansoy. LGTM |
squashed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work, thanks!
@machi1990 @gsmet sorry, should I retrigger the CI? |
No, it's OK, merged, thanks! |
Fix #13512
Add return in SimpleScheduler::checkTriggers method if !running.