diff options
Diffstat (limited to 'test/rubygems/test_gem_request_connection_pools.rb')
-rw-r--r-- | test/rubygems/test_gem_request_connection_pools.rb | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/test/rubygems/test_gem_request_connection_pools.rb b/test/rubygems/test_gem_request_connection_pools.rb index a9bddb900e..a087095a53 100644 --- a/test/rubygems/test_gem_request_connection_pools.rb +++ b/test/rubygems/test_gem_request_connection_pools.rb @@ -118,13 +118,12 @@ class TestGemRequestConnectionPool < Gem::TestCase pool.checkout - t1 = Thread.new { - Timeout.timeout(1) do - pool.checkout + Thread.new { + assert_raises(Timeout::Error) do + Timeout.timeout(1) do + pool.checkout + end end - } - assert_raises(Timeout::Error) do - t1.join - end + }.join end end |