Pause Sidekiq when postgres failovers.

This commit is contained in:
Guo Xiang Tan
2017-10-16 19:48:31 +08:00
parent 229a10e142
commit 5f76e5062d
2 changed files with 7 additions and 1 deletions

View File

@@ -71,6 +71,7 @@ describe ActiveRecord::ConnectionHandling do
.to change { Discourse.readonly_mode? }.from(false).to(true)
expect(postgresql_fallback_handler.master_down?).to eq(true)
expect(Sidekiq.paused?).to eq(true)
with_multisite_db(multisite_db) do
expect(postgresql_fallback_handler.master_down?).to eq(nil)
@@ -92,6 +93,7 @@ describe ActiveRecord::ConnectionHandling do
expect(Discourse.readonly_mode?).to eq(false)
expect(postgresql_fallback_handler.master_down?).to eq(nil)
expect(Sidekiq.paused?).to eq(false)
expect(ActiveRecord::Base.connection_pool.connections.count).to eq(0)
skip("Figuring out why the following keeps failing to obtain a connection on Travis")