test/ft_27_getflowpos.rb in openwferu-0.9.15 vs test/ft_27_getflowpos.rb in openwferu-0.9.16
- old
+ new
@@ -41,28 +41,30 @@
#sp = @engine.register_participant("store_p", OpenWFE::YamlParticipant)
sp = @engine.register_participant("store_p", OpenWFE::HashParticipant)
fei = @engine.launch(TestDefinition0)
- sleep 0.100
+ sleep 0.200
l = @engine.get_process_stack(fei.wfid)
- #print_exp_list(l)
+ #print_exp_list l
assert_equal \
- l.size, 3, "get_process_stack() returned #{l.size} elements"
+ 3, l.size, "get_process_stack() returned #{l.size} elements"
ps = @engine.list_process_status
#puts
#puts ps[fei.parent_wfid].to_s
#puts
assert_equal ps[fei.parent_wfid].errors.size, 0
assert_equal ps[fei.parent_wfid].expressions.size, 1
assert_kind_of ParticipantExpression, ps[fei.parent_wfid].expressions[0]
+ assert_not_nil ps[fei.parent_wfid].launch_time
+
ps = @engine.list_process_status fei.wfid[0, 4]
assert_equal ps[fei.parent_wfid].errors.size, 0
assert_equal ps[fei.parent_wfid].expressions.size, 1
assert_kind_of ParticipantExpression, ps[fei.parent_wfid].expressions[0]
@@ -87,37 +89,38 @@
sequence do
store_p
end
end
- #def xxxx_gfp_0b
def test_gfp_0b
- sp = @engine.register_participant("store_p", OpenWFE::YamlParticipant)
+ log_level_to_debug
+ sp = @engine.register_participant "store_p", OpenWFE::YamlParticipant
+
#fei = @engine.launch TestDefinition0
fei = @engine.launch Gfp27b
- sleep 0.100
+ sleep 0.200
#l = @engine.get_process_stack(fei.wfid)
l = @engine.get_process_stack(fei)
#
# shortcut version
#print_exp_list l
- assert_equal l.size, 3
+ assert_equal 3, l.size
l = @engine.list_processes()
- assert_equal l.size, 1
+ assert_equal 1, l.size
l = @engine.list_processes(false, "nada")
- assert_equal l.size, 0
+ assert_equal 0, l.size
l = @engine.list_workflows(false, fei.wfid[0, 3])
- assert_equal l.size, 1
+ assert_equal 1, l.size
#
# resume flow and terminate it
wi = sp.first_workitem
@@ -126,10 +129,10 @@
sp.forward(wi)
@engine.wait_for fei
- assert_equal sp.size, 0
+ assert_equal 0, sp.size
end
end