test/functional/ft_0_worker.rb in ruote-2.1.7 vs test/functional/ft_0_worker.rb in ruote-2.1.8

- old
+ new

@@ -5,22 +5,24 @@ # Fri May 15 09:51:28 JST 2009 # require File.join(File.dirname(__FILE__), 'base') +require 'ruote/part/null_participant' + class FtWorkerTest < Test::Unit::TestCase include FunctionalBase def test_launch_terminate #noisy pdef = Ruote.process_definition do end - assert_trace pdef, '' + assert_trace '', pdef #puts; logger.log.each { |e| p e }; puts assert_equal %w[ launch terminated ], logger.log.map { |e| e['action'] } end @@ -39,8 +41,22 @@ @engine.launch(pdef) Thread.pass assert_equal 1, @engine.storage.get_many('msgs').size + end + + def test_remaining_messages + + @engine.register_participant :alfred, Ruote::NullParticipant + + pdef = Ruote.process_definition do + end + + assert_trace '', pdef + + sleep 0.300 + + assert_equal [], @engine.storage.get_msgs end end