summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorDouwe Maan <douwe@selenight.nl>2018-12-27 17:11:21 +0100
committerDouwe Maan <douwe@selenight.nl>2018-12-27 17:11:21 +0100
commitb112df6acfa12355c6141f6b21629ae5552fdc39 (patch)
tree3707b2cb7d77c3881b3c0600876f4efa97fa0ebc /spec
parent82370345302426c9d854e78c2a32a56ab4eb6c47 (diff)
downloadgitlab-ce-b112df6acfa12355c6141f6b21629ae5552fdc39.tar.gz
Fix spec that depended on 0 lock_version being unsupported
Diffstat (limited to 'spec')
-rw-r--r--spec/services/ci/register_job_service_spec.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/spec/services/ci/register_job_service_spec.rb b/spec/services/ci/register_job_service_spec.rb
index 56e2a405bcd..9d65ac15213 100644
--- a/spec/services/ci/register_job_service_spec.rb
+++ b/spec/services/ci/register_job_service_spec.rb
@@ -244,7 +244,9 @@ module Ci
context 'when first build is stalled' do
before do
- pending_job.update(lock_version: 0)
+ allow_any_instance_of(Ci::RegisterJobService).to receive(:assign_runner!).and_call_original
+ allow_any_instance_of(Ci::RegisterJobService).to receive(:assign_runner!)
+ .with(pending_job, anything).and_raise(ActiveRecord::StaleObjectError)
end
subject { described_class.new(specific_runner).execute }