Skip to content

Commit 5e9f3e1

Browse files
authored
Merge pull request #1539 from appsignal/fix-delayed-job-hook-spec-order
Fix Delayed Job hook spec order dependency
2 parents c1f6849 + 0d98b0e commit 5e9f3e1

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

spec/lib/appsignal/hooks/delayed_job_spec.rb

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,13 @@ def self.plugins
1010
@plugins ||= []
1111
end
1212
end)
13-
start_agent
13+
# Install the hook directly rather than through `start_agent`. Hooks
14+
# install once per process and are never reset, so relying on
15+
# `start_agent` made "adds the plugin" pass only when this spec was the
16+
# first to install the Delayed Job hook -- it saw an empty stubbed worker
17+
# (and failed) once any other spec had installed it first. Mirrors the
18+
# Shoryuken hook spec.
19+
described_class.new.install
1420
end
1521

1622
describe "#dependencies_present?" do

0 commit comments

Comments
 (0)