From: "Alexander V. Tikhonov" <avtikhon@tarantool.org> To: Oleg Koshovetc <okoshovetc@tarantool.org>, Kirill Yukhin <kyukhin@tarantool.org> Cc: tarantool-patches@dev.tarantool.org Subject: [Tarantool-patches] [PATCH v1] test: fix replication/skip_conflict_row output Date: Wed, 9 Dec 2020 10:04:12 +0300 [thread overview] Message-ID: <63c4da167efc9fd8151b8a144e651471915f4609.1607497400.git.avtikhon@tarantool.org> (raw) 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" ], -- 2.25.1
next reply other threads:[~2020-12-09 7:04 UTC|newest] Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-12-09 7:04 Alexander V. Tikhonov [this message] 2020-12-09 10:24 ` Oleg Koshovetc 2020-12-10 14:50 ` Kirill Yukhin
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=63c4da167efc9fd8151b8a144e651471915f4609.1607497400.git.avtikhon@tarantool.org \ --to=avtikhon@tarantool.org \ --cc=kyukhin@tarantool.org \ --cc=okoshovetc@tarantool.org \ --cc=tarantool-patches@dev.tarantool.org \ --subject='Re: [Tarantool-patches] [PATCH v1] test: fix replication/skip_conflict_row output' \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox