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

Vladislav Shpilevoy v.shpilevoy at tarantool.org
Wed Oct 23 00:20:23 MSK 2019


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(-)
> 


More information about the Tarantool-patches mailing list