mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 07:53:49 +08:00
Disable MessageBus's keepalive when Redis is readonly.
This commit is contained in:
@ -99,7 +99,9 @@ describe DiscourseRedis do
|
||||
it 'should return the right value if the master server is still down' do
|
||||
fallback_handler.master = false
|
||||
Redis::Client.any_instance.expects(:call).with([:info]).returns("Some other stuff")
|
||||
|
||||
expect(fallback_handler.initiate_fallback_to_master).to eq(false)
|
||||
expect(MessageBus.keepalive_interval).to eq(0)
|
||||
end
|
||||
|
||||
it 'should fallback to the master server once it is up' do
|
||||
@ -113,6 +115,7 @@ describe DiscourseRedis do
|
||||
expect(fallback_handler.initiate_fallback_to_master).to eq(true)
|
||||
expect(fallback_handler.master).to eq(true)
|
||||
expect(Discourse.recently_readonly?).to eq(false)
|
||||
expect(MessageBus.keepalive_interval).to eq(-1)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user