Skip to content
Snippets Groups Projects
Commit 8f3fc2ef authored by Sergey Ostanevich's avatar Sergey Ostanevich Committed by Nick Volynkin
Browse files

test: tarantoolctl.test flakiness fixup

The `recursive_rmdir` can start execution while tarantool instance
started by the tarantoolctl is in the process of shutdown. As a result
the instance pid file can be available at the name collection, but by
the time of its removal the instance deletes it by itself.

NO_DOC=test
NO_CHANGELOG=test
parent 1622097f
No related branches found
No related tags found
No related merge requests found
......@@ -44,12 +44,14 @@ local function recursive_rmdir(path)
end
for _, file in ipairs(path_content) do
local stat = fio.stat(file)
if stat:is_dir() then
recursive_rmdir(file)
else
if fio.unlink(file) == false then
print(string.format('!!! failed to unlink file "%s"', file))
print(string.format('!!! [errno %s]: %s', errno(), errno.strerror()))
if stat ~= nil then
if stat:is_dir() then
recursive_rmdir(file)
else
if fio.unlink(file) == false then
print(string.format('!!! failed to unlink file "%s"', file))
print(string.format('!!! [errno %s]: %s', errno(), errno.strerror()))
end
end
end
end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment