diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-08-20 21:42:06 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-08-20 21:42:06 +0300 |
commit | 6e4e1050d9dba2b7b2523fdd1768823ab85feef4 (patch) | |
tree | 78be5963ec075d80116a932011d695dd33910b4e /spec/lib/gitlab/job_waiter_spec.rb | |
parent | 1ce776de4ae122aba3f349c02c17cebeaa8ecf07 (diff) |
Add latest changes from gitlab-org/gitlab@13-3-stable-ee
Diffstat (limited to 'spec/lib/gitlab/job_waiter_spec.rb')
-rw-r--r-- | spec/lib/gitlab/job_waiter_spec.rb | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/spec/lib/gitlab/job_waiter_spec.rb b/spec/lib/gitlab/job_waiter_spec.rb index 4d7c838aa3b..7aa0a3485fb 100644 --- a/spec/lib/gitlab/job_waiter_spec.rb +++ b/spec/lib/gitlab/job_waiter_spec.rb @@ -60,16 +60,14 @@ RSpec.describe Gitlab::JobWaiter do described_class.notify(waiter.key, 'a') described_class.notify(waiter.key, 'b') - result = nil - expect { Timeout.timeout(1) { result = waiter.wait(2) } }.not_to raise_error + expect { Timeout.timeout(1) { waiter.wait(2) } }.not_to raise_error end it 'increments job_waiter_started_total and job_waiter_timeouts_total when it times out' do expect(started_total).to receive(:increment).with(worker: 'Foo') expect(timeouts_total).to receive(:increment).with(worker: 'Foo') - result = nil - expect { Timeout.timeout(2) { result = waiter.wait(1) } }.not_to raise_error + expect { Timeout.timeout(2) { waiter.wait(1) } }.not_to raise_error end end end |