test/timeout_test.rb in openwferu-0.9.16 vs test/timeout_test.rb in openwferu-0.9.17

- old
+ new

@@ -8,11 +8,11 @@ require 'test/unit' #require 'openwfe/workitem' require 'openwfe/engine/engine' -require 'openwfe/expressions/raw_prog' +require 'openwfe/def' require 'openwfe/worklist/storeparticipant' require 'rutest_utils' include OpenWFE @@ -49,28 +49,23 @@ engine.register_participant(:albert, albert) li = LaunchItem.new(TimeoutDefinition0) - engine.launch(li) + engine.launch li sleep(2) s = engine.application_context["__tracer"].to_s engine.stop #puts "trace is >#{s}<" #puts "albert.size is #{albert.size}" - assert \ - albert.size == 0, - "workitem was not removed from workitem store" - assert \ - s == """timedout? true -over""", - "flow did not reach 'over'" + assert_equal 0, albert.size, "wi was not removed from workitem store" + assert_equal "timedout? true\nover", s, "flow did not reach 'over'" end def test_timeout_1 albert = HashParticipant.new @@ -103,21 +98,15 @@ #puts "trace is >#{s}<" #puts "albert.size is #{albert.size}" # in this test, the participant doesn't time out - assert_equal \ - albert.size, 0, - "workitem was not removed from workitem store" - assert \ - s == "timedout? \nover ok", - "flow did not reach 'over ok'" + assert_equal 0, albert.size, "wi was not removed from workitem store" + assert_equal "timedout? \nover ok", s, "flow did not reach 'over ok'" pjc = engine.get_scheduler.pending_job_count - assert \ - pjc == 0, - "1 pending_jobs_count is at #{pjc}, it should be at 0" + assert_equal 0, pjc, "pending_jobs_count is at #{pjc}, should be at 0" end end