From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from [87.239.111.99] (localhost [127.0.0.1]) by dev.tarantool.org (Postfix) with ESMTP id 3197F6EC40; Mon, 16 Aug 2021 18:16:29 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 3197F6EC40 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1629126989; bh=Ty7Z+OoKq/HTWIrTcZtm+/WIqMMOWOAnCalMNwBuVWM=; h=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=LuUyKHCAaNmpIQ9e5BW4DX4rObTlrYwaC9Mfep4GMerJd1LhIED4onC6kNVB/OrRP f6rumqU/G8SP+eKQRfwwoB8yHKTS4+4eIl5+3TJle9Eb9zsEAqX/XIcX9ii/pzAjXc /i0JKJul+g5j9JM+/xNDSVTODN2hX0VaxkFdXZks= Received: from smtp48.i.mail.ru (smtp48.i.mail.ru [94.100.177.108]) (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 CBAA66EC41 for ; Mon, 16 Aug 2021 18:15:27 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org CBAA66EC41 Received: by smtp48.i.mail.ru with esmtpa (envelope-from ) id 1mFeKk-0006G4-LQ; Mon, 16 Aug 2021 18:15:27 +0300 To: v.ioffe@tarantool.org, kyukhin@tarantool.org Date: Mon, 16 Aug 2021 18:15:23 +0300 Message-Id: X-Mailer: git-send-email 2.30.1 (Apple Git-130) In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-4EC0790: 10 X-7564579A: 646B95376F6C166E X-77F55803: 4F1203BC0FB41BD92087353F0EC44DD910164DC12A5633065676A9727AC27C74182A05F538085040F9035A49682B8BAD28DAC7579648ED6BF3E8224123E03440A90A71171AFCE3D5 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE7DCDABBCBEAF682B1EA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F79006372B866E63D69A26578638F802B75D45FF36EB9D2243A4F8B5A6FCA7DBDB1FC311F39EFFDF887939037866D6147AF826D8E98A0110854D5D2E47B18E659FA3C244117882F4460429724CE54428C33FAD305F5C1EE8F4F765FC2EE5AD8F952D28FBA471835C12D1D9774AD6D5ED66289B52BA9C0B312567BB23117882F44604297287769387670735209ECD01F8117BC8BEA471835C12D1D977C4224003CC8364762BB6847A3DEAEFB0F43C7A68FF6260569E8FC8737B5C2249EC8D19AE6D49635B68655334FD4449CB9ECD01F8117BC8BEAAAE862A0553A39223F8577A6DFFEA7C741622C43FECC0DC43847C11F186F3C59DAA53EE0834AAEE X-C1DE0DAB: C20DE7B7AB408E4181F030C43753B8186998911F362727C414F749A5E30D975C5B73F950BC6E7FFB0F1E8CEAC7BDA5C226F0A7E6143BD3419C2B6934AE262D3EE7EAB7254005DCED7532B743992DF240BDC6A1CF3F042BAD6DF99611D93F60EFE37876E7723AB534DC48ACC2A39D04F89CDFB48F4795C241BDAD6C7F3747799A X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D344EF254DC71474AA35D2443C0630B8AEE3EE03631679206512CEA03E9E73AC718F74E10E836F1D0DB1D7E09C32AA3244CC66C04A777F95DC6FE3775991F3E71AE3FD9C8CA1B0515E0927AC6DF5659F194 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojIrFL/N5KnVFKsdSwO9tI7A== X-Mailru-Sender: 3B9A0136629DC9125D61937A2360A44619A12318E85B8A6FB2766B9427F7C5D4AB09C8E55D095759424AE0EB1F3D1D21E2978F233C3FAE6EE63DB1732555E4A8EE80603BA4A5B0BC112434F685709FCF0DA7A0AF5A3A8387 X-Mras: Ok Subject: [Tarantool-patches] [PATCH v2 2/2] replication: fix flaky election_basic test X-BeenThere: tarantool-patches@dev.tarantool.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Serge Petrenko via Tarantool-patches Reply-To: Serge Petrenko Cc: tarantool-patches@dev.tarantool.org Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" Found the following error in our CI: Test failed! Result content mismatch: --- replication/election_basic.result Fri Aug 13 13:50:26 2021 +++ /build/usr/src/debug/tarantool-2.9.0.276/test/var/rejects/replication/election_basic.reject Sat Aug 14 08:14:17 2021 @@ -116,6 +116,7 @@ | ... box.ctl.demote() | --- + | - error: box.ctl.demote does not support simultaneous invocations | ... -- Even though box.ctl.demote() or box.ctl.promote() isn't called above the failing line, promote() is issued internally once the instance becomes the leader. Wait until previous promote is finished (i.e. box.info.synchro.queue.owner is set) --- test/replication/election_basic.result | 6 ++++++ test/replication/election_basic.test.lua | 3 +++ 2 files changed, 9 insertions(+) diff --git a/test/replication/election_basic.result b/test/replication/election_basic.result index 5da57e87d..382aeef60 100644 --- a/test/replication/election_basic.result +++ b/test/replication/election_basic.result @@ -95,6 +95,12 @@ test_run:wait_cond(function() return box.info.election.state == 'leader' end) | --- | - true | ... +test_run:wait_cond(function()\ + return box.info.synchro.queue.owner == box.info.id\ +end) + | --- + | - true + | ... assert(box.info.election.term > term) | --- | - true diff --git a/test/replication/election_basic.test.lua b/test/replication/election_basic.test.lua index 3b3a3e7e5..47f3d318e 100644 --- a/test/replication/election_basic.test.lua +++ b/test/replication/election_basic.test.lua @@ -35,6 +35,9 @@ assert(box.info.election.leader == 0) box.cfg{election_timeout = 1000} box.cfg{election_mode = 'candidate'} test_run:wait_cond(function() return box.info.election.state == 'leader' end) +test_run:wait_cond(function()\ + return box.info.synchro.queue.owner == box.info.id\ +end) assert(box.info.election.term > term) assert(box.info.election.vote == box.info.id) assert(box.info.election.leader == box.info.id) -- 2.30.1 (Apple Git-130)