Skip to content

Commit

Permalink
tests(*): continue exit event callbacks after timer.shutdown()
Browse files Browse the repository at this point in the history
  • Loading branch information
flrgh committed Dec 10, 2024
1 parent ff03381 commit 86aa713
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion spec/busted-ci-helper.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,13 @@ do
assert(type(shutdown_timers) == "function")

-- shutdown lua-resty-timer-ng to allow the nginx worker to stop quickly
busted.subscribe({ 'exit' }, shutdown_timers)
busted.subscribe({ 'exit' }, function()
shutdown_timers()

-- second return value must be `true`, or else all other callbacks for this
-- event will be skipped
return nil, true
end)
end

local BUSTED_EVENT_PATH = os.getenv("BUSTED_EVENT_PATH")
Expand Down

0 comments on commit 86aa713

Please sign in to comment.