From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Mon, 24 Dec 2018 14:55:35 +0300 From: Vladimir Davydov Subject: Re: [tarantool-patches] [PATCH] test: wait for log entry Message-ID: <20181224115535.5mzuybibtwvxxy7p@esperanza> References: <20181218083937.47936-1-sergw@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20181218083937.47936-1-sergw@tarantool.org> To: Sergei Voronezhskii Cc: tarantool-patches@freelists.org, Alexander Turenko , Kirill Yukhin List-ID: 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.