Disconnect the pool during failover and fallback.
This commit is contained in:
parent
4ce1d230c7
commit
fd75e54793
|
@ -98,8 +98,7 @@ class PostgreSQLFallbackHandler
|
|||
end
|
||||
|
||||
def clear_connections
|
||||
ActiveRecord::Base.clear_active_connections!
|
||||
ActiveRecord::Base.clear_all_connections!
|
||||
ActiveRecord::Base.connection_pool.disconnect
|
||||
end
|
||||
|
||||
private
|
||||
|
|
|
@ -27,7 +27,6 @@ describe ActiveRecord::ConnectionHandling do
|
|||
let(:postgresql_fallback_handler) { PostgreSQLFallbackHandler.instance }
|
||||
|
||||
before do
|
||||
skip("Figure out why this test leaks connections")
|
||||
postgresql_fallback_handler.initialized = true
|
||||
|
||||
['default', multisite_db].each do |db|
|
||||
|
|
Loading…
Reference in New Issue