From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp51.i.mail.ru (smtp51.i.mail.ru [94.100.177.111]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id 3781642EF5C for ; Tue, 23 Jun 2020 16:42:39 +0300 (MSK) Date: Tue, 23 Jun 2020 16:41:47 +0300 From: Alexander Turenko Message-ID: <20200623134147.5rehpgvohbdwgh56@tkn_work_nb> References: <48a12df934540568d8649642f8844c4f1b81d6f9.1592811922.git.avtikhon@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <48a12df934540568d8649642f8844c4f1b81d6f9.1592811922.git.avtikhon@tarantool.org> Subject: Re: [Tarantool-patches] [PATCH v3] test: flaky box/net.box_wait_connected_gh-3856 List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Alexander V. Tikhonov" Cc: tarantool-patches@dev.tarantool.org, Vladislav Shpilevoy LGTM. I have a few comments, but it is just for appearance, nothing critical. No need to re-review with me if you'll change it in the proposed ways. WBR, Alexander Turenko. > Co-authored-by: Alexander Turenko > Co-authored-by: Vladislav Shpilevoy Typo: no space before '<'. > diff --git a/test/box/net.box_wait_connected_gh-3856.test.lua b/test/box/net.box_wait_connected_gh-3856.test.lua > index 29e997fb5..7721d3379 100644 > --- a/test/box/net.box_wait_connected_gh-3856.test.lua > +++ b/test/box/net.box_wait_connected_gh-3856.test.lua > @@ -1,8 +1,16 @@ > net = require('net.box') > +test_run = require('test_run').new() It is not necessary anymore: you can just use backslash and don't use delimiters. Up to you, but this way is shorter and looks more elegant. > +test_run:cmd("setopt delimiter ';'") > +function check_connection() > + local c = net.connect('8.8.8.8:1234', {wait_connected = false}) > + local cstate = c.state > + c:close() > + return cstate > +end; It looks okay, but we can do it without defining a function. | do \ | local c = <...> \ | local res = c.state \ | c:close() \ | return res \ | end Up to you.