1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

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:
eregon 2017-12-12 18:44:07 +00:00
parent ca1c3d41fa
commit 2dfbc64fab

View file

@ -504,6 +504,8 @@ class TupleSpaceProxyTest < Test::Unit::TestCase
ts = Rinda::TupleSpaceProxy.new(ro)
th = Thread.new do
ts.take([:test_take, nil])
rescue Interrupt
# Expected
end
Kernel.sleep(0.1)
th.raise(Interrupt) # causes loss of the taken tuple