[Tarantool-patches] [PATCH 2/3 v2] replication: add test with random leaders promotion and demotion
Serge Petrenko
sergepetrenko at tarantool.org
Mon Nov 16 17:53:21 MSK 2020
16.11.2020 17:48, Serge Petrenko пишет:
> Thanks for the fixes!
>
> The patch LGTM.
>
One side note.
The test runs for 60 seconds on my laptop now.
We should either add it to `long_run` in `replication/suite.ini` or
reduce iterations to something more sane. Say, 20 or 30.
I personally prefer the latter, if you don't have any objections.
> 16.11.2020 17:00, Sergey Bronnikov пишет:
>>
>> 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')
>>
--
Serge Petrenko
More information about the Tarantool-patches
mailing list