diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-08-05 00:09:04 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-08-05 00:09:04 +0300 |
commit | 155fb78b9a3017640b527bc41c9096642ca11aca (patch) | |
tree | 56a8fa90237548d86968da021ccc772245fa7667 /qa/spec | |
parent | f5a72705e46f835812ffcc51658eecb08fbdf050 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'qa/spec')
-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 |