@@ -57,7 +57,7 @@ defmodule Sentry.Integrations.Phoenix.ObanTest do
5757 assert [ ] = transaction . spans
5858 end
5959
60- describe "skip_error_report_callback config" do
60+ describe "should_report_error_callback config" do
6161 setup do
6262 :telemetry . detach ( ErrorReporter )
6363
@@ -69,13 +69,13 @@ defmodule Sentry.Integrations.Phoenix.ObanTest do
6969 :ok
7070 end
7171
72- test "skips error reporting when callback returns true " do
72+ test "skips error reporting when callback returns false " do
7373 test_pid = self ( )
7474
7575 ErrorReporter . attach (
76- skip_error_report_callback : fn worker , job ->
76+ should_report_error_callback : fn worker , job ->
7777 send ( test_pid , { :callback_invoked , worker , job } )
78- true
78+ false
7979 end
8080 )
8181
@@ -94,13 +94,13 @@ defmodule Sentry.Integrations.Phoenix.ObanTest do
9494 assert [ ] = Sentry.Test . pop_sentry_reports ( )
9595 end
9696
97- test "reports error when callback returns false " do
97+ test "reports error when callback returns true " do
9898 test_pid = self ( )
9999
100100 ErrorReporter . attach (
101- skip_error_report_callback : fn worker , job ->
101+ should_report_error_callback : fn worker , job ->
102102 send ( test_pid , { :callback_invoked , worker , job } )
103- false
103+ true
104104 end
105105 )
106106
@@ -124,9 +124,9 @@ defmodule Sentry.Integrations.Phoenix.ObanTest do
124124 test_pid = self ( )
125125
126126 ErrorReporter . attach (
127- skip_error_report_callback : fn worker , job ->
127+ should_report_error_callback : fn worker , job ->
128128 send ( test_pid , { :callback_args , worker , job } )
129- false
129+ true
130130 end
131131 )
132132
@@ -155,10 +155,10 @@ defmodule Sentry.Integrations.Phoenix.ObanTest do
155155 test_pid = self ( )
156156
157157 ErrorReporter . attach (
158- skip_error_report_callback : fn _worker , job ->
159- should_skip = job . attempt < job . max_attempts
160- send ( test_pid , { :skip_decision , job . attempt , job . max_attempts , should_skip } )
161- should_skip
158+ should_report_error_callback : fn _worker , job ->
159+ should_report = job . attempt >= job . max_attempts
160+ send ( test_pid , { :report_decision , job . attempt , job . max_attempts , should_report } )
161+ should_report
162162 end
163163 )
164164
@@ -169,10 +169,10 @@ defmodule Sentry.Integrations.Phoenix.ObanTest do
169169
170170 Oban . drain_queue ( queue: :default )
171171
172- assert_receive { :skip_decision , attempt , max_attempts , should_skip }
172+ assert_receive { :report_decision , attempt , max_attempts , should_report }
173173 assert attempt == 1
174174 assert max_attempts == 3
175- assert should_skip == true
175+ assert should_report == false
176176
177177 assert [ ] = Sentry.Test . pop_sentry_reports ( )
178178 end
@@ -181,7 +181,7 @@ defmodule Sentry.Integrations.Phoenix.ObanTest do
181181 log =
182182 capture_log ( fn ->
183183 ErrorReporter . attach (
184- skip_error_report_callback : fn _worker , _job ->
184+ should_report_error_callback : fn _worker , _job ->
185185 raise "callback crashed!"
186186 end
187187 )
@@ -194,7 +194,7 @@ defmodule Sentry.Integrations.Phoenix.ObanTest do
194194 Oban . drain_queue ( queue: :default )
195195 end )
196196
197- assert log =~ "skip_error_report_callback failed"
197+ assert log =~ "should_report_error_callback failed"
198198 assert log =~ "FailingWorker"
199199 assert log =~ "callback crashed!"
200200
@@ -220,10 +220,10 @@ defmodule Sentry.Integrations.Phoenix.ObanTest do
220220 test_pid = self ( )
221221
222222 ErrorReporter . attach (
223- skip_error_report_callback : fn worker , _job ->
224- should_skip = worker = = FailingWorker
225- send ( test_pid , { :worker_check , worker , should_skip } )
226- should_skip
223+ should_report_error_callback : fn worker , _job ->
224+ should_report = worker ! = FailingWorker
225+ send ( test_pid , { :worker_check , worker , should_report } )
226+ should_report
227227 end
228228 )
229229
@@ -234,7 +234,7 @@ defmodule Sentry.Integrations.Phoenix.ObanTest do
234234
235235 Oban . drain_queue ( queue: :default )
236236
237- assert_receive { :worker_check , FailingWorker , true }
237+ assert_receive { :worker_check , FailingWorker , false }
238238
239239 assert [ ] = Sentry.Test . pop_sentry_reports ( )
240240 end
@@ -245,9 +245,9 @@ defmodule Sentry.Integrations.Phoenix.ObanTest do
245245 log =
246246 capture_log ( fn ->
247247 ErrorReporter . attach (
248- skip_error_report_callback : fn worker , job ->
248+ should_report_error_callback : fn worker , job ->
249249 send ( test_pid , { :callback_with_unknown_worker , worker , job } )
250- false
250+ true
251251 end
252252 )
253253
0 commit comments