diff options
author | Kamil Trzciński <ayufan@ayufan.eu> | 2018-11-23 19:25:11 +0300 |
---|---|---|
committer | Kamil Trzciński <ayufan@ayufan.eu> | 2018-11-27 19:55:20 +0300 |
commit | 31a1ce2132d83e333e84f365b9aada2e17c61b43 (patch) | |
tree | 66d3a02000d2998f7b6f583ed669fd59939c88e7 /spec/lib/gitlab/exclusive_lease_helpers_spec.rb | |
parent | 2e3dab38295b7c36ab100f20c654fdfaf9b00885 (diff) |
Lock writes to trace stream
Diffstat (limited to 'spec/lib/gitlab/exclusive_lease_helpers_spec.rb')
-rw-r--r-- | spec/lib/gitlab/exclusive_lease_helpers_spec.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/lib/gitlab/exclusive_lease_helpers_spec.rb b/spec/lib/gitlab/exclusive_lease_helpers_spec.rb index 2e3656b52fb..5107e1efbbd 100644 --- a/spec/lib/gitlab/exclusive_lease_helpers_spec.rb +++ b/spec/lib/gitlab/exclusive_lease_helpers_spec.rb @@ -11,6 +11,14 @@ describe Gitlab::ExclusiveLeaseHelpers, :clean_gitlab_redis_shared_state do let(:options) { {} } + context 'when unique key is not set' do + let(:unique_key) { } + + it 'raises an error' do + expect { subject }.to raise_error ArgumentError + end + end + context 'when the lease is not obtained yet' do before do stub_exclusive_lease(unique_key, 'uuid') |