From: Serge Petrenko <sergepetrenko@tarantool.org> To: vdavydov.dev@gmail.com Cc: tarantool-patches@freelists.org, Serge Petrenko <sergepetrenko@tarantool.org> Subject: [PATCH] test: fix another net.box failure Date: Fri, 19 Jul 2019 09:52:07 +0300 [thread overview] Message-ID: <20190719065207.3531-1-sergepetrenko@tarantool.org> (raw) This last error ``` [035] ... [035] disconnected_cnt [035] --- [035] -- 1 [035] +- 2 [035] ... [035] conn:close() [035] --- [035] ... [035] disconnected_cnt [035] --- [035] -- 2 [035] +- 3 [035] ... [035] test_run:cmd('stop server connecter') [035] --- [035] ``` Happens because net.box is able to connect to tarantool before it has finished bootstrap. When connecting, net.box tries to fetch schema executing a couple of selects, but fails to pass access check since grants aren't applied yet. This is described in detail in https://github.com/tarantool/tarantool/issues/2763#issuecomment-499046998 So, alter the test so that it tolerates multiple connection failures. Closes #4273 --- https://github.com/tarantool/tarantool/issues/4273 https://github.com/tarantool/tarantool/tree/sp/gh-4273-netbox test/box/net.box.result | 11 +++++++---- test/box/net.box.test.lua | 5 +++-- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/test/box/net.box.result b/test/box/net.box.result index 08039562f..1d9f43400 100644 --- a/test/box/net.box.result +++ b/test/box/net.box.result @@ -2343,16 +2343,19 @@ connected_cnt --- - 1 ... -disconnected_cnt +old_disconnected_cnt = disconnected_cnt --- -- 1 +... +disconnected_cnt >= 1 +--- +- true ... conn:close() --- ... -disconnected_cnt +disconnected_cnt == old_disconnected_cnt + 1 --- -- 2 +- true ... test_run:cmd('stop server connecter') --- diff --git a/test/box/net.box.test.lua b/test/box/net.box.test.lua index 3677b3076..de629ab59 100644 --- a/test/box/net.box.test.lua +++ b/test/box/net.box.test.lua @@ -949,9 +949,10 @@ test_run:cmd('stop server connecter') test_run:cmd('start server connecter') while conn.state ~= 'active' do fiber.sleep(0.1) end connected_cnt -disconnected_cnt +old_disconnected_cnt = disconnected_cnt +disconnected_cnt >= 1 conn:close() -disconnected_cnt +disconnected_cnt == old_disconnected_cnt + 1 test_run:cmd('stop server connecter') -- -- 2.20.1 (Apple Git-117)
next reply other threads:[~2019-07-19 6:52 UTC|newest] Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top 2019-07-19 6:52 Serge Petrenko [this message] 2019-07-19 8:41 ` [tarantool-patches] " Kirill Yukhin
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20190719065207.3531-1-sergepetrenko@tarantool.org \ --to=sergepetrenko@tarantool.org \ --cc=tarantool-patches@freelists.org \ --cc=vdavydov.dev@gmail.com \ --subject='Re: [PATCH] test: fix another net.box failure' \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox