Skip to content
Snippets Groups Projects
Commit 6f48b8d7 authored by Nikolay Shirokovskiy's avatar Nikolay Shirokovskiy Committed by Vladimir Davydov
Browse files

test: fix flaky gh-2717-no-quit-sigint

This test is quite a flaky in debug ASAN build. Let's fix it before
turning debug ASAN on in CI.

The issue is due to heavy load popen.read may return nil with 'TimedOut:
timed out' error. Just read again as in the other cases of this test.

Part of #7327

NO_CHANGELOG=internal
NO_DOC=internal
parent 37d0fdbf
No related branches found
No related tags found
No related merge requests found
......@@ -36,7 +36,10 @@ local time_quota = 10.0
local output = ''
while output:find(prompt) == nil
and clock.monotonic() - start_time < time_quota do
output = output .. ph:read({timeout = 1.0})
local data = ph:read({timeout = 1.0})
if data ~= nil then
output = output .. data
end
end
assert(clock.monotonic() - start_time < time_quota, 'time_quota is violated')
ph:signal(popen.signal.SIGINT)
......@@ -79,7 +82,10 @@ local prompt_name = 'tarantool'
local expected_output = prompt
while output:find(expected_output) == nil
and clock.monotonic() - start_time < time_quota do
output = output .. ph:read({timeout = 1.0})
local data = ph:read({timeout = 1.0})
if data ~= nil then
output = output .. data
end
end
assert(clock.monotonic() - start_time < time_quota, 'time_quota is violated')
......
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