bug(github_actions): Skip unreliable test
Signed-off-by: Lucas Schwiderski <lucas@lschwiderski.de>
This commit is contained in:
parent
8d88f1fa52
commit
ab6df1280f
|
@ -4,6 +4,18 @@ local awful = require("awful")
|
||||||
local wibox = require("wibox")
|
local wibox = require("wibox")
|
||||||
local gtable = require("gears.table")
|
local gtable = require("gears.table")
|
||||||
|
|
||||||
|
-- This test has been proven to perform unreliably on GitHub Actions.
|
||||||
|
-- The additional Lua process that creates the test client will sometimes
|
||||||
|
-- linger for an unpredictable amount of time.
|
||||||
|
-- Stalling the step to check for clean-up increases the chance for success,
|
||||||
|
-- but does not fix the issue.
|
||||||
|
-- See https://github.com/awesomeWM/awesome/pull/3292.
|
||||||
|
if os.getenv("GITHUB_ACTIONS") then
|
||||||
|
print("Skipping unreliable test 'test-leak-client'")
|
||||||
|
runner.run_steps { function() return true end }
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
-- Create a titlebar and return a table with references to its member widgets.
|
-- Create a titlebar and return a table with references to its member widgets.
|
||||||
local function create_titlebar(c)
|
local function create_titlebar(c)
|
||||||
local parts = {}
|
local parts = {}
|
||||||
|
@ -88,20 +100,9 @@ local steps = {
|
||||||
assert(not success, msg)
|
assert(not success, msg)
|
||||||
assert(msg:find("invalid object"), msg)
|
assert(msg:find("invalid object"), msg)
|
||||||
|
|
||||||
-- On GitHub Actions, it can take a while for clients to be killed
|
-- Check that it is garbage-collectable
|
||||||
-- properly.
|
collectgarbage("collect")
|
||||||
local tries = 0
|
|
||||||
while (#objs > 0 and tries < 60) do
|
|
||||||
collectgarbage("collect")
|
|
||||||
os.execute("sleep 1")
|
|
||||||
tries = tries + 1
|
|
||||||
end
|
|
||||||
|
|
||||||
assert(#objs == 0, "still clients left after garbage collect")
|
assert(#objs == 0, "still clients left after garbage collect")
|
||||||
if tries > 0 then
|
|
||||||
print("Took approx. " .. tries .. " seconds to clean leaked client")
|
|
||||||
end
|
|
||||||
|
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
|
|
Loading…
Reference in New Issue