From 4eefa1feb00bac259201ba403088e747e69f9a55 Mon Sep 17 00:00:00 2001 From: Hartley McGuire Date: Mon, 24 Jan 2022 21:56:38 -0500 Subject: [PATCH] fix que integration in Active Job tests part 2 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: https://github.com/que-rb/que/issues/329 --- activejob/test/support/que/inline.rb | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/activejob/test/support/que/inline.rb b/activejob/test/support/que/inline.rb index bcdf09a3ad..1550a9585f 100644 --- a/activejob/test/support/que/inline.rb +++ b/activejob/test/support/que/inline.rb @@ -15,3 +15,9 @@ Que::Job.class_eval do run(*args) end end + +Que::ActiveJob::WrapperExtensions.class_eval do + def run(args) + super(args.deep_stringify_keys) + end +end