From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtpng1.m.smailru.net (smtpng1.m.smailru.net [94.100.181.251]) (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 7912942F4AD for ; Sun, 21 Jun 2020 18:50:12 +0300 (MSK) References: <4351b421b56115e2d8c35f60fdb5e8ba43a7b9fe.1592628521.git.avtikhon@tarantool.org> From: Vladislav Shpilevoy Message-ID: Date: Sun, 21 Jun 2020 17:50:10 +0200 MIME-Version: 1.0 In-Reply-To: <4351b421b56115e2d8c35f60fdb5e8ba43a7b9fe.1592628521.git.avtikhon@tarantool.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [Tarantool-patches] [PATCH v2] 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" , Sergey Bronnikov , Alexander Turenko Cc: tarantool-patches@dev.tarantool.org Hi! Thanks for the patch! > diff --git a/test/box/net.box_wait_connected_gh-3856.result b/test/box/net.box_wait_connected_gh-3856.result > index 9234e6cb9..0ac6d8a0b 100644 > --- a/test/box/net.box_wait_connected_gh-3856.result > +++ b/test/box/net.box_wait_connected_gh-3856.result > @@ -1,19 +1,22 @@ > net = require('net.box') > --- > ... > +test_run = require('test_run').new() > +--- > +... > -- > -- gh-3856: wait_connected = false is ignored. > -- > -c = net.connect('8.8.8.8:123456', {wait_connected = false}) > ---- > -... > -c > +do \ > + c = net.connect('8.8.8.8:1234', {wait_connected = false}) \ > + return c \ You said you grab all connection fields, but you don't. This construction is 100% the same as c = net.connect('8.8.8.8:1234', {wait_connected = false}) Without 'do', 'return', and 'end'. In the original fix from Alexander Tu. I see that he returned c.state, not just c. But since you may need to call close() anyway, you probably should return c, c.state So as to print the second value and close the first value. Another option - wrap all that into a function. Which calls close() inside, and returns the state. > +end > --- > - opts: > wait_connected: false > host: 8.8.8.8 > state: initial > - port: '123456' > + port: '1234' > ... > c:close()