Skip to content

Commit c462ada

Browse files
authored
Merge pull request rails#28186 from kirs/patch-2
Refactor connection_pool_test
2 parents 25c3227 + 5146d8e commit c462ada

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

activerecord/test/cases/connection_pool_test.rb

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -307,14 +307,17 @@ def test_checkout_fairness_by_group
307307
end
308308
end
309309

310-
def test_automatic_reconnect=
310+
def test_automatic_reconnect_restores_after_disconnect
311311
pool = ConnectionPool.new ActiveRecord::Base.connection_pool.spec
312312
assert pool.automatic_reconnect
313313
assert pool.connection
314314

315315
pool.disconnect!
316316
assert pool.connection
317+
end
317318

319+
def test_automatic_reconnect_can_be_disabled
320+
pool = ConnectionPool.new ActiveRecord::Base.connection_pool.spec
318321
pool.disconnect!
319322
pool.automatic_reconnect = false
320323

0 commit comments

Comments
 (0)