Fix static analysys

This commit is contained in:
Shinya Maeda 2018-07-04 13:28:18 +09:00
parent f11aa51eea
commit 202c2c6aef
1 changed files with 8 additions and 8 deletions

View File

@ -43,10 +43,10 @@ describe Gitlab::ExclusiveLeaseHelpers, :clean_gitlab_redis_shared_state do
end
context 'when ttl is specified' do
let(:options) { { ttl: 10.minute } }
let(:options) { { ttl: 10.minutes } }
it 'receives the specified argument' do
expect(Gitlab::ExclusiveLease).to receive(:new).with(unique_key, { timeout: 10.minute } )
expect(Gitlab::ExclusiveLease).to receive(:new).with(unique_key, { timeout: 10.minutes } )
expect { subject }.to raise_error('Failed to obtain a lock')
end
@ -63,10 +63,10 @@ describe Gitlab::ExclusiveLeaseHelpers, :clean_gitlab_redis_shared_state do
end
context 'when sleep second is specified' do
let(:options) { { retries: 0, sleep_sec: 0.05.second } }
let(:options) { { retries: 0, sleep_sec: 0.05.seconds } }
it 'receives the specified argument' do
expect(class_instance).to receive(:sleep).with(0.05.second).once
expect(class_instance).to receive(:sleep).with(0.05.seconds).once
expect { subject }.to raise_error('Failed to obtain a lock')
end