Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: box/net.box flaky fails on finding the 'timed out' error #4341

Closed
avtikhon opened this issue Jul 11, 2019 · 0 comments
Closed

test: box/net.box flaky fails on finding the 'timed out' error #4341

avtikhon opened this issue Jul 11, 2019 · 0 comments
Assignees
Labels
flaky test qa Issues related to tests or testing subsystem
Milestone

Comments

@avtikhon
Copy link
Contributor

Tarantool version:
master

OS version:
Debian/Ubuntu

Bug description:

[004] Test failed! Result content mismatch:
[004] --- box/net.box.1533.result	Thu Jul 11 15:10:28 2019
[004] +++ box/net.box.1533.reject	Thu Jul 11 15:11:34 2019
[004] @@ -53,7 +53,7 @@
[004]   | ...
[004]  nb.error:find('timed out') ~= nil;
[004]   | ---
[004] - | - true
[004] + | - false
[004]   | ...
[004]  nb:close();
[004]   | ---

Steps to reproduce:
Run near to 10 loops or more to get the issue:

l=0 ; while ./test-run.py -j40 `for r in {1..100} ; do echo box/net.box.1533.test.lua ; done` 2>/dev/null ; do l=$(($l+1)) ; echo ======== $l ============= ; done

Reproducer:

net = require('net.box')
fiber = require 'fiber'
test_run = require('test_run').new()

-- Tarantool < 1.7.1 compatibility (gh-1533)
c = net.new(box.cfg.listen)
c:ping()
c:close()

-- Test for connect_timeout > 0 in netbox connect
test_run:cmd("setopt delimiter ';'");
greeting =
"Tarantool 1.7.3 (Lua console)~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n" ..
"type 'help' for interactive help~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n";
socket = require('socket');
srv = socket.tcp_server('localhost', 0, {
    handler = function(fd)
        local fiber = require('fiber')
        fiber.sleep(0.1)
        fd:write(greeting)
    end
});
port = srv:name().port
-- we must get timeout
nb = net.new('localhost:' .. port, {
    wait_connected = true, console = true,
    connect_timeout = 0.01
});
nb.error:find('timed out') ~= nil;
nb:close();
-- we must get peer closed
nb = net.new('localhost:' .. port, {
    wait_connected = true, console = true,
    connect_timeout = 0.2
});
nb.error ~= "Timeout exceeded";
nb:close();
test_run:cmd("setopt delimiter ''");
srv:close()

test_run:cmd("clear filter")

Optional (but very desirable):

  • coredump
  • backtrace
  • netstat
ImeevMA added a commit that referenced this issue Jul 13, 2019
The "box/net.box.test.lua" test contains a check that the error
received contains a 'timed out'. But in cases when testing was
conducted on a slow computer or in the case of a very large load,
it is possible that the connection time-out will be reached
earlier than the mentioned error. In this case, the error "Invalid
argument" will be returned. To prevent this from happening,
this patch will increase the connection timeout.

Closes #4341
ImeevMA added a commit that referenced this issue Jul 15, 2019
The "box/net.box.test.lua" test contains a check that the error
received contains a 'timed out'. But in cases when testing was
conducted on a slow computer or in the case of a very large load,
it is possible that the connection time-out will be reached
earlier than the mentioned error. In this case, the error "Invalid
argument" will be returned. To prevent this from happening,
this patch will increase the connection timeout.

Closes #4341
@kyukhin kyukhin added the qa Issues related to tests or testing subsystem label Jul 18, 2019
@kyukhin kyukhin added this to the 2.2.0 milestone Jul 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
flaky test qa Issues related to tests or testing subsystem
Projects
None yet
Development

No branches or pull requests

3 participants