bug(github_actions): Skip unreliable test

Signed-off-by: Lucas Schwiderski <lucas@lschwiderski.de>
This commit is contained in:
Lucas Schwiderski 2021-06-26 14:50:40 +02:00
parent 8d88f1fa52
commit ab6df1280f
No known key found for this signature in database
GPG Key ID: AA12679AAA6DF4D8
1 changed files with 14 additions and 13 deletions

View File

@ -4,6 +4,18 @@ local awful = require("awful")
local wibox = require("wibox")
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.
local function create_titlebar(c)
local parts = {}
@ -88,20 +100,9 @@ local steps = {
assert(not success, msg)
assert(msg:find("invalid object"), msg)
-- On GitHub Actions, it can take a while for clients to be killed
-- properly.
local tries = 0
while (#objs > 0 and tries < 60) do
-- Check that it is garbage-collectable
collectgarbage("collect")
os.execute("sleep 1")
tries = tries + 1
end
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
end
end,