From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id 57AF829F7F for ; Wed, 10 Apr 2019 09:28:57 -0400 (EDT) Received: from turing.freelists.org ([127.0.0.1]) by localhost (turing.freelists.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 9kQBFmSOs56p for ; Wed, 10 Apr 2019 09:28:57 -0400 (EDT) Received: from smtp62.i.mail.ru (smtp62.i.mail.ru [217.69.128.42]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTPS id 124A22A027 for ; Wed, 10 Apr 2019 09:28:57 -0400 (EDT) From: Alexander Turenko Subject: [tarantool-patches] [PATCH 3/4] test: increase timeouts in replication/errinj Date: Wed, 10 Apr 2019 16:28:44 +0300 Message-Id: <56ece6aed2cb73f9de94d3cba0cd2c1954a03d30.1554902241.git.alexander.turenko@tarantool.org> In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: tarantool-patches-bounce@freelists.org Errors-to: tarantool-patches-bounce@freelists.org Reply-To: tarantool-patches@freelists.org List-Help: List-Unsubscribe: List-software: Ecartis version 1.0.0 List-Id: tarantool-patches List-Subscribe: List-Owner: List-post: List-Archive: To: tarantool-patches@freelists.org Cc: Alexander Turenko Needed for parallel running of the test suite. Use default replication_connect_timeout (30 seconds) instead of 0.5 seconds. This don't changes meaning of the test cases. Increase replication_timeout from 0.01 to 0.1. These changes allow to run the test 100 times in 50 parallel jobs successfully. --- test/replication/errinj.result | 8 ++++---- test/replication/errinj.test.lua | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/test/replication/errinj.result b/test/replication/errinj.result index 2e7d367c7..f04a38c45 100644 --- a/test/replication/errinj.result +++ b/test/replication/errinj.result @@ -408,14 +408,14 @@ errinj.set("ERRINJ_RELAY_EXIT_DELAY", 0) --- - ok ... -box.cfg{replication_timeout = 0.01} +box.cfg{replication_timeout = 0.1} --- ... test_run:cmd("create server replica_timeout with rpl_master=default, script='replication/replica_timeout.lua'") --- - true ... -test_run:cmd("start server replica_timeout with args='0.01 0.5'") +test_run:cmd("start server replica_timeout with args='0.1'") --- - true ... @@ -471,7 +471,7 @@ errinj.set("ERRINJ_RELAY_REPORT_INTERVAL", 0) ... -- Check replica's ACKs don't prevent the master from sending -- heartbeat messages (gh-3160). -test_run:cmd("start server replica_timeout with args='0.009 0.5'") +test_run:cmd("start server replica_timeout with args='0.1'") --- - true ... @@ -489,7 +489,7 @@ box.info.replication[1].upstream.status -- follow --- - follow ... -for i = 0, 15 do fiber.sleep(0.01) if box.info.replication[1].upstream.status ~= 'follow' then break end end +for i = 0, 15 do fiber.sleep(box.cfg.replication_timeout) if box.info.replication[1].upstream.status ~= 'follow' then break end end --- ... box.info.replication[1].upstream.status -- follow diff --git a/test/replication/errinj.test.lua b/test/replication/errinj.test.lua index 32e0be912..53637e248 100644 --- a/test/replication/errinj.test.lua +++ b/test/replication/errinj.test.lua @@ -169,10 +169,10 @@ test_run:cmd("stop server replica") test_run:cmd("cleanup server replica") errinj.set("ERRINJ_RELAY_EXIT_DELAY", 0) -box.cfg{replication_timeout = 0.01} +box.cfg{replication_timeout = 0.1} test_run:cmd("create server replica_timeout with rpl_master=default, script='replication/replica_timeout.lua'") -test_run:cmd("start server replica_timeout with args='0.01 0.5'") +test_run:cmd("start server replica_timeout with args='0.1'") test_run:cmd("switch replica_timeout") fiber = require('fiber') @@ -198,13 +198,13 @@ errinj.set("ERRINJ_RELAY_REPORT_INTERVAL", 0) -- Check replica's ACKs don't prevent the master from sending -- heartbeat messages (gh-3160). -test_run:cmd("start server replica_timeout with args='0.009 0.5'") +test_run:cmd("start server replica_timeout with args='0.1'") test_run:cmd("switch replica_timeout") fiber = require('fiber') while box.info.replication[1].upstream.status ~= 'follow' do fiber.sleep(0.0001) end box.info.replication[1].upstream.status -- follow -for i = 0, 15 do fiber.sleep(0.01) if box.info.replication[1].upstream.status ~= 'follow' then break end end +for i = 0, 15 do fiber.sleep(box.cfg.replication_timeout) if box.info.replication[1].upstream.status ~= 'follow' then break end end box.info.replication[1].upstream.status -- follow test_run:cmd("switch default") -- 2.20.1