-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
41 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -84,5 +84,4 @@ def mark_as_notify(key) | |
def logger | ||
@logger ||= AirbrakeProxy.configuration.logger | ||
end | ||
|
||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
module AirbrakeProxy | ||
VERSION = "0.1.0" | ||
VERSION = "0.1.1" | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
require 'spec_helper' | ||
|
||
module AirbrakeProxy | ||
describe RedisProxy do | ||
|
||
subject { RedisProxy } | ||
|
||
describe 'keys' do | ||
let(:keys) { [:keys] } | ||
|
||
it 'forwards its calls to Redis' do | ||
expect(redis).to receive(:keys).and_return keys | ||
expect(subject.keys).to eql(keys) | ||
end | ||
|
||
context 'Redis::TimeoutError' do | ||
it 'should retry 3 times the call to redis' do | ||
expect(redis).to receive(:keys).exactly(10).times.and_raise(::Redis::TimeoutError) | ||
expect { subject.keys }.to raise_error(::Redis::TimeoutError) | ||
end | ||
end | ||
end | ||
|
||
private | ||
|
||
def redis | ||
@redis ||= AirbrakeProxy.configuration.redis | ||
end | ||
end | ||
end |