Clear all active connections after PostgreSQL failover tests.
This commit is contained in:
parent
c7d7cb940c
commit
af01860a3d
|
@ -36,6 +36,7 @@ describe ActiveRecord::ConnectionHandling do
|
||||||
|
|
||||||
after do
|
after do
|
||||||
postgresql_fallback_handler.setup!
|
postgresql_fallback_handler.setup!
|
||||||
|
postgresql_fallback_handler.clear_connections
|
||||||
end
|
end
|
||||||
|
|
||||||
describe "#postgresql_fallback_connection" do
|
describe "#postgresql_fallback_connection" do
|
||||||
|
@ -118,8 +119,6 @@ describe ActiveRecord::ConnectionHandling do
|
||||||
expect(ActiveRecord::Base.connection_pool.connections.count).to eq(0)
|
expect(ActiveRecord::Base.connection_pool.connections.count).to eq(0)
|
||||||
expect(postgresql_fallback_handler.master_down?).to eq(nil)
|
expect(postgresql_fallback_handler.master_down?).to eq(nil)
|
||||||
|
|
||||||
skip("Only fails on Travis")
|
|
||||||
|
|
||||||
expect(ActiveRecord::Base.connection)
|
expect(ActiveRecord::Base.connection)
|
||||||
.to be_an_instance_of(ActiveRecord::ConnectionAdapters::PostgreSQLAdapter)
|
.to be_an_instance_of(ActiveRecord::ConnectionAdapters::PostgreSQLAdapter)
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue