ruby-changes:49070
From: eregon <ko1@a...>
Date: Wed, 13 Dec 2017 03:44:12 +0900 (JST)
Subject: [ruby-changes:49070] eregon:r61185 (trunk): Rescue expected Interrupt in TupleSpaceTestModule#test_take_bug_8215
eregon 2017-12-13 03:44:07 +0900 (Wed, 13 Dec 2017) New Revision: 61185 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=61185 Log: 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]. Modified files: trunk/test/rinda/test_rinda.rb Index: test/rinda/test_rinda.rb =================================================================== --- test/rinda/test_rinda.rb (revision 61184) +++ test/rinda/test_rinda.rb (revision 61185) @@ -504,6 +504,8 @@ class TupleSpaceProxyTest < Test::Unit:: https://github.com/ruby/ruby/blob/trunk/test/rinda/test_rinda.rb#L504 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 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/