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:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-07-27 12:08:34 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-07-27 12:08:34 +0300
commitd0a683e342c9e59bec8bb83879f0fc959b79224e (patch)
treefac5bd8be0faee2016b6ad67c25206ccf42c3447 /spec/workers
parent0ab741639e9d9a83833661925167a98d96751135 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/workers')
-rw-r--r--spec/workers/concerns/waitable_worker_spec.rb40
1 files changed, 13 insertions, 27 deletions
diff --git a/spec/workers/concerns/waitable_worker_spec.rb b/spec/workers/concerns/waitable_worker_spec.rb
index bf156c3b8cb..f6d4cc4679d 100644
--- a/spec/workers/concerns/waitable_worker_spec.rb
+++ b/spec/workers/concerns/waitable_worker_spec.rb
@@ -30,33 +30,19 @@ RSpec.describe WaitableWorker do
describe '.bulk_perform_and_wait' do
context '1 job' do
- it 'runs the jobs asynchronously' do
- arguments = [[1]]
-
- expect(worker).to receive(:bulk_perform_async).with(arguments)
-
- worker.bulk_perform_and_wait(arguments)
- end
-
- context 'when the feature flag `always_async_project_authorizations_refresh` is turned off' do
- before do
- stub_feature_flags(always_async_project_authorizations_refresh: false)
- end
-
- it 'inlines the job' do
- args_list = [[1]]
- expect(worker).to receive(:bulk_perform_inline).with(args_list).and_call_original
- expect(Gitlab::AppJsonLogger).to(
- receive(:info).with(a_hash_including('message' => 'running inline',
- 'class' => 'Gitlab::Foo::Bar::DummyWorker',
- 'job_status' => 'running',
- 'queue' => 'foo_bar_dummy'))
- .once)
-
- worker.bulk_perform_and_wait(args_list)
-
- expect(worker.counter).to eq(1)
- end
+ it 'inlines the job' do
+ args_list = [[1]]
+ expect(worker).to receive(:bulk_perform_inline).with(args_list).and_call_original
+ expect(Gitlab::AppJsonLogger).to(
+ receive(:info).with(a_hash_including('message' => 'running inline',
+ 'class' => 'Gitlab::Foo::Bar::DummyWorker',
+ 'job_status' => 'running',
+ 'queue' => 'foo_bar_dummy'))
+ .once)
+
+ worker.bulk_perform_and_wait(args_list)
+
+ expect(worker.counter).to eq(1)
end
end