test/scheduler_test.rb in openwferu-0.9.9 vs test/scheduler_test.rb in openwferu-0.9.10

- old
+ new

@@ -159,9 +159,30 @@ # done scheduler.sstop end + # + # testing to see if the scheduler immediately executes schedule_in(t) + # requests where t < scheduler.frequency. + # (100ms < 250ms) + # + def test_scheduler_5 + + scheduler = OpenWFE::Scheduler.new() + scheduler.sstart + + touched = false + + scheduler.schedule_in "100" do + touched = true + end + + assert touched + + scheduler.sstop + end + protected class TestSchedulable include OpenWFE::Schedulable