[PATCH 1/6] Add ERROR_INJECT_YIELD and ERROR_INJECT_SLEEP helpers

Konstantin Osipov kostja at tarantool.org
Wed Jul 3 22:12:57 MSK 2019


* Vladimir Davydov <vdavydov.dev at gmail.com> [19/07/01 10:04]:
> ERROR_INJECT_YIELD yields the current fiber execution by calling
> fiber_sleep(0) while the given error injection is set.

I would sleep for some minimal non-zero time, e.g. a millisecond,
to avoid consuming CPU in parallel tests.
 
> ERROR_INJECT_SLEEP suspends the current thread execution by calling
> usleep(1000) while the given error injection is set.

LGTM.

-- 
Konstantin Osipov, Moscow, Russia



More information about the Tarantool-patches mailing list