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 684282A3B4 for ; Wed, 10 Apr 2019 08:29:11 -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 0UO5efxEkpb5 for ; Wed, 10 Apr 2019 08:29:11 -0400 (EDT) Received: from smtpng1.m.smailru.net (smtpng1.m.smailru.net [94.100.181.251]) (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 1C20E29F82 for ; Wed, 10 Apr 2019 08:29:11 -0400 (EDT) Date: Wed, 10 Apr 2019 15:29:02 +0300 From: Alexander Turenko Subject: [tarantool-patches] Re: [PATCH v1 5/6] Test misc tunning Message-ID: <20190410122902.av7scascz7nxo5v3@tkn_work_nb> References: <2878f14ee1b654e652693fba8b57a58f674d2769.1554127720.git.avtikhon@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <2878f14ee1b654e652693fba8b57a58f674d2769.1554127720.git.avtikhon@gmail.com> 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: avtikhon Cc: avtikhon , tarantool-patches@freelists.org I reworked the commit according to comments below. On the branch Totktonada/test-replication-fix-flaky-fails. WBR, Alexander Turenko. On Mon, Apr 01, 2019 at 05:13:34PM +0300, avtikhon wrote: > From: avtikhon > > --- > test/replication/misc.result | 16 ++++++++-------- > test/replication/misc.test.lua | 16 ++++++++-------- > 2 files changed, 16 insertions(+), 16 deletions(-) > > diff --git a/test/replication/misc.test.lua b/test/replication/misc.test.lua > index f60eec526..d056d30a1 100644 > --- a/test/replication/misc.test.lua > +++ b/test/replication/misc.test.lua > @@ -43,27 +43,27 @@ test_run:create_cluster(SERVERS, "replication", {args="0.1"}) > test_run:wait_fullmesh(SERVERS) > test_run:cmd("switch misc1") > test_run = require('test_run').new() > -box.cfg{replication_timeout = 0.01, replication_connect_timeout=0.01} > +box.cfg{replication_timeout = 0.03, replication_connect_timeout=0.03} We can set replication_connect_timeout to 30 seconds here as in other tests. I had a question why replication_timeout is set to 0.03, while it is 0.1 in other tests. Now I understood that it increases duration of the test case about heartbeats. Such unobvious points need to be commented in a commit message. > test_run:cmd("switch misc2") > test_run = require('test_run').new() > -box.cfg{replication_timeout = 0.01, replication_connect_timeout=0.01} > +box.cfg{replication_timeout = 0.03, replication_connect_timeout=0.03} > test_run:cmd("switch misc3") > test_run = require('test_run').new() > fiber=require('fiber') > -box.cfg{replication_timeout = 0.01, replication_connect_timeout=0.01} > +box.cfg{replication_timeout = 0.03, replication_connect_timeout=0.03} > _ = box.schema.space.create('test_timeout'):create_index('pk') > test_run:cmd("setopt delimiter ';'") > function wait_follow(replicaA, replicaB) > return test_run:wait_cond(function() > return replicaA.status ~= 'follow' or replicaB.status ~= 'follow' > - end, 0.01) > + end, 0.1) I would use box.cfg.replication_timeout value here explicitly. > end ; > function test_timeout() > local replicaA = box.info.replication[1].upstream or box.info.replication[2].upstream > local replicaB = box.info.replication[3].upstream or box.info.replication[2].upstream > local follows = test_run:wait_cond(function() > return replicaA.status == 'follow' or replicaB.status == 'follow' > - end, 0.1) > + end, 1) We can just leave the timeout here to use default 60 seconds. > if not follows then error('replicas not in follow status') end > for i = 0, 99 do > box.space.test_timeout:replace({1}) > @@ -166,7 +166,7 @@ fiber.sleep(0.1) > box.schema.user.create('cluster', {password='pass'}) > box.schema.user.grant('cluster', 'replication') > > -while box.info.replication[2] == nil do fiber.sleep(0.01) end > +while box.info.replication[2] == nil do fiber.sleep(0.03) end I don't think this can change any behaviour. > vclock = test_run:get_vclock('default') > _ = test_run:wait_vclock('misc_gh3637', vclock) > > @@ -194,12 +194,12 @@ listen = box.cfg.listen > box.cfg{listen = ''} > > test_run:cmd("switch misc_gh3610") > -box.cfg{replication_connect_quorum = 0, replication_connect_timeout = 0.01} > +box.cfg{replication_connect_quorum = 0, replication_connect_timeout = 0.03} Can we use standard 30 seconds here? > box.cfg{replication = {replication, replication}} > > test_run:cmd("switch default") > box.cfg{listen = listen} > -while test_run:grep_log('misc_gh3610', 'duplicate connection') == nil do fiber.sleep(0.01) end > +while test_run:grep_log('misc_gh3610', 'duplicate connection') == nil do fiber.sleep(0.03) end I don't think this can change any behaviour. > > test_run:cmd("stop server misc_gh3610") > test_run:cmd("cleanup server misc_gh3610") > -- > 2.17.1 >