Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShinya Maeda <shinya@gitlab.com>2018-06-01 10:15:41 +0300
committerShinya Maeda <shinya@gitlab.com>2018-06-06 11:49:48 +0300
commit2522691eda46ef3ed572b747074e9b3b2e776198 (patch)
tree76ea84bce4286cc1d20782b234cc42cc79a81c24 /spec/workers/stuck_ci_jobs_worker_spec.rb
parent174c892e7efcd65b1c4560bddec6bb9b6d7fa966 (diff)
Fix ambiguous stuck ci job worker's spec. Rename lease key of archive
Diffstat (limited to 'spec/workers/stuck_ci_jobs_worker_spec.rb')
-rw-r--r--spec/workers/stuck_ci_jobs_worker_spec.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/spec/workers/stuck_ci_jobs_worker_spec.rb b/spec/workers/stuck_ci_jobs_worker_spec.rb
index bdc64c6785b..c3294fce5ea 100644
--- a/spec/workers/stuck_ci_jobs_worker_spec.rb
+++ b/spec/workers/stuck_ci_jobs_worker_spec.rb
@@ -132,8 +132,10 @@ describe StuckCiJobsWorker do
end
it 'cancels exclusive lease after worker perform' do
- expect(Gitlab::ExclusiveLease).to receive(:cancel).with(described_class::EXCLUSIVE_LEASE_KEY, exclusive_lease_uuid)
worker.perform
+
+ expect(Gitlab::ExclusiveLease.new(described_class::EXCLUSIVE_LEASE_KEY, timeout: 1.hour).exists?)
+ .to be_falsy
end
end
end