test/hparticipant_test.rb in openwferu-0.9.9 vs test/hparticipant_test.rb in openwferu-0.9.10
- old
+ new
@@ -78,44 +78,42 @@
#puts id.to_s
#puts "alice count : #{@hpAlice.size}"
#puts "bob count : #{@hpBob.size}"
- assert \
- @hpBob.size == 0
- assert \
- @hpAlice.size == 1
+ sleep 0.200
+ assert_equal @hpBob.size, 0
+ assert_equal @hpAlice.size, 1
+
wi = @hpAlice.list_workitems(id.workflow_instance_id)[0]
assert \
wi != nil,
"didn't find wi for flow #{id.workflow_instance_id}"
wi.message = "Hello bob !"
@hpAlice.forward(wi)
- assert \
- @hpAlice.size == 0
- assert \
- @hpBob.size == 1
+ sleep 0.400
+ assert_equal @hpAlice.size, 0
+ assert_equal @hpBob.size, 1
+
wi = @hpBob.list_workitems(id.workflow_instance_id)[0]
- assert \
- wi.message == "Hello bob !"
+ assert_equal wi.message, "Hello bob !"
@hpBob.proceed(wi)
- assert \
- @hpAlice.size == 0
- assert \
- @hpBob.size == 0
+ sleep 0.300
- assert \
- @engine.get_expression_storage.size == 1
+ assert_equal @hpAlice.size, 0
+ assert_equal @hpBob.size, 0
+
+ assert_equal @engine.get_expression_storage.size, 1
end
def test_d_0
@hpAlice = HashParticipant.new
@@ -124,10 +122,12 @@
@engine.register_participant(:alice, @hpAlice)
@engine.register_participant(:bob, @hpBob)
id = @engine.launch(HpDefinition0)
+ sleep 0.100
+
assert_equal @hpAlice.size, 1
assert_equal @hpBob.size, 0
wi = @hpAlice.first_workitem
@@ -138,10 +138,12 @@
wi = @hpBob.first_workitem
@hpBob.proceed wi
+ sleep 0.100
+
assert_equal @hpAlice.size, 0
assert_equal @hpBob.size, 1
wi = @hpBob.first_workitem
@@ -152,14 +154,15 @@
wi = @hpAlice.first_workitem
@hpAlice.forward wi
+ sleep 0.100
+
assert_equal @hpAlice.size, 0
assert_equal @hpBob.size, 0
- assert \
- @engine.get_expression_storage.size == 1
+ assert_equal @engine.get_expression_storage.size, 1
end
end