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

test: fix sporadic box/iproto_stress hang

The test has a number of problems:
 - It requires a huge number of file descriptors (> 10000), which is
   typically unavailable due to ulimit (1024).
 - Even if it is permitted to open the required number of file
   descriptors, it may still fail due to net.box.connect failing
   to connect by timeout.
 - If it fails, it silently hangs, which makes it difficult to
   investigate the failure.

Actually, there's no need to create that huge number of file descriptors
to test depletion of the tx fiber pool anymore, because IPROTO_MSG_MAX
was made tunable. Let's lower it down to 64 (default is 768) for the
test. Then we can create only 400 fibers and open ~800 file descriptors.

Also, let's wrap net.box.connect with pcall and limit the max wait time
to 10 seconds so that the test will terminate on any failure instead of
hanging forever.

Now, the test only takes ~2 seconds to complete, which doesn't qualify
as 'long'. Remove it from the list of long-run tests.

While we are at it, also fix indentation (it uses tabs instead of
spaces in Lua).

Closes #2473
parent ec210982
No related branches found
No related tags found
Loading
Loading
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