diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-03-23 06:09:04 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-03-23 06:09:04 +0300 |
commit | 4f31109a95c149fc92ec1899fb18110160e02789 (patch) | |
tree | ea0aae5e1392159ae942e5171381b29f157ad0e2 /spec/lib/marginalia_spec.rb | |
parent | 5df6990daccf98d24f3ac45865d0386c3a4c3eb5 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/lib/marginalia_spec.rb')
-rw-r--r-- | spec/lib/marginalia_spec.rb | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/spec/lib/marginalia_spec.rb b/spec/lib/marginalia_spec.rb index 433eab38e62..040f70236c6 100644 --- a/spec/lib/marginalia_spec.rb +++ b/spec/lib/marginalia_spec.rb @@ -95,14 +95,13 @@ RSpec.describe 'Marginalia spec' do # have to do some extra steps to make this happen: # https://github.com/rails/rails/issues/37270#issuecomment-553927324 around do |example| - original_queue_adapter = ActiveJob::Base.queue_adapter descendants = ActiveJob::Base.descendants + [ActiveJob::Base] - - ActiveJob::Base.queue_adapter = :sidekiq descendants.each(&:disable_test_adapter) + ActiveJob::Base.queue_adapter = :sidekiq + example.run - descendants.each { |a| a.enable_test_adapter(ActiveJob::QueueAdapters::TestAdapter.new) } - ActiveJob::Base.queue_adapter = original_queue_adapter + + descendants.each { |a| a.queue_adapter = :test } end let(:delivery_job) { MarginaliaTestMailer.first_user.deliver_later } |