[PATCH] test: fix vinyl/errinj_stat failure

Vladimir Davydov vdavydov.dev at gmail.com
Wed Apr 10 16:53:32 MSK 2019


On Wed, Apr 10, 2019 at 04:52:50PM +0300, Vladimir Davydov wrote:
> The patch fixes the following test failures:
> 
>  | [022] --- vinyl/errinj_stat.result	Tue Mar 19 17:52:48 2019
>  | [022] +++ vinyl/errinj_stat.reject	Wed Mar 20 08:08:41 2019
>  | [022] @@ -229,7 +229,7 @@
>  | [022] ...
>  | [022] stat.tasks_inprogress == 0
>  | [022] ---
>  | [022] -- true
>  | [022] +- false
>  | [022] ...
>  | [022] stat.tasks_completed == 1
>  | [022] ---
> 
>  | [013] --- vinyl/errinj_stat.result	Tue Mar 19 17:52:48 2019
>  | [013] +++ vinyl/errinj_stat.reject	Wed Mar 20 08:11:15 2019
>  | [013] @@ -168,7 +168,7 @@
>  | [013] ...
>  | [013] stat.tasks_inprogress > 0
>  | [013] ---
>  | [013] -- true
>  | [013] +- false
>  | [013] ...
>  | [013] stat.tasks_completed == 0
>  | [013] ---
>  | [013] @@ -183,7 +183,7 @@
>  | [013] ...
>  | [013] box.stat.vinyl().scheduler.tasks_inprogress > 0
>  | [013] ---
>  | [013] -- true
>  | [013] +- false
>  | [013] ...
>  | [013] errinj.set('ERRINJ_VY_RUN_WRITE_DELAY', false)
>  | [013] ---
> 
> The problem occurred, because the test didn't make sure that an
> asynchronous dump/compaction task has actually started/completed.
> Even box.snapshot() doesn't guarantee that a dump task is complete,
> in fact. This patch adds wait_cond's to guarantee the test never
> fails like that anymore.
> 
> Closes #4059
> Closes #4060
> ---
>  test/vinyl/errinj_stat.result   | 52 +++++++++++++++++++++++++++++------------
>  test/vinyl/errinj_stat.test.lua | 25 ++++++++++++--------
>  2 files changed, 52 insertions(+), 25 deletions(-)

Pushed to master.



More information about the Tarantool-patches mailing list