Commit b842315d authored by Brett Walker's avatar Brett Walker

Reset ActiveJob queue adapters to :test

in `marginalia_spec.rb`
and remove quarantine of `service_desk_email_receiver_worker.rb`
parent 920b98ba
...@@ -95,14 +95,13 @@ RSpec.describe 'Marginalia spec' do ...@@ -95,14 +95,13 @@ RSpec.describe 'Marginalia spec' do
# have to do some extra steps to make this happen: # have to do some extra steps to make this happen:
# https://github.com/rails/rails/issues/37270#issuecomment-553927324 # https://github.com/rails/rails/issues/37270#issuecomment-553927324
around do |example| around do |example|
original_queue_adapter = ActiveJob::Base.queue_adapter
descendants = ActiveJob::Base.descendants + [ActiveJob::Base] descendants = ActiveJob::Base.descendants + [ActiveJob::Base]
ActiveJob::Base.queue_adapter = :sidekiq
descendants.each(&:disable_test_adapter) descendants.each(&:disable_test_adapter)
ActiveJob::Base.queue_adapter = :sidekiq
example.run 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 end
let(:delivery_job) { MarginaliaTestMailer.first_user.deliver_later } let(:delivery_job) { MarginaliaTestMailer.first_user.deliver_later }
......
...@@ -18,7 +18,7 @@ RSpec.describe ServiceDeskEmailReceiverWorker, :mailer do ...@@ -18,7 +18,7 @@ RSpec.describe ServiceDeskEmailReceiverWorker, :mailer do
worker.perform(email) worker.perform(email)
end end
context 'when service desk receiver raises an exception', quarantine: 'https://gitlab.com/gitlab-org/gitlab/-/issues/325579' do context 'when service desk receiver raises an exception' do
before do before do
allow_next_instance_of(Gitlab::Email::ServiceDeskReceiver) do |receiver| allow_next_instance_of(Gitlab::Email::ServiceDeskReceiver) do |receiver|
allow(receiver).to receive(:find_handler).and_return(nil) allow(receiver).to receive(:find_handler).and_return(nil)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment