From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp29.i.mail.ru (smtp29.i.mail.ru [94.100.177.89]) (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 6593045C304 for ; Wed, 9 Dec 2020 13:25:26 +0300 (MSK) References: <63c4da167efc9fd8151b8a144e651471915f4609.1607497400.git.avtikhon@tarantool.org> From: Oleg Koshovetc Message-ID: <4fa433d3-efc2-3938-43d7-e871088119a5@tarantool.org> Date: Wed, 9 Dec 2020 13:24:40 +0300 MIME-Version: 1.0 In-Reply-To: <63c4da167efc9fd8151b8a144e651471915f4609.1607497400.git.avtikhon@tarantool.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US Subject: Re: [Tarantool-patches] [PATCH v1] test: fix replication/skip_conflict_row output List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Alexander V. Tikhonov" , Kirill Yukhin Cc: tarantool-patches@dev.tarantool.org LGTM On 09.12.2020 10:04, Alexander V. Tikhonov wrote: > Cc: tarantool-patches@dev.tarantool.org > > Found that test replication/skip_conflict_row.test.lua fails with > output message in results file: > > [260] @@ -117,11 +117,23 @@ > [260] -- lsn is not promoted > [260] lsn1 == box.info.vclock[1] > [260] --- > [260] -- true > [260] +- false > [260] ... > [260] test_run:wait_upstream(1, {status = 'stopped', message_re = "Duplicate key exists in unique index 'primary' in space 'test'"}) > [260] --- > [260] -- true > [260] +- false > [260] +- id: 1 > [260] + uuid: bdbf6673-6ee4-47eb-a88d-81164f4e61c9 > > Test could not be restarted with checksum because of changing values > like UUID on each fail. It happend because test-run uses internal > chain of functions wait_upstream() -> gen_box_info_replication_cond() > which returns instance information on its fails. To avoid of it this > output was redirected to log file instead of results file. > --- > > Github: https://github.com/tarantool/tarantool/tree/avtikhon/test-fix-skip-conflict > > test/replication/skip_conflict_row.result | 7 ++++++- > test/replication/skip_conflict_row.test.lua | 6 +++++- > test/replication/suite.ini | 3 ++- > 3 files changed, 13 insertions(+), 3 deletions(-) > > diff --git a/test/replication/skip_conflict_row.result b/test/replication/skip_conflict_row.result > index 737522b8b..df209f029 100644 > --- a/test/replication/skip_conflict_row.result > +++ b/test/replication/skip_conflict_row.result > @@ -119,7 +119,12 @@ lsn1 == box.info.vclock[1] > --- > - true > ... > -test_run:wait_upstream(1, {status = 'stopped', message_re = "Duplicate key exists in unique index 'primary' in space 'test'"}) > +ok, instance_info = test_run:wait_upstream(1, {status = 'stopped', \ > + message_re = "Duplicate key exists in unique index 'primary' in space 'test'"}) > +--- > +... > +ok or require('log').error('test_run:wait_upstream failed with instance info: ' \ > + .. require('json').encode(instance_info)) > --- > - true > ... > diff --git a/test/replication/skip_conflict_row.test.lua b/test/replication/skip_conflict_row.test.lua > index e7a93cc74..32d473b66 100644 > --- a/test/replication/skip_conflict_row.test.lua > +++ b/test/replication/skip_conflict_row.test.lua > @@ -32,6 +32,7 @@ box.info.status > -- is not advanced on errors. > test_run:cmd("restart server replica") > test_run:cmd("switch replica") > + > box.space.test:insert{3} > lsn1 = box.info.vclock[1] > test_run:cmd("switch default") > @@ -40,7 +41,10 @@ box.space.test:insert{4} > test_run:cmd("switch replica") > -- lsn is not promoted > lsn1 == box.info.vclock[1] > -test_run:wait_upstream(1, {status = 'stopped', message_re = "Duplicate key exists in unique index 'primary' in space 'test'"}) > +ok, instance_info = test_run:wait_upstream(1, {status = 'stopped', \ > + message_re = "Duplicate key exists in unique index 'primary' in space 'test'"}) > +ok or require('log').error('test_run:wait_upstream failed with instance info: ' \ > + .. require('json').encode(instance_info)) > test_run:cmd("switch default") > test_run:cmd("restart server replica") > -- applier is not in follow state > diff --git a/test/replication/suite.ini b/test/replication/suite.ini > index 6c9eccb7a..ea12c545c 100644 > --- a/test/replication/suite.ini > +++ b/test/replication/suite.ini > @@ -27,7 +27,8 @@ fragile = { > "checksums": [ "945521821b8199c59716e969d89d953d", "b4e60f8ec2d4340bc0324f73e2cc8a01", "c7054aec18a7a983c717f1b92dd1434c", "09500c4d118ace1e05b23665ba055bf5" ] > }, > "skip_conflict_row.test.lua": { > - "issues": [ "gh-4958" ] > + "issues": [ "gh-4958" ], > + "checksums": [ "c7f20590643ed9e0263d1f5784d65c2e" ] > }, > "sync.test.lua": { > "issues": [ "gh-3835" ],