test/test_anonymous.rb in stomp-1.4.4 vs test/test_anonymous.rb in stomp-1.4.5
- old
+ new
@@ -256,10 +256,11 @@
end
def test_thread_hang_one
received = nil
Thread.new(@conn) do |amq|
+ no_rep_error()
while true
received = amq.receive
end
end
#
@@ -275,10 +276,11 @@
# Test polling with a single thread.
def test_thread_poll_one
received = nil
max_sleep = (RUBY_VERSION =~ /1\.8/) ? 10 : 1
Thread.new(@conn) do |amq|
+ no_rep_error()
while true
received = amq.poll
# One message is needed
Thread.exit if received
sleep max_sleep
@@ -300,10 +302,11 @@
msg_ctr = 0
dest = make_destination
#
1.upto(@max_threads) do |tnum|
Thread.new(@conn) do |amq|
+ no_rep_error()
while true
_ = amq.receive
lock.synchronize do
msg_ctr += 1
end
@@ -340,9 +343,10 @@
msg_ctr = 0
dest = make_destination
#
1.upto(@max_threads) do |tnum|
Thread.new(@conn) do |amq|
+ no_rep_error()
while true
received = amq.poll
if received
lock.synchronize do
msg_ctr += 1