test/functional/eft_28_once.rb in ruote-2.2.0 vs test/functional/eft_28_once.rb in ruote-2.3.0

- old
+ new

@@ -5,11 +5,11 @@ # Mon Oct 26 17:49:55 JST 2009 # # in the train from Friboug to Zurich-Flughafen # -require File.join(File.dirname(__FILE__), 'base') +require File.expand_path('../base', __FILE__) require 'ruote/participant' class EftOnceTest < Test::Unit::TestCase @@ -33,11 +33,11 @@ #noisy assert_trace %w[ in over done. ], pdef - assert_equal 0, @engine.storage.get_many('schedules').size + assert_equal 0, @dashboard.storage.get_many('schedules').size end def test_once_blocking pdef = Ruote.process_definition do @@ -57,11 +57,11 @@ #noisy assert_trace %w[ in over done. ], pdef - assert_equal 0, @engine.storage.get_many('schedules').size + assert_equal 0, @dashboard.storage.get_many('schedules').size end def test_cancel pdef = Ruote.process_definition do @@ -69,46 +69,46 @@ echo 'done.' end #noisy - wfid = @engine.launch(pdef) + wfid = @dashboard.launch(pdef) wait_for(2) - assert_equal 1, @engine.storage.get_many('schedules').size + assert_equal 1, @dashboard.storage.get_many('schedules').size - @engine.cancel_process(wfid) + @dashboard.cancel_process(wfid) wait_for(4) - assert_nil @engine.process(wfid) - assert_equal 0, @engine.storage.get_many('schedules').size + assert_nil @dashboard.process(wfid) + assert_equal 0, @dashboard.storage.get_many('schedules').size end def test_cancel_once_child_is_active pdef = Ruote.process_definition do as_soon_as 'true', :freq => '10d' do alpha end end - @engine.register_participant :alpha, Ruote::StorageParticipant + @dashboard.register_participant :alpha, Ruote::StorageParticipant #noisy - wfid = @engine.launch(pdef) + wfid = @dashboard.launch(pdef) - @engine.wait_for(:alpha) + @dashboard.wait_for(:alpha) - @engine.cancel(wfid) + @dashboard.cancel(wfid) - @engine.wait_for(wfid) + @dashboard.wait_for(wfid) - assert_equal 0, @engine.storage_participant.size - assert_equal 0, @engine.storage.get_many('schedules').size + assert_equal 0, @dashboard.storage_participant.size + assert_equal 0, @dashboard.storage.get_many('schedules').size end def test_once_cron pdef = Ruote.process_definition do @@ -127,9 +127,9 @@ #noisy assert_trace %w[ in over done. ], pdef - assert_equal 0, @engine.storage.get_many('schedules').size + assert_equal 0, @dashboard.storage.get_many('schedules').size end end