diff options
author | Andrew White <pixeltrix@users.noreply.github.com> | 2017-02-26 19:44:49 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-02-26 19:44:49 +0000 |
commit | c462ada9e91c85d8d6a2f527893cee5f1cb547cb (patch) | |
tree | 7a8b2139a0b586f40b2406e29340f3c1bab33730 /activerecord | |
parent | 25c3227255dee0e937e69f58f0cffbf9318948bd (diff) | |
parent | 5146d8e2081c0e2e7b0a90f323994ba650fe5562 (diff) | |
download | rails-c462ada9e91c85d8d6a2f527893cee5f1cb547cb.tar.gz rails-c462ada9e91c85d8d6a2f527893cee5f1cb547cb.tar.bz2 rails-c462ada9e91c85d8d6a2f527893cee5f1cb547cb.zip |
Merge pull request #28186 from kirs/patch-2
Refactor connection_pool_test
Diffstat (limited to 'activerecord')
-rw-r--r-- | activerecord/test/cases/connection_pool_test.rb | 5 |
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 |