test/functional/ct_0_concurrence.rb in ruote-2.1.10 vs test/functional/ct_0_concurrence.rb in ruote-2.1.11
- old
+ new
@@ -11,10 +11,14 @@
class CtConcurrenceTest < Test::Unit::TestCase
include ConcurrentBase
+ # A collision between two workers replying to the same concurrence expression.
+ #
+ # Worker 0 replies for echo 'a' while worker 1 replies for echo 'b'.
+ #
def test_collision
pdef = Ruote.process_definition do
concurrence do
echo 'a'
@@ -38,9 +42,11 @@
@engine0.do_process(msg)
end
end
replies.sort! { |a, b| a['put_at'] <=> b['put_at'] }
+
+ #replies.each { |r| p r }
t0 = Thread.new { @engine1.do_process(replies[0]) }
t1 = Thread.new { @engine0.do_process(replies[1]) }
t0.join
t1.join