Tarantool development patches archive
 help / color / mirror / Atom feed
From: "Alexander V. Tikhonov" <avtikhon@tarantool.org>
To: Oleg Piskunov <o.piskunov@tarantool.org>,
	Sergey Bronnikov <sergeyb@tarantool.org>
Cc: tarantool-patches@dev.tarantool.org,
	Alexander Turenko <alexander.turenko@tarantool.org>
Subject: [Tarantool-patches] [PATCH v1] test: flaky box/net.box_wait_connected_gh-3856
Date: Tue, 16 Jun 2020 17:25:55 +0300	[thread overview]
Message-ID: <21762ffd957d1cb399c56475af02e97ecb5f6678.1592317473.git.avtikhon@tarantool.org> (raw)

Found issue running test on FreeBSD VBox host:

 [011] --- box/net.box_wait_connected_gh-3856.result	Mon Jun 15 09:39:49 2020
 [011] +++ box/net.box_wait_connected_gh-3856.reject	Fri May  8 08:23:30 2020
 [011] @@ -12,7 +12,8 @@
 [011]  - opts:
 [011]      wait_connected: false
 [011]    host: 8.8.8.8
 [011] -  state: initial
 [011] +  state: error
 [011] +  error: Invalid argument
 [011]    port: '123456'
 [011]  ...
 [011]  c:close()

The test uses external Google DNS IP, check information on it:
  https://developers.google.com/speed/public-dns/docs/using
This issue appears because the link is external and connection
may fail from time to time. In this case the test should wait
till connection state became 'initial' and only after that the
test can continue.

Closes #5083
---

Github: https://github.com/tarantool/tarantool/tree/avtikhon/gh-5083-net-box-google-dns
Issue: https://github.com/tarantool/tarantool/issues/5083

 test/box/net.box_wait_connected_gh-3856.result   | 9 +++++++++
 test/box/net.box_wait_connected_gh-3856.test.lua | 4 ++++
 2 files changed, 13 insertions(+)

diff --git a/test/box/net.box_wait_connected_gh-3856.result b/test/box/net.box_wait_connected_gh-3856.result
index 9234e6cb9..6b8a94b43 100644
--- a/test/box/net.box_wait_connected_gh-3856.result
+++ b/test/box/net.box_wait_connected_gh-3856.result
@@ -1,12 +1,21 @@
 net = require('net.box')
 ---
 ...
+test_run = require('test_run').new()
+---
+...
 --
 -- gh-3856: wait_connected = false is ignored.
+-- Test uses Google DNS IP for testing:
+-- https://developers.google.com/speed/public-dns/docs/using
 --
 c = net.connect('8.8.8.8:123456', {wait_connected = false})
 ---
 ...
+test_run:wait_cond(function() return c.state == 'initial' end)
+---
+- true
+...
 c
 ---
 - opts:
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..d9fa80f3f 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,12 @@
 net = require('net.box')
+test_run = require('test_run').new()
 
 --
 -- gh-3856: wait_connected = false is ignored.
+-- Test uses Google DNS IP for testing:
+-- https://developers.google.com/speed/public-dns/docs/using
 --
 c = net.connect('8.8.8.8:123456', {wait_connected = false})
+test_run:wait_cond(function() return c.state == 'initial' end)
 c
 c:close()
-- 
2.17.1

             reply	other threads:[~2020-06-16 14:25 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-16 14:25 Alexander V. Tikhonov [this message]
2020-06-18 18:25 ` Alexander Turenko
2020-06-20  4:47   ` Alexander V. Tikhonov

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=21762ffd957d1cb399c56475af02e97ecb5f6678.1592317473.git.avtikhon@tarantool.org \
    --to=avtikhon@tarantool.org \
    --cc=alexander.turenko@tarantool.org \
    --cc=o.piskunov@tarantool.org \
    --cc=sergeyb@tarantool.org \
    --cc=tarantool-patches@dev.tarantool.org \
    --subject='Re: [Tarantool-patches] [PATCH v1] 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