Rescue expected Interrupt in TupleSpaceTestModule#test_take_bug_8215
* test/rinda/test_rinda.rb (test_take_bug_8215): add rescue for expected exception, which removes the warning by Thread.report_on_exception [Feature #14143]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61185 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
ca1c3d41fa
commit
2dfbc64fab
@ -504,6 +504,8 @@ class TupleSpaceProxyTest < Test::Unit::TestCase
|
|||||||
ts = Rinda::TupleSpaceProxy.new(ro)
|
ts = Rinda::TupleSpaceProxy.new(ro)
|
||||||
th = Thread.new do
|
th = Thread.new do
|
||||||
ts.take([:test_take, nil])
|
ts.take([:test_take, nil])
|
||||||
|
rescue Interrupt
|
||||||
|
# Expected
|
||||||
end
|
end
|
||||||
Kernel.sleep(0.1)
|
Kernel.sleep(0.1)
|
||||||
th.raise(Interrupt) # causes loss of the taken tuple
|
th.raise(Interrupt) # causes loss of the taken tuple
|
||||||
|
Loading…
x
Reference in New Issue
Block a user