aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord
diff options
context:
space:
mode:
authorKir Shatrov <kirs@users.noreply.github.com>2017-02-26 10:00:22 -0600
committerKir Shatrov <shatrov@me.com>2017-02-26 10:36:30 -0600
commit5146d8e2081c0e2e7b0a90f323994ba650fe5562 (patch)
tree7a8b2139a0b586f40b2406e29340f3c1bab33730 /activerecord
parent25c3227255dee0e937e69f58f0cffbf9318948bd (diff)
downloadrails-5146d8e2081c0e2e7b0a90f323994ba650fe5562.tar.gz
rails-5146d8e2081c0e2e7b0a90f323994ba650fe5562.tar.bz2
rails-5146d8e2081c0e2e7b0a90f323994ba650fe5562.zip
Refactor connection_pool_test
Diffstat (limited to 'activerecord')
-rw-r--r--activerecord/test/cases/connection_pool_test.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/activerecord/test/cases/connection_pool_test.rb b/activerecord/test/cases/connection_pool_test.rb
index afd0ac2dd4..7e88c9cf7a 100644
--- a/activerecord/test/cases/connection_pool_test.rb
+++ b/activerecord/test/cases/connection_pool_test.rb
@@ -307,14 +307,17 @@ module ActiveRecord
end
end
- def test_automatic_reconnect=
+ def test_automatic_reconnect_restores_after_disconnect
pool = ConnectionPool.new ActiveRecord::Base.connection_pool.spec
assert pool.automatic_reconnect
assert pool.connection
pool.disconnect!
assert pool.connection
+ end
+ def test_automatic_reconnect_can_be_disabled
+ pool = ConnectionPool.new ActiveRecord::Base.connection_pool.spec
pool.disconnect!
pool.automatic_reconnect = false