cwalzl
neo
Joined: 12/01/2009 13:50:31
Messages: 4
Offline
|
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
|