From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp55.i.mail.ru (smtp55.i.mail.ru [217.69.128.35]) (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 7B4FA469719 for ; Fri, 11 Sep 2020 22:25:26 +0300 (MSK) From: "Alexander V. Tikhonov" Date: Fri, 11 Sep 2020 22:25:23 +0300 Message-Id: <367c8ed2adc514b38b884f8082b135ff4f19a7eb.1599852230.git.avtikhon@tarantool.org> Subject: [Tarantool-patches] [PATCH v1] test: replication/status.test.lua fails on Debug List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alexander Turenko Cc: tarantool-patches@dev.tarantool.org 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 Co-authored-by: Alexander Turenko [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