From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp50.i.mail.ru (smtp50.i.mail.ru [94.100.177.110]) (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 CB05C469719 for ; Tue, 29 Sep 2020 16:49:52 +0300 (MSK) From: "Alexander V. Tikhonov" Date: Tue, 29 Sep 2020 16:49:51 +0300 Message-Id: <6e26af8f3a75332420900d1e6198baf8af37105c.1601387191.git.avtikhon@tarantool.org> In-Reply-To: <68a49784105d96be398abae0e3f0684d878a4d5a.1601387191.git.avtikhon@tarantool.org> References: <68a49784105d96be398abae0e3f0684d878a4d5a.1601387191.git.avtikhon@tarantool.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [Tarantool-patches] [PATCH v1] test: move error messages for tests into logs (2) List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kirill Yukhin Cc: tarantool-patches@dev.tarantool.org Set error message to log output in test: replication/replica_rejoin.test.lua gh-4985 --- Github: https://github.com/tarantool/tarantool/tree/avtikhon/flaky-checksums test/replication/replica_rejoin.result | 11 +++++++---- test/replication/replica_rejoin.test.lua | 9 +++++---- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/test/replication/replica_rejoin.result b/test/replication/replica_rejoin.result index 4d9e83868..dbcde0db2 100644 --- a/test/replication/replica_rejoin.result +++ b/test/replication/replica_rejoin.result @@ -4,6 +4,9 @@ env = require('test_run') test_run = env.new() --- ... +log = require('log') +--- +... engine = test_run:get_cfg('engine') --- ... @@ -45,7 +48,7 @@ test_run:cmd("switch replica") --- - true ... -box.info.replication[1].upstream.status == 'follow' or box.info +box.info.replication[1].upstream.status == 'follow' or log(box.info) --- - true ... @@ -115,7 +118,7 @@ test_run:cmd("start server replica with args='true'") --- - true ... -box.info.replication[2].downstream.vclock ~= nil or box.info +box.info.replication[2].downstream.vclock ~= nil or log(box.info) --- - true ... @@ -123,7 +126,7 @@ test_run:cmd("switch replica") --- - true ... -box.info.replication[1].upstream.status == 'follow' or box.info +box.info.replication[1].upstream.status == 'follow' or log(box.info) --- - true ... @@ -162,7 +165,7 @@ box.space.test:select() ... -- Check that restart works as usual. test_run:cmd("restart server replica with args='true'") -box.info.replication[1].upstream.status == 'follow' or box.info +box.info.replication[1].upstream.status == 'follow' or log(box.info) --- - true ... diff --git a/test/replication/replica_rejoin.test.lua b/test/replication/replica_rejoin.test.lua index 599a52988..3ea588aa6 100644 --- a/test/replication/replica_rejoin.test.lua +++ b/test/replication/replica_rejoin.test.lua @@ -1,5 +1,6 @@ env = require('test_run') test_run = env.new() +log = require('log') engine = test_run:get_cfg('engine') test_run:cleanup_cluster() @@ -19,7 +20,7 @@ _ = box.space.test:insert{3} test_run:cmd("create server replica with rpl_master=default, script='replication/replica.lua'") test_run:cmd("start server replica with args='true'") test_run:cmd("switch replica") -box.info.replication[1].upstream.status == 'follow' or box.info +box.info.replication[1].upstream.status == 'follow' or log(box.info) box.space.test:select() test_run:cmd("switch default") test_run:cmd("stop server replica") @@ -46,9 +47,9 @@ box.cfg{checkpoint_count = checkpoint_count} -- Restart the replica. Since xlogs have been removed, -- it is supposed to rejoin without changing id. test_run:cmd("start server replica with args='true'") -box.info.replication[2].downstream.vclock ~= nil or box.info +box.info.replication[2].downstream.vclock ~= nil or log(box.info) test_run:cmd("switch replica") -box.info.replication[1].upstream.status == 'follow' or box.info +box.info.replication[1].upstream.status == 'follow' or log(box.info) box.space.test:select() test_run:cmd("switch default") @@ -62,7 +63,7 @@ box.space.test:select() -- Check that restart works as usual. test_run:cmd("restart server replica with args='true'") -box.info.replication[1].upstream.status == 'follow' or box.info +box.info.replication[1].upstream.status == 'follow' or log(box.info) box.space.test:select() -- Check that rebootstrap is NOT initiated unless the replica -- 2.25.1