test/functional/rt_4_cron.rb in ruote-2.2.0 vs test/functional/rt_4_cron.rb in ruote-2.3.0
- old
+ new
@@ -3,12 +3,12 @@
# testing ruote
#
# Wed Oct 28 12:51:04 JST 2009
#
-require File.join(File.dirname(__FILE__), 'base')
-require File.join(File.dirname(__FILE__), 'restart_base')
+require File.expand_path('../base', __FILE__)
+require File.expand_path('../restart_base', __FILE__)
class RtCronTest < Test::Unit::TestCase
include FunctionalBase
include RestartBase
@@ -21,44 +21,44 @@
cron '* * * * * *' do # every second
echo '${v:text}'
end
end
- @engine.variables['text'] = 'pre'
+ @dashboard.variables['text'] = 'pre'
- #noisy
+ #@dashboard.noisy = true
- wfid = @engine.launch(pdef)
+ wfid = @dashboard.launch(pdef)
- wait_for(3)
+ wait_for(5)
- assert_equal 1, @engine.processes.size
- assert_equal 1, @engine.storage.get_many('schedules').size
+ assert_equal 1, @dashboard.processes.size
+ assert_equal 1, @dashboard.storage.get_many('schedules').size
- @engine.shutdown
+ @dashboard.shutdown
# restart...
start_new_engine
- #noisy
+ #@dashboard.noisy = true
- @engine.variables['text'] = 'post'
+ @dashboard.variables['text'] = 'post'
- assert_equal 1, @engine.processes.size
- assert_equal 1, @engine.storage.get_many('schedules').size
+ assert_equal 1, @dashboard.processes.size
+ assert_equal 1, @dashboard.storage.get_many('schedules').size
- wait_for(4)
+ wait_for(5)
assert_match /pre\npost/, @tracer.to_s
- @engine.cancel_process(wfid)
+ @dashboard.cancel_process(wfid)
while msg = wait_for(wfid)
break if msg['action'] == 'terminated'
end
- assert_equal 0, @engine.processes.size
- assert_equal 0, @engine.storage.get_many('schedules').size
+ assert_equal 0, @dashboard.processes.size
+ assert_equal 0, @dashboard.storage.get_many('schedules').size
end
end