[tarantool-patches] [PATCH] test: wait for log entry

Vladimir Davydov vdavydov.dev at gmail.com
Mon Dec 24 14:55:35 MSK 2018


On Tue, Dec 18, 2018 at 11:39:37AM +0300, Sergei Voronezhskii wrote:
> replication/sync.result fails on `test_run:grep_log('replica', 'ER_CFG`
> which returns null, which means this entry is not found, instead
> wait_log 10s to be sure that the entry appeared in the log
> 
> Fixes: #3835

The issue title/description says nothing about this particular failure.
Please update.

> ---
> BRANCH: https://github.com/tarantool/tarantool/tree/sergw/fix-replication-sync-grep-log

Link to the issue is missing. BRANCH prefix is redundant.

>  test/replication/sync.result   | 2 +-
>  test/replication/sync.test.lua | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/test/replication/sync.result b/test/replication/sync.result
> index b34501dae..c0990ca6d 100644
> --- a/test/replication/sync.result
> +++ b/test/replication/sync.result
> @@ -298,7 +298,7 @@ box.info.replication[1].upstream.status -- follow
>  ---
>  - follow
>  ...
> -test_run:grep_log('replica', 'ER_CFG.*')
> +test_run:wait_log('replica', 'ER_CFG.*', nil, 10)

This is wrong - by the time box.cfg() returns, the error message must
have already been printed to the log. Instead the test should wait for
the message to appear in the log before disabling WAL_DELAY injection.



More information about the Tarantool-patches mailing list