-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Quarkus Test runs Scheduled jobs as well . #13057
Comments
/cc @mkouba |
@privatejava You can disable the scheduler when running the tests via I don't think we should disable the scheduler by default for |
How do we disable it for only unit test because I do not want it to run in my CI/CD pipeline. Right now all I do is |
You can use Configuration Profiles, i.e. add |
Describe the bug
When we have any
@Scheduled
jobs in our application eg. @scheduled(every="24h") which just does its job and I have a unit test which just does nothing but do System out will eventually call myScheduled
job .Expected behavior
Unit test should not call
Scheduled
Jobs of the main package.Actual behavior
Calls every Scheduled Jobs available in Quarkus Application .
To Reproduce
Steps to reproduce the behavior:
ScheduleJob
at main package andMyTest
at test packageScheduleJob.java
MyTest.java
Screenshots
(If applicable, add screenshots to help explain your problem.)
Environment (please complete the following information):
uname -a
orver
: Linux ngm-pc 5.4.0-52-generic Arc - add basic BeanManager support #57-Ubuntu SMP Thu Oct 15 10:57:00 UTC 2020 x86_64 x86_64 x86_64 GNU/Linuxjava -version
: Java 11OpenJDK Runtime Environment GraalVM CE 20.1.0 (build 11.0.7+10-jvmci-20.1-b02)
OpenJDK 64-Bit Server VM GraalVM CE 20.1.0 (build 11.0.7+10-jvmci-20.1-b02, mixed mode, sharing)
mvnw --version
orgradlew --version
): Apache Maven 3.6.3 (cecedd343002696d0abb50b32b541b8a6ba2883f)The text was updated successfully, but these errors were encountered: