From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp37.i.mail.ru (smtp37.i.mail.ru [94.100.177.97]) (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 1D22846970F for ; Sat, 23 Nov 2019 17:50:17 +0300 (MSK) From: Ilya Kosarev Date: Sat, 23 Nov 2019 17:50:12 +0300 Message-Id: <20191123145012.16074-1-i.kosarev@tarantool.org> Subject: [Tarantool-patches] [PATCH] Stabilize tcp_connect in test_run:cmd() List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: tarantool-patches@dev.tarantool.org 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