aboutsummaryrefslogtreecommitdiffstats
path: root/activejob/test/jobs/retry_job.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activejob/test/jobs/retry_job.rb')
-rw-r--r--activejob/test/jobs/retry_job.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/activejob/test/jobs/retry_job.rb b/activejob/test/jobs/retry_job.rb
index 1383fffd7d..68dc17e16c 100644
--- a/activejob/test/jobs/retry_job.rb
+++ b/activejob/test/jobs/retry_job.rb
@@ -24,6 +24,7 @@ class RetryJob < ActiveJob::Base
retry_on ExponentialWaitTenAttemptsError, wait: :exponentially_longer, attempts: 10
retry_on CustomWaitTenAttemptsError, wait: ->(executions) { executions * 2 }, attempts: 10
retry_on(CustomCatchError) { |job, error| JobBuffer.add("Dealt with a job that failed to retry in a custom way after #{job.arguments.second} attempts. Message: #{error.message}") }
+ retry_on(ActiveJob::DeserializationError) { |job, error| JobBuffer.add("Raised #{error.class} for the #{job.executions} time") }
discard_on DiscardableError
discard_on FirstDiscardableErrorOfTwo, SecondDiscardableErrorOfTwo