diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-01-20 12:16:11 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-01-20 12:16:11 +0300 |
commit | edaa33dee2ff2f7ea3fac488d41558eb5f86d68c (patch) | |
tree | 11f143effbfeba52329fb7afbd05e6e2a3790241 /spec/support/shared_examples/lib/gitlab/database/background_migration_job_shared_examples.rb | |
parent | d8a5691316400a0f7ec4f83832698f1988eb27c1 (diff) |
Add latest changes from gitlab-org/gitlab@14-7-stable-eev14.7.0-rc42
Diffstat (limited to 'spec/support/shared_examples/lib/gitlab/database/background_migration_job_shared_examples.rb')
-rw-r--r-- | spec/support/shared_examples/lib/gitlab/database/background_migration_job_shared_examples.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/spec/support/shared_examples/lib/gitlab/database/background_migration_job_shared_examples.rb b/spec/support/shared_examples/lib/gitlab/database/background_migration_job_shared_examples.rb index 7888ade56eb..213f084be17 100644 --- a/spec/support/shared_examples/lib/gitlab/database/background_migration_job_shared_examples.rb +++ b/spec/support/shared_examples/lib/gitlab/database/background_migration_job_shared_examples.rb @@ -22,19 +22,19 @@ RSpec.shared_examples 'marks background migration job records' do end end -RSpec.shared_examples 'finalized background migration' do +RSpec.shared_examples 'finalized background migration' do |worker_class| it 'processed the scheduled sidekiq queue' do queued = Sidekiq::ScheduledSet .new .select do |scheduled| - scheduled.klass == 'BackgroundMigrationWorker' && + scheduled.klass == worker_class.name && scheduled.args.first == job_class_name end expect(queued.size).to eq(0) end it 'processed the async sidekiq queue' do - queued = Sidekiq::Queue.new('BackgroundMigrationWorker') + queued = Sidekiq::Queue.new(worker_class.name) .select { |scheduled| scheduled.klass == job_class_name } expect(queued.size).to eq(0) end @@ -42,8 +42,8 @@ RSpec.shared_examples 'finalized background migration' do include_examples 'removed tracked jobs', 'pending' end -RSpec.shared_examples 'finalized tracked background migration' do - include_examples 'finalized background migration' +RSpec.shared_examples 'finalized tracked background migration' do |worker_class| + include_examples 'finalized background migration', worker_class include_examples 'removed tracked jobs', 'succeeded' end |