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

- old
+ new

@@ -4,11 +4,11 @@ # # John Mettraux at openwfe.org # require 'flowtestbase' -require 'openwfe/expressions/raw_prog' +require 'openwfe/def' include OpenWFE @@ -23,41 +23,53 @@ # # Test 0 # - class TestDefinition0 < ProcessDefinition + class TestWhen23b0 < ProcessDefinition def make process_definition :name => "23b_when0", :revision => "0" do concurrence do - _when :test => "false == true", :timeout => "3s" do + _when :test => "false == true", :timeout => "1s500" do _print "la vaca vuela" end _print "ok" end end end end + # + # Testing if the conditional _when got correctly unscheduled. + # def test_0 - dotest(TestDefinition0, "ok", 5) + + log_level_to_debug + + dotest TestWhen23b0, "ok" end # # Test 1 # - class TestWait23b1 < ProcessDefinition + class TestWhen23b1 < ProcessDefinition concurrence do _when :test => "true == true" do end _print "ok" end end + # + # Testing an empty _when + # def test_1 - dotest(TestWait23b1, "ok", true) + + log_level_to_debug + + dotest TestWhen23b1, "ok" end end