mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
Merge pull request #4055 from tgxworld/fix_topic_view_not_working_in_redis_readonly
FIX: Topic view not working when Redis is readonly.
This commit is contained in:
@@ -11,8 +11,15 @@ describe RandomTopicSelector do
|
||||
$redis.rpush key, t
|
||||
end
|
||||
|
||||
expect(RandomTopicSelector.next(0)).to eq([])
|
||||
expect(RandomTopicSelector.next(2)).to eq([0,1])
|
||||
|
||||
$redis.expects(:multi).returns(Discourse.received_readonly!)
|
||||
expect(RandomTopicSelector.next(2)).to eq([2,3])
|
||||
$redis.unstub(:multi)
|
||||
|
||||
expect(RandomTopicSelector.next(2)).to eq([2,3])
|
||||
expect(RandomTopicSelector.next(2)).to eq([])
|
||||
end
|
||||
|
||||
it 'can correctly backfill' do
|
||||
|
||||
Reference in New Issue
Block a user