Permalink
Browse files

test should only pass if the pool.size+1 checkout fails

Previously, any of the connection checkouts could have failed, and this
test would pass.
  • Loading branch information...
1 parent 4db4f90 commit 34e54fa0542ebb3403932ab785239119e449dc3c @tenderlove tenderlove committed Mar 18, 2014
Showing with 2 additions and 3 deletions.
  1. +2 −3 activerecord/test/cases/connection_pool_test.rb
@@ -89,10 +89,9 @@ def test_active_connection_in_use
end
def test_full_pool_exception
+ @pool.size.times { @pool.checkout }
assert_raises(ConnectionTimeoutError) do
- (@pool.size + 1).times do
- @pool.checkout
- end
+ @pool.checkout
end
end

0 comments on commit 34e54fa

Please sign in to comment.