aboutsummaryrefslogtreecommitdiff
path: root/test/functional/helpers.lua
diff options
context:
space:
mode:
Diffstat (limited to 'test/functional/helpers.lua')
-rw-r--r--test/functional/helpers.lua7
1 files changed, 4 insertions, 3 deletions
diff --git a/test/functional/helpers.lua b/test/functional/helpers.lua
index 335cf3c3ff..42ed1800d3 100644
--- a/test/functional/helpers.lua
+++ b/test/functional/helpers.lua
@@ -246,12 +246,13 @@ local function retry(max, max_ms, fn)
return result
end
if (max and tries >= max) or (luv.now() - start_time > timeout) then
- break
+ if type(result) == "string" then
+ result = "\nretry() attempts: "..tostring(tries).."\n"..result
+ end
+ error(result)
end
tries = tries + 1
end
- -- Do not use pcall() for the final attempt, let the failure bubble up.
- return fn()
end
local function clear(...)