From 34e54fa0542ebb3403932ab785239119e449dc3c Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Mon, 17 Mar 2014 17:37:05 -0700 Subject: [PATCH] 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. --- activerecord/test/cases/connection_pool_test.rb | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/activerecord/test/cases/connection_pool_test.rb b/activerecord/test/cases/connection_pool_test.rb index c0d5e3707c..8d15a76735 100644 --- a/activerecord/test/cases/connection_pool_test.rb +++ b/activerecord/test/cases/connection_pool_test.rb @@ -89,10 +89,9 @@ 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 + @pool.checkout end end