tests: Try to mitigate a flacky test with luajit 5.1.

Give more attempt for the wibars to be GCed. This test fails ~5% of
the time since moving from Travis CI to GitHub actions.
This commit is contained in:
Emmanuel Lepage Vallee 2021-09-20 15:34:04 -07:00
parent bd8f2f936b
commit ccbe116877
1 changed files with 15 additions and 1 deletions

View File

@ -475,15 +475,29 @@ table.insert(steps, function()
rwibar:remove()
twibar:remove()
for _, w in ipairs(wibars) do
assert(not w.visible)
end
-- Make sure the placement doesn't hold a reference.
bwibar, lwibar, rwibar, twibar = nil, nil, nil, nil
screen.primary.mywibox = nil
return true
end)
table.insert(steps, function()
for _=1, 3 do
collectgarbage("collect")
end
assert(not next(wibars))
if next(wibars) then
for _, w in ipairs(wibars) do
assert(not w.visible)
end
return
end
return true
end)