From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp61.i.mail.ru (smtp61.i.mail.ru [217.69.128.41]) (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 D275E469719 for ; Mon, 16 Nov 2020 17:00:09 +0300 (MSK) References: <87cbacc2bbcb903aced7b8f42742eac14c9431ad.1605170394.git.sergeyb@tarantool.org> <20f04abf-588e-844a-24ed-d70ce5024e58@tarantool.org> <6db1b311-c989-6a1d-52fe-ca5b78552a75@tarantool.org> From: Sergey Bronnikov Message-ID: <47897821-0f33-b0b4-8340-f670e08261d6@tarantool.org> Date: Mon, 16 Nov 2020 17:00:08 +0300 MIME-Version: 1.0 In-Reply-To: <6db1b311-c989-6a1d-52fe-ca5b78552a75@tarantool.org> Content-Type: text/plain; charset="utf-8"; format="flowed" Content-Transfer-Encoding: 8bit Content-Language: en-US Subject: Re: [Tarantool-patches] [PATCH 2/3 v2] 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: tarantool-patches@dev.tarantool.org, Serge Petrenko , Vladislav Shpilevoy On 16.11.2020 12:10, Sergey Bronnikov wrote: > >  test_run:switch('qsync1') > -box.space.sync:count() -- 300 > +box.space.sync:count() -- 200 > sometimes this statement failed with: [007] replication/qsync_random_leader.test.lua memtx           [ fail ] [007] [007] Test failed! Result content mismatch: [007] --- replication/qsync_random_leader.result        Mon Nov 16 08:41:46 2020 [007] +++ /home/s.bronnikov/work/tarantool/build/test/var/rejects/replication/qsync_random_leader.reject Mon Nov 16 09:57:34 2020 [007] @@ -128,7 +128,7 @@ [007]   | ... [007]  box.space.sync:count() -- 200 [007]   | --- [007] - | - 200 [007] + | - 199 [007]   | ... [007] [007]  -- Teardown. so I replace it with wait_cond(): --- a/test/replication/qsync_random_leader.test.lua +++ b/test/replication/qsync_random_leader.test.lua @@ -63,8 +63,8 @@ for i=1,200 do \      current_leader_id = new_leader_id                                          \  end -test_run:switch('qsync1') -box.space.sync:count() -- 200 +test_run:wait_cond(function() return test_run:eval('qsync1', \ +                   ("box.space.sync:count()")) == 200 end)  \  -- Teardown.  test_run:switch('default')