[Tarantool-patches] [tarantool-patches] [PATCH v2 1/2] test: modify swim_run_test to break event loop

Serge Petrenko sergepetrenko at tarantool.org
Fri Oct 25 18:15:05 MSK 2019


Hi! Thank you for the explanation.
I threw this patch away


> 23 окт. 2019 г., в 0:20, Vladislav Shpilevoy <v.shpilevoy at tarantool.org> написал(а):
> 
> Hi! Thanks for the patch!
> 
> On 08/10/2019 17:03, Serge Petrenko wrote:
>> Add a wrapper function around swim test passed to swim_run_test which
>> breaks from default cord event loop. Otherwise we will hang indefinitely
>> in ev_run in case there is a started watcher.
> 
> But why? The loop runs only until there are fibers to run.
> By design of these tests, after they are done, there should
> be not a single fiber nor a watcher, and the loop is finished
> without a break.
> 
> This is why the tests pass without this patch. So what is
> a purpose of this commit? It does not change anything except
> that it may mask some errors. Because if the SWIM unit tests
> would hang without a break, then something is wrong. I caught
> several bugs in SWIM via this.
> 
> If fiber.top() somehow interferes, then probably you could
> turn it off for this test? I just don't want to miss possible
> SWIM bugs.
> 


>> 
>> Found during work on #2694
>> ---
>> test/unit/swim_test_utils.c | 14 +++++++++++++-
>> 1 file changed, 13 insertions(+), 1 deletion(-)
>> 
> 


--
Serge Petrenko
sergepetrenko at tarantool.org



More information about the Tarantool-patches mailing list