mirror of
https://github.com/discourse/discourse.git
synced 2025-03-09 14:34:35 +00:00
don't risk being stuck in readonly
This commit is contained in:
parent
877b7be579
commit
7ca8853861
@ -19,6 +19,11 @@ describe ApplicationRequest do
|
||||
ApplicationRequest.last_flush = Time.now.utc
|
||||
end
|
||||
|
||||
context "readonly test" do
|
||||
after do
|
||||
$redis.slaveof("no", "one")
|
||||
end
|
||||
|
||||
it 'works even if redis is in readonly' do
|
||||
disable_date_flush!
|
||||
|
||||
@ -34,6 +39,7 @@ describe ApplicationRequest do
|
||||
inc(:http_total, autoflush: 3)
|
||||
expect(ApplicationRequest.http_total.first.count).to eq(3)
|
||||
end
|
||||
end
|
||||
|
||||
it 'logs nothing for an unflushed increment' do
|
||||
ApplicationRequest.increment!(:anon)
|
||||
|
Loading…
x
Reference in New Issue
Block a user