summaryrefslogtreecommitdiff
path: root/spec/models/ci/build_trace_chunk_spec.rb
diff options
context:
space:
mode:
authorDouglas Barbosa Alexandre <dbalexandre@gmail.com>2018-06-28 15:51:36 -0300
committerDouglas Barbosa Alexandre <dbalexandre@gmail.com>2018-06-28 19:24:40 -0300
commit34dbccb24b38c5a7c52641e7008f3ab53b25c66a (patch)
tree4b5121120fe3973729e546fd3e25a0a4f6106ea9 /spec/models/ci/build_trace_chunk_spec.rb
parente38af20cc6eae4f001fd98b0450f00f496a278d0 (diff)
downloadgitlab-ce-34dbccb24b38c5a7c52641e7008f3ab53b25c66a.tar.gz
Add helper methods to stub Gitlab::ExclusiveLease
Diffstat (limited to 'spec/models/ci/build_trace_chunk_spec.rb')
-rw-r--r--spec/models/ci/build_trace_chunk_spec.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/spec/models/ci/build_trace_chunk_spec.rb b/spec/models/ci/build_trace_chunk_spec.rb
index c5d550cba1b..464897de306 100644
--- a/spec/models/ci/build_trace_chunk_spec.rb
+++ b/spec/models/ci/build_trace_chunk_spec.rb
@@ -1,6 +1,8 @@
require 'spec_helper'
describe Ci::BuildTraceChunk, :clean_gitlab_redis_shared_state do
+ include ExclusiveLeaseHelpers
+
set(:build) { create(:ci_build, :running) }
let(:chunk_index) { 0 }
let(:data_store) { :redis }
@@ -322,7 +324,7 @@ describe Ci::BuildTraceChunk, :clean_gitlab_redis_shared_state do
describe 'ExclusiveLock' do
before do
- allow_any_instance_of(Gitlab::ExclusiveLease).to receive(:try_obtain) { nil }
+ stub_exclusive_lease_taken
stub_const('Ci::BuildTraceChunk::WRITE_LOCK_RETRY', 1)
end