test/ft_55_ptimeout.rb in ruote-0.9.18 vs test/ft_55_ptimeout.rb in ruote-0.9.19

- old
+ new

@@ -9,51 +9,50 @@ require 'pending' require 'openwfe/def' class FlowTest55 < Test::Unit::TestCase - include FlowTestBase - include PendingJobsMixin + include FlowTestBase + include PendingJobsMixin - #def setup - #end + #def setup + #end - #def teardown - #end + #def teardown + #end - # - # Test 0 - # + # + # Test 0 + # - class Test0 < OpenWFE::ProcessDefinition - concurrence :count => 1 do - sequence do - participant :ref => "channel_z", :timeout => "1s" - _print "cancelled?" - end - _print "concurrence done" - end + class Test0 < OpenWFE::ProcessDefinition + concurrence :count => 1 do + sequence do + participant :ref => "channel_z", :timeout => "1s" + _print "cancelled?" + end + _print "concurrence done" end + end - def test_0 + def test_0 - #scheduler = @engine.get_scheduler - #class << scheduler - # attr_reader :pending_jobs - #end + #scheduler = @engine.get_scheduler + #log_level_to_debug - #log_level_to_debug + @engine.register_participant :channel_z, OpenWFE::NullParticipant - @engine.register_participant :channel_z, OpenWFE::NullParticipant + #p scheduler.at_job_count + assert_no_jobs_left - #require 'pp'; pp(scheduler.pending_jobs) - assert_no_jobs_left + dotest Test0, "concurrence done" - dotest Test0, "concurrence done" + sleep 0.350 # give some time for the timeout unschedule - #require 'pp'; pp(scheduler.pending_jobs) - assert_no_jobs_left - end + #p scheduler.at_job_count + #p scheduler.instance_variable_get(:@non_cron_jobs) + assert_no_jobs_left + end end