Skip to content
Snippets Groups Projects
Commit ede831d3 authored by Vladimir Davydov's avatar Vladimir Davydov Committed by Vladimir Davydov
Browse files

test: set shutdown timeout to infinity for default luatest instance

With the default shutdown timeout of 3 seconds, a test that leaves
behind asynchronous requests would still pass, but it would take longer
to finish, because the server instance started by Tarantool would have
to wait for the dangling requests to complete. Setting the timeout to
infinity will result in a hang, making us fix the test.

Infinite timeout is also good for catching bugs like #7225 and #7256.

We don't set the timeout for diff and TAP tests because those are
deprecated and shouldn't be used for writing new tests. Nevertheless,
I manually checked that none of them hangs if the timeout is set to
infinity.

Closes #6820

NO_DOC=test
NO_CHANGELOG=test
parent 9cf03555
No related branches found
No related tags found
No related merge requests found
......@@ -3,6 +3,8 @@
local fun = require('fun')
local json = require('json')
local TIMEOUT_INFINITY = 500 * 365 * 86400
local function default_cfg()
return {
work_dir = os.getenv('TARANTOOL_WORKDIR'),
......@@ -29,6 +31,13 @@ local function box_cfg(cfg)
return fun.chain(default_cfg(), env_cfg(), cfg or {}):tomap()
end
-- Set the shutdown timeout to infinity so that we can catch tests that leave
-- asynchronous requests. If we used the default timeout of 3 seconds, such a
-- test would still pass, but it would slow down the overall test run, because
-- the server would take longer to stop. Setting the timeout to infinity makes
-- such bad tests hang and fail.
box.ctl.set_on_shutdown_timeout(TIMEOUT_INFINITY)
box.cfg(box_cfg())
box.schema.user.grant('guest', 'super', nil, nil, {if_not_exists = true})
......
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