@@ -219,50 +219,6 @@ def perform
219
219
event = transport . events . last . to_json_compatible
220
220
expect ( event . dig ( "exception" , "values" , 0 , "type" ) ) . to eq ( "ZeroDivisionError" )
221
221
end
222
-
223
- context "and in user-defined reporting job too" do
224
- before do
225
- Sentry . configuration . async = lambda do |event , hint |
226
- UserDefinedReportingJob . perform_now ( event , hint )
227
- end
228
- end
229
-
230
- class UserDefinedReportingJob < ActiveJob ::Base
231
- def perform ( event , hint )
232
- Post . find ( 0 )
233
- rescue
234
- raise ActiveJob ::DeserializationError
235
- end
236
- end
237
-
238
- it "doesn't cause infinite loop because of excluded exceptions" do
239
- expect do
240
- DeserializationErrorJob . perform_now
241
- end . to raise_error ( ActiveJob ::DeserializationError , /divided by 0/ )
242
- end
243
- end
244
-
245
- context "and in customized SentryJob too" do
246
- before do
247
- class CustomSentryJob < ::Sentry ::SendEventJob
248
- def perform ( event , hint )
249
- raise "Not excluded exception"
250
- rescue
251
- raise ActiveJob ::DeserializationError
252
- end
253
- end
254
-
255
- Sentry . configuration . async = lambda do |event , hint |
256
- CustomSentryJob . perform_now ( event , hint )
257
- end
258
- end
259
-
260
- it "doesn't cause infinite loop" do
261
- expect do
262
- DeserializationErrorJob . perform_now
263
- end . to raise_error ( ActiveJob ::DeserializationError , /divided by 0/ )
264
- end
265
- end
266
222
end
267
223
268
224
context 'using rescue_from' do
0 commit comments