From af01860a3de2759fa028729a41a5d01b70e67b32 Mon Sep 17 00:00:00 2001 From: Guo Xiang Tan Date: Fri, 3 Nov 2017 09:21:10 +0800 Subject: [PATCH] Clear all active connections after PostgreSQL failover tests. --- .../connection_adapters/postgresql_fallback_adapter_spec.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/spec/components/active_record/connection_adapters/postgresql_fallback_adapter_spec.rb b/spec/components/active_record/connection_adapters/postgresql_fallback_adapter_spec.rb index 5d48ea21862..c58efa156ec 100644 --- a/spec/components/active_record/connection_adapters/postgresql_fallback_adapter_spec.rb +++ b/spec/components/active_record/connection_adapters/postgresql_fallback_adapter_spec.rb @@ -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