diff options
Diffstat (limited to 'test/functional/helpers.lua')
-rw-r--r-- | test/functional/helpers.lua | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/test/functional/helpers.lua b/test/functional/helpers.lua index 13e6f36510..13b06e7f1b 100644 --- a/test/functional/helpers.lua +++ b/test/functional/helpers.lua @@ -251,12 +251,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(...) |