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 033636EC55; Thu, 15 Jul 2021 17:06:11 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 033636EC55 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1626357971; bh=qYLd9kEDrcWWK6UllfE+itPAukTsKXWLc+UkUbeEfDE=; h=To:Cc:References:Date:In-Reply-To:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=be24T0PyRALGaNDqQd3V7FeNym3pQUv/rVDZPEWtBRAsHRmo3xKlIlQ5BFDvU5yR7 uIbsIwBsz+dsR9LzxyATyjCkU1Fyjj+S3679XJlW9dJQH8VQIbfMwYEDSlrjnTD087 T5xtbKjLWbL0nfP9JvDYz+D0zqWe5pxap3Nffd2M= Received: from smtp42.i.mail.ru (smtp42.i.mail.ru [94.100.177.102]) (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 5469C6EC55 for ; Thu, 15 Jul 2021 17:06:10 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 5469C6EC55 Received: by smtp42.i.mail.ru with esmtpa (envelope-from ) id 1m4209-0002Gk-L5; Thu, 15 Jul 2021 17:06:09 +0300 To: v.shpilevoy@tarantool.org, gorcunov@gmail.com Cc: tarantool-patches@dev.tarantool.org References: <5e258b337c1314a10440677b583290d94fc4f499.1626287002.git.sergepetrenko@tarantool.org> Message-ID: <84409aa0-bdab-2cce-66d5-e09092eeb85c@tarantool.org> Date: Thu, 15 Jul 2021 17:06:08 +0300 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: <5e258b337c1314a10440677b583290d94fc4f499.1626287002.git.sergepetrenko@tarantool.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-GB X-7564579A: 646B95376F6C166E X-77F55803: 4F1203BC0FB41BD9204199EF372DF0D2B6D0093575263E89A0D134D0AD10EB25182A05F53808504050AB067A79669E1A3EBAF372AC7F743C60980F49D22490BA4860AC17D6E3E957 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE78D486EA4498F01EBEA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F7900637E5A8E5ECB3FF24018638F802B75D45FF36EB9D2243A4F8B5A6FCA7DBDB1FC311F39EFFDF887939037866D6147AF826D854542B0B751A96CA73AEFD2E0C89A18A117882F4460429724CE54428C33FAD305F5C1EE8F4F765FCAA867293B0326636D2E47CDBA5A96583BD4B6F7A4D31EC0BC014FD901B82EE079FA2833FD35BB23D27C277FBC8AE2E8BF1175FABE1C0F9B6A471835C12D1D977C4224003CC8364762BB6847A3DEAEFB0F43C7A68FF6260569E8FC8737B5C2249EC8D19AE6D49635B68655334FD4449CB9ECD01F8117BC8BEAAAE862A0553A39223F8577A6DFFEA7CB1724D34C644744043847C11F186F3C59DAA53EE0834AAEE X-C1DE0DAB: 0D63561A33F958A5AEA6CCB41E9B17EA66511FBAEE17488C8765AA84EA6F1C69D59269BC5F550898D99A6476B3ADF6B47008B74DF8BB9EF7333BD3B22AA88B938A852937E12ACA7501A9DF589746230F410CA545F18667F91A7EA1CDA0B5A7A0 X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D3403182E70AE6895E0B6B469B43B6FD788010AEBF027C6A6FE6A49DEFA52A0C0F00C061EAE44293E901D7E09C32AA3244C551B8F182BA9C19A870B01C9C75CFA8F05AB220A9D022EBCFACE5A9C96DEB163 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojSyb42jm8PHKeIZSGJpUegQ== X-Mailru-Sender: 3B9A0136629DC9125D61937A2360A44664643DE3592C5CCF68BB925FBE8A615217C8473AD56A2F06424AE0EB1F3D1D21E2978F233C3FAE6EE63DB1732555E4A8EE80603BA4A5B0BC112434F685709FCF0DA7A0AF5A3A8387 X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH v4 13/16] box: allow calling promote on a candidate 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 Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" 14.07.2021 21:25, Serge Petrenko пишет: > Part of #6034 > --- > src/box/box.cc | 15 +--- > .../gh-6034-election-candidate-promote.result | 84 +++++++++++++++++++ > ...h-6034-election-candidate-promote.test.lua | 42 ++++++++++ > test/replication/suite.cfg | 1 + > 4 files changed, 128 insertions(+), 14 deletions(-) > create mode 100644 test/replication/gh-6034-election-candidate-promote.result > create mode 100644 test/replication/gh-6034-election-candidate-promote.test.lua > Fixed an obvious typo: ========================= diff --git a/test/replication/gh-6034-election-candidate-promote.result b/test/replication/gh-6034-election-candidate-promote.result index 76a54d5a6..2b4bc0213 100644 --- a/test/replication/gh-6034-election-candidate-promote.result +++ b/test/replication/gh-6034-election-candidate-promote.result @@ -60,7 +60,7 @@ next_nr = leader_nr % 3 + 1   | ...  -- Someone else may become a leader, thus promote may fail. But we're testing  -- that it takes effect at all, so that's fine. -_ = pcall(test_run:eval('election_replica'..next_nr, 'box.ctl.promote()')) +_ = pcall(test_run.eval, test_run, 'election_replica'..next_nr, 'box.ctl.promote()')   | ---   | ...  new_term = test_run:eval('election_replica'..next_nr,\ diff --git a/test/replication/gh-6034-election-candidate-promote.test.lua b/test/replication/gh-6034-election-candidate-promote.test.lua index 24c57f4cb..c25f9296d 100644 --- a/test/replication/gh-6034-election-candidate-promote.test.lua +++ b/test/replication/gh-6034-election-candidate-promote.test.lua @@ -32,7 +32,7 @@ term = test_run:eval('election_replica'..leader_nr,\  next_nr = leader_nr % 3 + 1  -- Someone else may become a leader, thus promote may fail. But we're testing  -- that it takes effect at all, so that's fine. -_ = pcall(test_run:eval('election_replica'..next_nr, 'box.ctl.promote()')) +_ = pcall(test_run.eval, test_run, 'election_replica'..next_nr, 'box.ctl.promote()')  new_term = test_run:eval('election_replica'..next_nr,\                           'return box.info.election.term')[1]  assert(new_term > term) ========================= -- Serge Petrenko