Merge pull request #5287 from tgxworld/fix_randomly_failing_test

Clear all active connections after PostgreSQL failover tests.
This commit is contained in:
Guo Xiang Tan 2017-11-03 10:03:57 +08:00 committed by GitHub
commit 3c8a48f768
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -36,6 +36,7 @@ describe ActiveRecord::ConnectionHandling do
after do
postgresql_fallback_handler.setup!
postgresql_fallback_handler.clear_connections
end
describe "#postgresql_fallback_connection" do
@ -118,8 +119,6 @@ describe ActiveRecord::ConnectionHandling do
expect(ActiveRecord::Base.connection_pool.connections.count).to eq(0)
expect(postgresql_fallback_handler.master_down?).to eq(nil)
skip("Only fails on Travis")
expect(ActiveRecord::Base.connection)
.to be_an_instance_of(ActiveRecord::ConnectionAdapters::PostgreSQLAdapter)
end