[Tarantool-patches] [PATCH v6 2/3] test: add a test for wal_cleanup_delay option

Vladislav Shpilevoy v.shpilevoy at tarantool.org
Tue Mar 30 22:59:03 MSK 2021


On 30.03.2021 09:19, Cyrill Gorcunov via Tarantool-patches wrote:
> On Tue, Mar 30, 2021 at 12:56:47AM +0200, Vladislav Shpilevoy wrote:
>>>
>>> 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
> 
> This is because the count() is a numeric value. What had been
> there if 'count()' would return a boolean?

I don't see how it is related to count() being numeric. I
am talking about 'count() == 10', not about the 'count()'
itself. That expression is boolean, and therefore is supposed
to be used with boolean operators.


More information about the Tarantool-patches mailing list