diff options
Diffstat (limited to 'test/ruby/test_thread.rb')
-rw-r--r-- | test/ruby/test_thread.rb | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/test/ruby/test_thread.rb b/test/ruby/test_thread.rb index fe8e2384a0..c1606f2ff2 100644 --- a/test/ruby/test_thread.rb +++ b/test/ruby/test_thread.rb @@ -645,11 +645,9 @@ class TestThread < Test::Unit::TestCase end } } - sleep 1 - r=:ng - th.raise RuntimeError - th.join - rescue e + assert_raise(e) {sleep 1} + ensure + assert_raise(RuntimeError) {th.join(0)} end assert_equal(:ok,r) end |