1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
rails--rails/activejob/test/cases
Edouard CHIN d35cf4c05d Fix ActiveJob Test adapter not respecting retry attempts:
- ### Problem

  Given the below example the test adapter will retry the job
  indefinitely:

  ```ruby
    class BuggyJob < ActiveJob::Base
      retry_on(Exception,  attempts: 2)

      def perform
        raise "error"
      end
    end

    BuggyJob.perform_later
    perform_enqueued_jobs
  ```

  The problem is that when the job get retried, the
  `exception_executions` variable is not serialized/deserialized,
  resulting in ActiveJob to not be able to determine how many time
  this job was retried.

  The solution in this PR is to deserialize the whole job in the test
  adapter, and reserialize it before retrying.

  Fix #38391
2020-02-10 17:59:20 -04:00
..
adapter_test.rb
argument_serialization_test.rb Fix keyword arguments warnings in Active Job 2020-01-21 05:53:23 +09:00
callbacks_test.rb Fix regression where AJ#perform_now doesn't return the job's value: 2020-01-03 17:14:56 +01:00
exceptions_test.rb Disable ActiveJob retry jitter when given zero/falsey value (#38003) 2019-12-17 15:23:52 -03:00
job_serialization_test.rb Adding enque time tracking and logging 2019-02-13 19:20:41 -05:00
logging_test.rb Fix wrong logging message in AJ in case a job returns a falsey value: 2020-01-03 17:14:56 +01:00
queue_adapter_test.rb Fix queue adapter class delegation to point to self.class 2019-09-23 21:59:59 -03:00
queue_naming_test.rb Stop queue_name_prefix from being global 2019-09-13 18:30:19 -03:00
queue_priority_test.rb
queuing_test.rb Enable Style/RedundantBegin cop to avoid newly adding redundant begin block 2018-12-21 06:12:42 +09:00
rescue_test.rb
serializers_test.rb Enable Layout/EmptyLinesAroundAccessModifier cop 2019-06-13 12:00:45 +09:00
test_case_test.rb
test_helper_test.rb Fix ActiveJob Test adapter not respecting retry attempts: 2020-02-10 17:59:20 -04:00
timezones_test.rb Add support for timezones to Active Job 2018-02-22 14:14:42 +00:00
translation_test.rb