Skip to content

Commit

Permalink
Sentry spec fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Robgra13 committed Oct 25, 2024
1 parent 617268a commit d57952d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions spec/sidekiq_poison_pill_remedy_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
let(:default_queue) { "default" }
let(:poison_pill_queue) { "poison_pill" }
let(:enqueue_job) { MyJob.set(queue: job_queue).perform_async("fail") }
let(:job) { Sidekiq::Queue.new(default_queue).find_job(enqueue_job) }
let(:job) { Sidekiq::Queue.new(job_queue).find_job(enqueue_job) }

before do
Sidekiq::Testing.disable!
Expand All @@ -19,7 +19,7 @@
enqueue_job

allow_any_instance_of(Sidekiq::DeadSet).to receive(:find_job).with(enqueue_job).and_return(job)
allow(Sentry).to receive(:capture_message)
allow(Sentry).to receive(:capture_message).and_call_original
end

context "when the job is a poison pill in non-poison pill queue" do
Expand All @@ -43,6 +43,8 @@
let(:job_queue) { poison_pill_queue }

it "keep the jobs in posion pill queue and sends error notification" do
expect(job.queue).to eq("poison_pill")

expect do
call
end.to avoid_changing { Sidekiq::Queue.new(default_queue).count }.from(0)
Expand Down

0 comments on commit d57952d

Please sign in to comment.