mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
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.
This commit is contained in:
parent
4db4f90917
commit
34e54fa054
1 changed files with 2 additions and 3 deletions
|
@ -89,12 +89,11 @@ module ActiveRecord
|
|||
end
|
||||
|
||||
def test_full_pool_exception
|
||||
@pool.size.times { @pool.checkout }
|
||||
assert_raises(ConnectionTimeoutError) do
|
||||
(@pool.size + 1).times do
|
||||
@pool.checkout
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def test_full_pool_blocks
|
||||
cs = @pool.size.times.map { @pool.checkout }
|
||||
|
|
Loading…
Reference in a new issue