Skip to content

A platform for community discussion. Free, open, simple.

skip erratic spec

Sam94124ee2a6f5
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 d3c7c9d0cda..951fc9d12da 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
@@ -70,6 +70,11 @@ describe ActiveRecord::ConnectionHandling do
end
it 'should failover to a replica server' do
+ # erratically fails with: ActiveRecord::ConnectionTimeoutError:
+ # could not obtain a connection from the pool within 5.000 seconds (waited 5.000 seconds); all pooled connections were in use
+ #
+ skip("This test is failing erratically")
+
RailsMultisite::ConnectionManagement.stubs(:all_dbs).returns(['default', multisite_db])
postgresql_fallback_handler.expects(:verify_master).at_least(3)
@@ -124,6 +129,8 @@ describe ActiveRecord::ConnectionHandling do
expect(Discourse.readonly_mode?).to eq(false)
expect(Sidekiq.paused?).to eq(false)
+
+ # fails sometimes on this line!
expect(ActiveRecord::Base.connection_pool.connections.count).to eq(0)
expect(postgresql_fallback_handler.master_down?).to eq(nil)