-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tests(*): shutdown timerng instance after test completion (#14005)
- Loading branch information
Showing
5 changed files
with
63 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
local _M = {} | ||
|
||
function _M.shutdown() | ||
if _G.timerng then | ||
pcall(_G.timerng.destroy, _G.timerng) | ||
end | ||
|
||
-- kong.init_worker() stashes the timerng instance within the kong global and | ||
-- removes the _G.timerng reference, so check there too | ||
if _G.kong and _G.kong.timer and _G.kong.timer ~= _G.timerng then | ||
pcall(_G.kong.timer.destroy, _G.kong.timer) | ||
_G.kong.timer = nil | ||
end | ||
|
||
_G.timerng = nil | ||
end | ||
|
||
return _M |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
358fff3
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bazel Build
Docker image available
kong/kong:358fff3869ce330880827a947db8bac3b5066215
Artifacts available https://github.com/Kong/kong/actions/runs/12283746182