[Logo] Terracotta Discussion Forums (LEGACY READ-ONLY ARCHIVE)
  [Search] Search   [Recent Topics] Recent Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
[Expert]
Messages posted by: cwalzl  XML
Profile for cwalzl -> Messages posted by cwalzl [4]
Author Message
Thanks for the info!
That worked beautifully. Thank you!
Hi All,

Any thoughts on best practices for setting up automated tests that use quartz?

For example, if I setup a tests that create a quartz trigger set to fire on every Wednesday and Friday, I'd like to write a test that verifies that my job will execute every Wednesday and Friday, but not the other days.

Another example might be a job that executes every 3 days.

For simpler tests I can just set the trigger start date a few seconds into the future, and then sleep, and then test to see if my job executed. For more complex examples, such as above, do I need to somehow fake out the system time?

Normally, I'd try to abstract out the work Quartz does in my tests, but in code I'm currently working on, a lot of these triggers are created programmatically on the fly, based on custom input types. I'd like to test that the triggers that are built, are valid and will work as intended.

Any ideas?

Thanks,
Chris
Does anyone know if Quartz has any utility classes for retrieving a list of triggers that are scheduled to fire on a given date, or a range of dates?

If not, what do you think the best way to go about doing this is?

Any help would be greatly appreciated!

Thanks,
Chris
 
Profile for cwalzl -> Messages posted by cwalzl [4]
Go to:   
Powered by JForum 2.1.7 © JForum Team