0

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.

anujprashar
  • 6,263
  • 7
  • 52
  • 86
  • 1
    I 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
  • 1
    Possible 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

0 Answers0