diff options
author | Jonathan Rochkind <jonathan@dnil.net> | 2012-09-21 12:35:11 -0400 |
---|---|---|
committer | Jonathan Rochkind <jonathan@dnil.net> | 2012-09-24 16:20:22 -0400 |
commit | 39087068c2e3c85f6839ea51eab4480673138a2b (patch) | |
tree | f9b8a6120ff14d04115e6d31fa17d69035d9a9f1 /activerecord/test/cases/pooled_connections_test.rb | |
parent | 7b545ff911a3f9bd3c9b179a2c6ac6b70bab3ee0 (diff) | |
download | rails-39087068c2e3c85f6839ea51eab4480673138a2b.tar.gz rails-39087068c2e3c85f6839ea51eab4480673138a2b.tar.bz2 rails-39087068c2e3c85f6839ea51eab4480673138a2b.zip |
ConnectionPool accepts spec key 'checkout_timeout'
Backport of #6441 cb6f83935 . Old 'wait_timeout' is still supported,
but conflicts with mysql2 using that spec key for different thing.
'checkout_timeout' can now be used taking precedence for ConnectionPool
over 'wait_timeout'.
Diffstat (limited to 'activerecord/test/cases/pooled_connections_test.rb')
-rw-r--r-- | activerecord/test/cases/pooled_connections_test.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/activerecord/test/cases/pooled_connections_test.rb b/activerecord/test/cases/pooled_connections_test.rb index bc3dfb1078..e69243a537 100644 --- a/activerecord/test/cases/pooled_connections_test.rb +++ b/activerecord/test/cases/pooled_connections_test.rb @@ -17,7 +17,7 @@ class PooledConnectionsTest < ActiveRecord::TestCase end def checkout_connections - ActiveRecord::Base.establish_connection(@connection.merge({:pool => 2, :wait_timeout => 0.3})) + ActiveRecord::Base.establish_connection(@connection.merge({:pool => 2, :checkout_timeout => 0.3})) @connections = [] @timed_out = 0 @@ -42,7 +42,7 @@ class PooledConnectionsTest < ActiveRecord::TestCase end def checkout_checkin_connections(pool_size, threads) - ActiveRecord::Base.establish_connection(@connection.merge({:pool => pool_size, :wait_timeout => 0.5})) + ActiveRecord::Base.establish_connection(@connection.merge({:pool => pool_size, :checkout_timeout => 0.5})) @connection_count = 0 @timed_out = 0 threads.times do |