In spring-boot
I am using @EnableScheduling
and have some methods annotated with @Scheduled(fixedDelay=some interval)
. How I can write test case that check that methods annotated with @Scheduled
are getting invoked at interval specified in @Scheduled(fixedDelay=some interval)
. Is there any method in junit
using which I can write testcase that check working of @Scheduled.
Asked
Active
Viewed 6,288 times
0

anujprashar
- 6,263
- 7
- 52
- 86
-
1I just answered similar question: https://stackoverflow.com/questions/32319640/how-to-test-spring-scheduled/49930983#49930983 Check it out – Maciej Walkowiak Apr 19 '18 at 22:20
-
1Possible duplicate of [How to test Spring @Scheduled](https://stackoverflow.com/questions/32319640/how-to-test-spring-scheduled) – Maciej Walkowiak Apr 19 '18 at 22:20