Tarantool development patches archive
 help / color / mirror / Atom feed
* [Tarantool-patches] [PATCH v1] test: fix replication/skip_conflict_row output
@ 2020-12-09  7:04 Alexander V. Tikhonov
  2020-12-09 10:24 ` Oleg Koshovetc
  2020-12-10 14:50 ` Kirill Yukhin
  0 siblings, 2 replies; 3+ messages in thread
From: Alexander V. Tikhonov @ 2020-12-09  7:04 UTC (permalink / raw)
  To: Oleg Koshovetc, Kirill Yukhin; +Cc: tarantool-patches

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Tarantool-patches] [PATCH v1] test: fix replication/skip_conflict_row output
  2020-12-09  7:04 [Tarantool-patches] [PATCH v1] test: fix replication/skip_conflict_row output Alexander V. Tikhonov
@ 2020-12-09 10:24 ` Oleg Koshovetc
  2020-12-10 14:50 ` Kirill Yukhin
  1 sibling, 0 replies; 3+ messages in thread
From: Oleg Koshovetc @ 2020-12-09 10:24 UTC (permalink / raw)
  To: Alexander V. Tikhonov, Kirill Yukhin; +Cc: tarantool-patches

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" ],

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Tarantool-patches] [PATCH v1] test: fix replication/skip_conflict_row output
  2020-12-09  7:04 [Tarantool-patches] [PATCH v1] test: fix replication/skip_conflict_row output Alexander V. Tikhonov
  2020-12-09 10:24 ` Oleg Koshovetc
@ 2020-12-10 14:50 ` Kirill Yukhin
  1 sibling, 0 replies; 3+ messages in thread
From: Kirill Yukhin @ 2020-12-10 14:50 UTC (permalink / raw)
  To: Alexander V. Tikhonov; +Cc: tarantool-patches

Hello,

On 09 Dec 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

LGTM.

I've checked your patch into 1.10, 2.5, 2.6 and master.

--
Regards, Kirill Yukhin

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-12-10 14:50 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-09  7:04 [Tarantool-patches] [PATCH v1] test: fix replication/skip_conflict_row output Alexander V. Tikhonov
2020-12-09 10:24 ` Oleg Koshovetc
2020-12-10 14:50 ` Kirill Yukhin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox