Testing Scheduled code

35 views
Skip to first unread message

Robert Stuttaford

unread,
Aug 20, 2013, 8:00:59 AM8/20/13
to clojure...@googlegroups.com
Is there a way to test scheduling code easily via a simulated system clock?

I want to schedule e.g. two weeks worth of activity at precise minute values, run the scheduler on a 1-second:1-minute ratio, and then query the log files (or Datomic data, in my case) to verify that things happened as they should have.

I plan on using Simulant to model and run these simulations, which already has the notion of a simulated clock, but I'm not sure if it can be used with Quartz/ite in the manner that I intend.

Any thoughts? Thanks folks!

Michael Klishin

unread,
Aug 20, 2013, 8:04:31 AM8/20/13
to clojure...@googlegroups.com

2013/8/20 Robert Stuttaford <robert.s...@gmail.com>

Is there a way to test scheduling code easily via a simulated system clock?

I want to schedule e.g. two weeks worth of activity at precise minute values, run the scheduler on a 1-second:1-minute ratio, and then query the log files (or Datomic data, in my case) to verify that things happened as they should have.
 
There is no, although it's a nice idea.

I plan on using Simulant to model and run these simulations, which already has the notion of a simulated clock, but I'm not sure if it can be used with Quartz/ite in the manner that I intend.

AFAIK you cannot plug a clock implementation into Quartz.
--
MK

http://github.com/michaelklishin
http://twitter.com/michaelklishin

Robert Stuttaford

unread,
Aug 20, 2013, 8:09:39 AM8/20/13
to clojure...@googlegroups.com
Ok. I guess the actual scheduler is rock-solid, so it's just a matter of testing that the code you schedule works, which can be done separately.

Would have been nice to simulate it all, though.
Reply all
Reply to author
Forward
0 new messages