tests: Prevent a rare-ish race condition in the buttons test suite.

Given there is some async wibox redraw operations, there is a tiny,
tiny chance the test suite callback will be executed before the
redraw. It has been seen on the CI, so it is not 100% impossible.
This commit is contained in:
Emmanuel Lepage Vallee 2019-04-05 21:02:16 -04:00
parent c02ad71b0c
commit 68f6a567d1
1 changed files with 15 additions and 15 deletions

View File

@ -89,7 +89,7 @@ table.insert(steps, function()
end)
table.insert(steps, function()
assert(button._private.image ~= img)
if button._private.image == img then return end
return true
end)
@ -115,7 +115,7 @@ table.insert(steps, function()
end)
table.insert(steps, function()
assert(button._private.image ~= img)
if button._private.image == img then return end
return true
end)