Tarantool development patches archive
 help / color / mirror / Atom feed
From: Alexander Turenko <alexander.turenko@tarantool.org>
To: "Alexander V. Tikhonov" <avtikhon@tarantool.org>
Cc: tarantool-patches@dev.tarantool.org,
	Vladislav Shpilevoy <v.shpilevoy@tarantool.org>
Subject: Re: [Tarantool-patches] [PATCH v3] test: flaky box/net.box_wait_connected_gh-3856
Date: Tue, 23 Jun 2020 16:41:47 +0300	[thread overview]
Message-ID: <20200623134147.5rehpgvohbdwgh56@tkn_work_nb> (raw)
In-Reply-To: <48a12df934540568d8649642f8844c4f1b81d6f9.1592811922.git.avtikhon@tarantool.org>

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 <alexander.turenko@tarantool.org>
> Co-authored-by: Vladislav Shpilevoy<v.shpilevoy@tarantool.org>

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.

      reply	other threads:[~2020-06-23 13:42 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-22  7:46 Alexander V. Tikhonov
2020-06-23 13:41 ` Alexander Turenko [this message]

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=20200623134147.5rehpgvohbdwgh56@tkn_work_nb \
    --to=alexander.turenko@tarantool.org \
    --cc=avtikhon@tarantool.org \
    --cc=tarantool-patches@dev.tarantool.org \
    --cc=v.shpilevoy@tarantool.org \
    --subject='Re: [Tarantool-patches] [PATCH v3] test: flaky box/net.box_wait_connected_gh-3856' \
    /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