diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-07-11 18:08:34 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-07-11 18:08:34 +0300 |
commit | c10eac33abd1b8ff5f296b200bec852e5714dac2 (patch) | |
tree | e706ee930300cc7b92160c7eff11b6c0de094e3a /spec/workers | |
parent | 8db5a837253227db3911940f0acca8f8ae5478b2 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/workers')
-rw-r--r-- | spec/workers/concerns/waitable_worker_spec.rb | 25 |
1 files changed, 2 insertions, 23 deletions
diff --git a/spec/workers/concerns/waitable_worker_spec.rb b/spec/workers/concerns/waitable_worker_spec.rb index 8cc12b0cb30..1c23c4e3758 100644 --- a/spec/workers/concerns/waitable_worker_spec.rb +++ b/spec/workers/concerns/waitable_worker_spec.rb @@ -76,33 +76,12 @@ RSpec.describe WaitableWorker do end context '>= 4 jobs' do - it 'runs jobs using sidekiq and no waiter key' do + it 'runs jobs using sidekiq' do arguments = 1.upto(5).map { |i| [i] } expect(worker).to receive(:bulk_perform_async).with(arguments) - worker.bulk_perform_and_wait(arguments, timeout: 2) - end - - it 'runs > 10 * timeout jobs using sidekiq and no waiter key' do - arguments = 1.upto(21).map { |i| [i] } - - expect(worker).to receive(:bulk_perform_async).with(arguments) - - worker.bulk_perform_and_wait(arguments, timeout: 2) - end - - context 'when the feature flag `async_only_project_authorizations_refresh` is turned off' do - before do - stub_feature_flags(async_only_project_authorizations_refresh: false) - end - - it 'runs > 3 jobs using sidekiq and a waiter key' do - expect(worker).to receive(:bulk_perform_async) - .with([[1, anything], [2, anything], [3, anything], [4, anything]]) - - worker.bulk_perform_and_wait([[1], [2], [3], [4]]) - end + worker.bulk_perform_and_wait(arguments) end end end |