diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-08-19 12:08:42 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-08-19 12:08:42 +0300 |
commit | b76ae638462ab0f673e5915986070518dd3f9ad3 (patch) | |
tree | bdab0533383b52873be0ec0eb4d3c66598ff8b91 /qa/spec/support/retrier_spec.rb | |
parent | 434373eabe7b4be9593d18a585fb763f1e5f1a6f (diff) |
Add latest changes from gitlab-org/gitlab@14-2-stable-eev14.2.0-rc42
Diffstat (limited to 'qa/spec/support/retrier_spec.rb')
-rw-r--r-- | qa/spec/support/retrier_spec.rb | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/qa/spec/support/retrier_spec.rb b/qa/spec/support/retrier_spec.rb index 6f052519516..4e27915553c 100644 --- a/qa/spec/support/retrier_spec.rb +++ b/qa/spec/support/retrier_spec.rb @@ -70,8 +70,9 @@ RSpec.describe QA::Support::Retrier do describe '.retry_on_exception' do context 'when the condition is true' do it 'logs max_attempts, reload_page, and sleep_interval parameters' do - expect { subject.retry_on_exception(max_attempts: 1, reload_page: nil, sleep_interval: 0) { true } } - .to output(/with retry_on_exception: max_attempts: 1; reload_page: ; sleep_interval: 0/).to_stdout_from_any_process + message = /with retry_on_exception: max_attempts: 1; reload_page: true; sleep_interval: 0/ + expect { subject.retry_on_exception(max_attempts: 1, reload_page: true, sleep_interval: 0) { true } } + .to output(message).to_stdout_from_any_process end it 'logs the end' do @@ -82,8 +83,9 @@ RSpec.describe QA::Support::Retrier do context 'when the condition is false' do it 'logs the start' do - expect { subject.retry_on_exception(max_attempts: 1, reload_page: nil, sleep_interval: 0) { false } } - .to output(/with retry_on_exception: max_attempts: 1; reload_page: ; sleep_interval: 0/).to_stdout_from_any_process + message = /with retry_on_exception: max_attempts: 1; reload_page: true; sleep_interval: 0/ + expect { subject.retry_on_exception(max_attempts: 1, reload_page: true, sleep_interval: 0) { false } } + .to output(message).to_stdout_from_any_process end it 'logs the end' do |