Tarantool development patches archive
 help / color / mirror / Atom feed
From: Ilya Kosarev <i.kosarev@tarantool.org>
To: tarantool-patches@dev.tarantool.org
Subject: [Tarantool-patches] [PATCH] Stabilize tcp_connect in test_run:cmd()
Date: Sat, 23 Nov 2019 17:50:12 +0300	[thread overview]
Message-ID: <20191123145012.16074-1-i.kosarev@tarantool.org> (raw)

For some tests, for example, replication/box_set_replication_stress,
socket.tcp_connect() in test_run:cmd() might sometimes fail when
running under high load. Now it is fixed.

Closes #193
---
https://github.com/tarantool/test-run/tree/i.kosarev/gh-193-stabilize-test-run-cmd
https://github.com/tarantool/test-run/issues/193

 test_run.lua | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/test_run.lua b/test_run.lua
index 63dfdef..0d450bd 100644
--- a/test_run.lua
+++ b/test_run.lua
@@ -11,6 +11,9 @@ local clock = require('clock')
 
 local function cmd(self, msg)
     local sock = socket.tcp_connect(self.host, self.port)
+    while sock == nil do
+        sock = socket.tcp_connect(self.host, self.port)
+    end
     local data = msg .. '\n'
     sock:send(data)
 
-- 
2.17.1

             reply	other threads:[~2019-11-23 14:50 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-23 14:50 Ilya Kosarev [this message]
2019-11-25 15:31 ` Alexander Turenko
2019-11-26  0:19   ` Ilya Kosarev

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=20191123145012.16074-1-i.kosarev@tarantool.org \
    --to=i.kosarev@tarantool.org \
    --cc=tarantool-patches@dev.tarantool.org \
    --subject='Re: [Tarantool-patches] [PATCH] Stabilize tcp_connect in test_run:cmd()' \
    /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