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 committed Jan 25, 2022
1 parent 23ce9a7 commit 4eefa1f
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 4eefa1f

Please sign in to comment.