test/functional/ft_54_patterns.rb in ruote-2.2.0 vs test/functional/ft_54_patterns.rb in ruote-2.3.0
- old
+ new
@@ -3,11 +3,11 @@
# testing ruote
#
# Fri Jan 7 15:13:28 JST 2011
#
-require File.join(File.dirname(__FILE__), 'base')
+require File.expand_path('../base', __FILE__)
#require 'ruote/participant'
class FtPatternsTest < Test::Unit::TestCase
@@ -69,36 +69,38 @@
end
end
def test_18_milestone
- @engine.register do
+ @dashboard.register do
catchall Ruote::StorageParticipant
end
- #@engine.noisy = true
+ #@dashboard.noisy = true
- wfid = @engine.launch(MILESTONE)
+ wfid = @dashboard.launch(MILESTONE)
- @engine.wait_for(:a)
+ @dashboard.wait_for(:a)
- assert_equal({}, @engine.ps(wfid).tags)
+ assert_equal({}, @dashboard.ps(wfid).tags)
- @engine.storage_participant.reply(@engine.storage_participant.first)
+ @dashboard.storage_participant.proceed(@dashboard.storage_participant.first)
- @engine.wait_for(:d)
+ @dashboard.wait_for(:d)
- assert_equal %w[ milestone ], @engine.ps(wfid).tags.collect { |t| t.first }
- assert_equal %w[ b d ], @engine.ps(wfid).position.collect { |pos| pos[1] }
+ assert_equal %w[ milestone ], @dashboard.ps(wfid).tags.collect { |t| t.first }
+ assert_equal %w[ b d ], @dashboard.ps(wfid).position.collect { |pos| pos[1] }
- wi = @engine.storage_participant.by_participant('b').first
- @engine.storage_participant.reply(wi)
+ wi = @dashboard.storage_participant.by_participant('b').first
+ @dashboard.storage_participant.proceed(wi)
- @engine.wait_for(:c)
+ @dashboard.wait_for(:c)
- sleep 0.7 # give some time for the task d to get removed
+ @dashboard.wait_for('dispatch_cancel')
+ @dashboard.wait_for(1)
+ # give some time for the task d to get removed
- assert_equal({}, @engine.ps(wfid).tags)
- assert_equal %w[ c ], @engine.ps(wfid).position.collect { |pos| pos[1] }
+ assert_equal({}, @dashboard.ps(wfid).tags)
+ assert_equal %w[ c ], @dashboard.ps(wfid).position.collect { |pos| pos[1] }
end
end