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 98E3C6EC5B; Tue, 30 Mar 2021 01:56:50 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 98E3C6EC5B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1617058610; bh=AsCC3yrPzdGSJoYucCbE8jRchfIdbkT2Lc6WL7wGeGk=; h=To:References:Date:In-Reply-To:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=kD6s8AAUqbzHEdOv3f257al4aXa9FxcObJEkhjorb1vfWk6Qgyh/cVC54HFZoc7xN 0hyE3wltznJgG5+OFOepXYBx6u/yEDreqI271F0GlfhpvzGBv72T/RifWiQnuEiWJ4 Wnl+DUh13QhLKrQHzEhRf7Uqp8XZhqJ5NN8+0C2Q= Received: from smtpng3.m.smailru.net (smtpng3.m.smailru.net [94.100.177.149]) (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 B5F6E6EC5B for ; Tue, 30 Mar 2021 01:56:49 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org B5F6E6EC5B Received: by smtpng3.m.smailru.net with esmtpa (envelope-from ) id 1lR0oS-0005EM-Ir; Tue, 30 Mar 2021 01:56:49 +0300 To: Cyrill Gorcunov References: <20210327111310.37504-1-gorcunov@gmail.com> <20210327111310.37504-3-gorcunov@gmail.com> Message-ID: <5195a08c-aaa7-7aa4-8324-352a9433955f@tarantool.org> Date: Tue, 30 Mar 2021 00:56:47 +0200 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.9.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-7564579A: 646B95376F6C166E X-77F55803: 4F1203BC0FB41BD9ED7173E37F4E32941B7C4A78AC10F96A7797F60C25BD4B06182A05F5380850400177E166CA98E2DA843FE50325BF3AA11BC006487EBFD6D1E0578B4348A891AE X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE731D82F3F177D3BCDEA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F79006378010A306A5B6F90A8638F802B75D45FF914D58D5BE9E6BC131B5C99E7648C95CE99938B3FD79E1DFAD68D89C8FD9B3EEA59BCD3FBE747B1EA471835C12D1D9774AD6D5ED66289B5278DA827A17800CE78C592797616C97AB9FA2833FD35BB23D2EF20D2F80756B5F868A13BD56FB6657A471835C12D1D977725E5C173C3A84C3FF021744A2531FDDCC7F00164DA146DA6F5DAA56C3B73B237318B6A418E8EAB86D1867E19FE14079C09775C1D3CA48CFC5EA940A35A165FF2DBA43225CD8A89F83C798A30B85E16B262FEC7FBD7D1F5BB5C8C57E37DE458BEDA766A37F9254B7 X-B7AD71C0: AC4F5C86D027EB782CDD5689AFBDA7A2AD77751E876CB595E8F7B195E1C97831B7DABD8F4FAFB02F38E9427ECC4B679E X-C1DE0DAB: 0D63561A33F958A5FEE807275F4D0B31E45815DCCF37614D28CA6D5E1542A578D59269BC5F550898D99A6476B3ADF6B47008B74DF8BB9EF7333BD3B22AA88B938A852937E12ACA7502E6951B79FF9A3F410CA545F18667F91A7EA1CDA0B5A7A0 X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D34A9A0A0BF1A2CAC62D6BAF40F9ACAC5D61CBF612F7C334A62F7785EA97294216B75DE6A9DFBF7DC041D7E09C32AA3244CA56970FC3421E201535DDC16128988D93A76366E8A9DE7CA927AC6DF5659F194 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojljIiQOC84rSmEt8+PDHFEg== X-Mailru-Sender: 689FA8AB762F73936BC43F508A06382226EF6D2D57F8EDE6A5A71CFDDA09522D3841015FED1DE5223CC9A89AB576DD93FB559BB5D741EB963CF37A108A312F5C27E8A8C3839CE0E267EA787935ED9F1B X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH v6 2/3] test: add a test for wal_cleanup_delay option 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: Vladislav Shpilevoy via Tarantool-patches Reply-To: Vladislav Shpilevoy Cc: tml Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" On 30.03.2021 00:40, Cyrill Gorcunov wrote: > On Tue, Mar 30, 2021 at 12:19:10AM +0200, Vladislav Shpilevoy wrote: >>> >>> I need to make sure the .is_paused is false, the assert(x == false) >>> looks exactly what is needed. and we have similar code in our other >>> tests, do you prefer assert(not x.is_paused) or what? >> >> And there is much much much more tests using the booleans as they >> are supposed to be used. Why do you need exactly 'false' as a literal? > > Wait, I just don't understand. is_paused is a boolean type and > I compare it with a boolean value. Could you simply point me > the preferred way to compare if some particular value is false. > I used assert() 'cause I found similar code, if there some more > suiatble way to test the value, sure thing I can use whatever > you prefer, just point me an example. Ok, I open the latest replication test we added (gh-5536), and I see the line assert(box.space.test:count() == 10) It does not look like this: assert((box.space.test:count() == 10) == true) does it? Because it is pointless to have 'boolean' type in a language if you do the manual comparison with the boolean constants anyway. The same as in C you don't code like this: bool ok = func(); if (ok == false) error(); You do: bool ok = func(); if (!ok) error();