From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp34.i.mail.ru (smtp34.i.mail.ru [94.100.177.94]) (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 DE703469719 for ; Thu, 12 Nov 2020 12:32:10 +0300 (MSK) Date: Thu, 12 Nov 2020 12:32:09 +0300 From: Sergey Bronnikov Message-ID: <20201112093209.GB25937@pony.bronevichok.ru> References: <3c7b2274-8443-2be7-c181-2c7026ab0fec@tarantool.org> <20200826144538.GC47610@pony.bronevichok.ru> <1598525382.271317018@f511.i.mail.ru> <20200831100539.GA94343@pony.bronevichok.ru> <9b889490-07da-9afc-cf2e-16d6700d255c@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <9b889490-07da-9afc-cf2e-16d6700d255c@tarantool.org> Subject: Re: [Tarantool-patches] [PATCH 3/3] replication: add test with random leaders promotion and demotion List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Serge Petrenko Cc: tarantool-patches@dev.tarantool.org, Vladislav Shpilevoy Hi, Sergey! Fixes applied in updated patch [1] 1. https://lists.tarantool.org/pipermail/tarantool-patches/2020-November/020636.html On 16:03 Tue 01 Sep , Serge Petrenko wrote: > > -- Testcase body. > > for i=1,100 do \ > > test_run:eval(SERVERS[current_leader_id], \ > > "box.cfg{replication_synchro_quorum=6}") \ > > test_run:eval(SERVERS[current_leader_id], \ > > string.format("box.space.sync:insert{%d}", i)) \ > > new_leader_id = random(current_leader_id, 1, #SERVERS) \ > > test_run:eval(SERVERS[new_leader_id], \ > > "box.cfg{replication_synchro_quorum=3}") \ > > test_run:eval(SERVERS[new_leader_id], "box.ctl.clear_synchro_queue()") \ > > replica = random(new_leader_id, 1, #SERVERS) \ > > test_run:eval(SERVERS[replica], \ > > string.format("box.space.sync:get{%d}", i)) \ > > It  is not checked whether get returns any data or not. > You only make a call but never check the return value. > > It'd also be nice to check whether the insert on the old leader (the one > with > quorum =  6) succeeds after the new leader executes `clear_synchro_queue`. Added two wait_cond() to check value on a random replica and old leader. Additionally expected total number of values checked right after the loop with box.space.sync:count().