From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp52.i.mail.ru (smtp52.i.mail.ru [94.100.177.112]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id CB9F74429E1 for ; Mon, 15 Jun 2020 11:57:30 +0300 (MSK) Date: Mon, 15 Jun 2020 11:57:29 +0300 From: Kirill Yukhin Message-ID: <20200615085729.7gzvxf2patph6hbp@tarantool.org> References: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Subject: Re: [Tarantool-patches] [PATCH v2] test: fix flaky replication/status.test.lua List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Alexander V. Tikhonov" Cc: Oleg Piskunov , tarantool-patches@dev.tarantool.org, Alexander Turenko Hello, On 09 июн 19:34, Alexander V. Tikhonov wrote: > Found issue: > > [009] --- replication/status.result Wed May 6 09:03:18 2020 > [009] +++ replication/status.reject Tue May 12 15:55:09 2020 > [009] @@ -307,11 +307,12 @@ > [009] ... > [009] r.upstream.status == "stopped" > [009] --- > [009] -- true > [009] +- false > [009] ... > [009] r.upstream.message:match('Duplicate') ~= nil > [009] --- > [009] -- true > [009] +- error: '[string "return r.upstream.message:match(''Duplicate'') ..."]:1: attempt > [009] + to index field ''message'' (a nil value)' > [009] ... > [009] test_run:cmd('switch default') > [009] --- > > To check the upstream status and it's message need to wait until an > upstream appears. This prevents an attempt to index a nil value when > one of those functions are called before a record about a peer appears > in box.info.replication. It was observed on test: > replication/show_error_on_disconnect > after commit > c6bea65f8ef5f6c737cf70c0127189d0ebcbc36e ('replication: recfg with 0 > quorum returns immediately'). > > Closes #4969 LGTM. I've checked your patch into 1.10, 2.3, 2.4 and master. -- Regards, Kirill Yukhin