* [Tarantool-patches] [PATCH v1] test: replication/status.test.lua fails on Debug
@ 2020-09-11 19:25 Alexander V. Tikhonov
2020-09-11 20:28 ` Alexander Turenko
0 siblings, 1 reply; 2+ messages in thread
From: Alexander V. Tikhonov @ 2020-09-11 19:25 UTC (permalink / raw)
To: Alexander Turenko; +Cc: tarantool-patches
Found 2 issues on Debug build:
[009] --- replication/status.result Fri Sep 11 10:04:53 2020
[009] +++ replication/status.reject Fri Sep 11 13:16:21 2020
[009] @@ -174,7 +174,8 @@
[009] ...
[009] test_run:wait_downstream(replica_id, {status == 'follow'})
[009] ---
[009] -- true
[009] +- error: '[string "return test_run:wait_downstream(replica_id, {..."]:1: variable
[009] + ''status'' is not declared'
[009] ...
[009] -- wait for the replication vclock
[009] test_run:wait_cond(function() \
[009] @@ -226,7 +227,8 @@
[009] ...
[009] test_run:wait_upstream(master_id, {status == 'follow'})
[009] ---
[009] -- true
[009] +- error: '[string "return test_run:wait_upstream(master_id, {sta..."]:1: variable
[009] + ''status'' is not declared'
[009] ...
[009] master.upstream.lag < 1
[009] ---
It happened because of the change introduced in commit [1]. Where
mistakenly were used wait_upstream()/wait_downstream() with:
test_run:wait_*stream(*_id, {status == 'follow'})
with status set using '==' instead of '='. We unable to read status
variable when the strict mode is enabled. It is enabled by default on
Debug builds.
Follows up #5110
Closes #5297
Reviewed-by: Alexander Turenko <alexander.turenko@tarantool.org>
Co-authored-by: Alexander Turenko <alexander.turenko@tarantool.org>
[1] - a08b4f3adc8125794845dc42ac9031d84f9f61f8 ("test: flaky replication/status.test.lua status")
---
Github: https://github.com/tarantool/tarantool/tree/avtikhon/gh-5297-fix-status-5110
Issue: https://github.com/tarantool/tarantool/issues/5110
Issue: https://github.com/tarantool/tarantool/issues/5297
test/replication/status.result | 4 ++--
test/replication/status.test.lua | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/test/replication/status.result b/test/replication/status.result
index d5addbc80..4f2cf56ea 100644
--- a/test/replication/status.result
+++ b/test/replication/status.result
@@ -172,7 +172,7 @@ replica.upstream == nil
---
- true
...
-test_run:wait_downstream(replica_id, {status == 'follow'})
+test_run:wait_downstream(replica_id, {status = 'follow'})
---
- true
...
@@ -224,7 +224,7 @@ master.uuid == box.space._cluster:get(master_id)[2]
---
- true
...
-test_run:wait_upstream(master_id, {status == 'follow'})
+test_run:wait_upstream(master_id, {status = 'follow'})
---
- true
...
diff --git a/test/replication/status.test.lua b/test/replication/status.test.lua
index 6006ce9cf..0facd7c0a 100644
--- a/test/replication/status.test.lua
+++ b/test/replication/status.test.lua
@@ -64,7 +64,7 @@ replica.uuid == box.space._cluster:get(replica_id)[2]
-- replica.lsn == box.info.vclock[replica_id]
replica.lsn == 0
replica.upstream == nil
-test_run:wait_downstream(replica_id, {status == 'follow'})
+test_run:wait_downstream(replica_id, {status = 'follow'})
-- wait for the replication vclock
test_run:wait_cond(function() \
local r = box.info.replication[replica_id].downstream.vclock \
@@ -88,7 +88,7 @@ box.info.vclock[master_id] == 2
master = box.info.replication[master_id]
master.id == master_id
master.uuid == box.space._cluster:get(master_id)[2]
-test_run:wait_upstream(master_id, {status == 'follow'})
+test_run:wait_upstream(master_id, {status = 'follow'})
master.upstream.lag < 1
master.upstream.idle < 1
master.upstream.peer:match("unix/")
--
2.17.1
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-09-11 20:28 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-11 19:25 [Tarantool-patches] [PATCH v1] test: replication/status.test.lua fails on Debug Alexander V. Tikhonov
2020-09-11 20:28 ` Alexander Turenko
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox