Tarantool development patches archive
 help / color / mirror / Atom feed
From: Konstantin Osipov <kostja@tarantool.org>
To: tarantool-patches@freelists.org
Subject: [tarantool-patches] Re: [PATCH 2/6] test: introduce breakpoints for swim's event loop
Date: Fri, 29 Mar 2019 21:20:27 +0300	[thread overview]
Message-ID: <20190329182027.GA20712@chai> (raw)
In-Reply-To: <fb3133cd05b2b14dd7dcb16a892cd1af417699ab.1553078631.git.v.shpilevoy@tarantool.org>

* Vladislav Shpilevoy <v.shpilevoy@tarantool.org> [19/03/20 14:11]:
> Breakpoint as API gives a test writer more control over timing of
> condition checks. Breakpoint stops the swim's event loop in a
> certain moment of virtual time.
> 
> Without breakpoints it is possible, that a condition has failed
> its deadline, but it can not be checked properly. For example,
> assume that there is a cluster of two members, and after 1 second
> they should become fullmesh. It means, that any checks in [0, 1)
> time have to fail. But without breakpoints it is not so:

From the description of the event, I would actually expect it to 
stop the event loop, while you're stopping the event loop from the
helper macro. Why is it a macro btw? Why not make it a function?

Anyway, from this description I would expect that
swim_brk_event_process does something like ev_loop_break(), and
then the loop has to be resumed. It's fully up to you to do it
differently, but please fix the docs so that there is no
ambiguity. And, once again, does swim_wait_timeout have to be a
macro?

As a final nit, I would prefix all testing APIs with a name that 
would make sure they are never confused with the actual SWIM API.

E.g. swim_wait_timeout() could be easily confused with some public
method by a newbie. Perhaps choose an entirely different prefix
for the testing harness methods like swim_unit_* swim_ut_ or swum?
> 

-- 
Konstantin Osipov, Moscow, Russia, +7 903 626 22 32
http://tarantool.io - www.twitter.com/kostja_osipov

  reply	other threads:[~2019-03-29 18:20 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-20 10:49 [tarantool-patches] [PATCH 0/6] SWIM failure detection draft Vladislav Shpilevoy
2019-03-20 10:49 ` [tarantool-patches] [PATCH 1/6] swim: follow-ups for SWIM anti-entropy Vladislav Shpilevoy
2019-03-29  8:27   ` [tarantool-patches] " Konstantin Osipov
2019-03-29 10:19     ` Vladislav Shpilevoy
2019-03-20 10:49 ` [tarantool-patches] [PATCH 2/6] test: introduce breakpoints for swim's event loop Vladislav Shpilevoy
2019-03-29 18:20   ` Konstantin Osipov [this message]
2019-04-02 12:25     ` [tarantool-patches] " Vladislav Shpilevoy
2019-04-02 19:16       ` Vladislav Shpilevoy
2019-04-02 20:40         ` Konstantin Osipov
2019-04-02 21:26           ` Vladislav Shpilevoy
2019-03-20 10:49 ` [tarantool-patches] [PATCH 3/6] test: remove swim_unblock_fd event from swim test harness Vladislav Shpilevoy
2019-03-29 18:22   ` [tarantool-patches] " Konstantin Osipov
2019-04-02 21:26     ` Vladislav Shpilevoy
2019-03-20 10:49 ` [tarantool-patches] [PATCH 4/6] swim: expose enum swim_member_status to public API Vladislav Shpilevoy
2019-03-29 18:24   ` [tarantool-patches] " Konstantin Osipov
2019-04-02 12:25     ` Vladislav Shpilevoy
2019-04-02 13:17       ` Konstantin Osipov
2019-04-02 21:26         ` Vladislav Shpilevoy
2019-03-20 10:49 ` [tarantool-patches] [PATCH 5/6] test: differentiate blocked and closed swim fake fds Vladislav Shpilevoy
2019-03-29 18:25   ` [tarantool-patches] " Konstantin Osipov
2019-04-02 21:26     ` Vladislav Shpilevoy
2019-03-20 10:49 ` [tarantool-patches] [PATCH 6/6] [RAW] swim: introduce failure detection component Vladislav Shpilevoy
2019-03-29 18:59   ` [tarantool-patches] " Konstantin Osipov
2019-04-02 12:25     ` Vladislav Shpilevoy
2019-04-04 10:20       ` Vladislav Shpilevoy
2019-04-04 12:45       ` Konstantin Osipov
2019-04-04 13:57         ` Vladislav Shpilevoy
2019-04-04 16:14           ` Vladimir Davydov
2019-04-04 16:47             ` Vladislav Shpilevoy
2019-03-27 19:28 ` [tarantool-patches] [PATCH 7/6] swim: make swim_upsert_member returning two values Vladislav Shpilevoy
2019-03-28  8:52   ` [tarantool-patches] " Konstantin Osipov
2019-03-28 11:52     ` Vladislav Shpilevoy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190329182027.GA20712@chai \
    --to=kostja@tarantool.org \
    --cc=tarantool-patches@freelists.org \
    --subject='[tarantool-patches] Re: [PATCH 2/6] test: introduce breakpoints for swim'\''s event loop' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox