From: "Alexander V. Tikhonov" <avtikhon@tarantool.org> To: Vladimir Davydov <vdavydov.dev@gmail.com> Cc: "Alexander V. Tikhonov" <avtikhon@tarantool.org>, tarantool-patches@freelists.org Subject: [PATCH v1] test: app/socket flaky fails at 1951 line Date: Fri, 16 Aug 2019 09:15:18 +0300 [thread overview] Message-ID: <344efaff4bd8db559ecf4cd3635d645c68a72bde.1565936003.git.avtikhon@tarantool.org> (raw) Found that subtest for lua socket emulation on high loaded hosts closes the socket channel faster than write channel on finishes: wch:put("Fu") c:send("354 Please type your message\n") sc:close() It produces the following fail: [015] --- app/socket.result Thu Aug 15 02:55:31 2019 [015] +++ app/socket.reject Thu Aug 15 02:56:55 2019 [015] @@ -1951,8 +1951,7 @@ [015] c:receive("*l", "Line: ") [015] --- [015] - null [015] -- closed [015] -- 'Line: Fu' [015] +- Connection reset by peer [015] ... [015] c:receive() [015] --- To fix it we need some time delay before the closing routine call: wch:put("Fu") c:send("354 Please type your message\n") fiber.sleep(.1) sc:close() Fixes #4426 --- Github: https://github.com/tarantool/tarantool/tree/avtikhon/gh-4426-app-socket-1951 Issue: https://github.com/tarantool/tarantool/issues/4426 test/app/socket.result | 3 +++ test/app/socket.test.lua | 1 + 2 files changed, 4 insertions(+) diff --git a/test/app/socket.result b/test/app/socket.result index fd299424c..52b1ae3cb 100644 --- a/test/app/socket.result +++ b/test/app/socket.result @@ -1944,6 +1944,9 @@ c:send("354 Please type your message\n") --- - 29 ... +fiber.sleep(.1) +--- +... sc:close() --- - 1 diff --git a/test/app/socket.test.lua b/test/app/socket.test.lua index c72d41763..785a0b757 100644 --- a/test/app/socket.test.lua +++ b/test/app/socket.test.lua @@ -653,6 +653,7 @@ c:receive(4) c:receive("*l") wch:put("Fu") c:send("354 Please type your message\n") +fiber.sleep(.1) sc:close() c:receive("*l", "Line: ") c:receive() -- 2.17.1
reply other threads:[~2019-08-16 6:15 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=344efaff4bd8db559ecf4cd3635d645c68a72bde.1565936003.git.avtikhon@tarantool.org \ --to=avtikhon@tarantool.org \ --cc=tarantool-patches@freelists.org \ --cc=vdavydov.dev@gmail.com \ --subject='Re: [PATCH v1] test: app/socket flaky fails at 1951 line' \ /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