Skip to content

Commit

Permalink
fix que integration in Active Job tests part 2
Browse files Browse the repository at this point in the history
Fixing the synchronous setting uncovered some more errors with Que 1.0:
exception tests with retry_on started failing due to an assertion in
Que's Active Job integration that running jobs won't nest. However, this
is not the case when running retriable jobs synchronously.

This change overrides Que's Active Job wrapper to not make this
assertion.

I also opened an issue in the que repo: que-rb/que#329
  • Loading branch information
skipkayhil authored and public-rant committed Feb 17, 2022
1 parent 7915e0c commit 2428bd9
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions activejob/test/support/que/inline.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,9 @@ def self.enqueue(*args)
run(*args)
end
end

Que::ActiveJob::WrapperExtensions.class_eval do
def run(args)
super(args.deep_stringify_keys)
end
end

0 comments on commit 2428bd9

Please sign in to comment.