Skip to content

Commit

Permalink
print ascend_output if healthcheck timeout test fails
Browse files Browse the repository at this point in the history
  • Loading branch information
cryi committed Dec 30, 2024
1 parent 056256f commit 9e20a5d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tests/healtchecks.lua
Original file line number Diff line number Diff line change
Expand Up @@ -127,12 +127,15 @@ test["health checks - timeout"] = function()
return false, "Healthcheck setting is not updated correctly"
end

local ascend_output = ""
while true do
local line = ascendOutput:read("l", 1)
ascend_output = ascend_output .. line .. "\n"
if line and line:match("healthcheck for date:default timed out") then
break
end
if os.time() > startTime + 20 then
print(ascend_output)
return false, "Service did not timeout in time: " .. tostring(os.time() - startTime) .. "s"
end
end
Expand Down

0 comments on commit 9e20a5d

Please sign in to comment.