From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp40.i.mail.ru (smtp40.i.mail.ru [94.100.177.100]) (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 8356A469719 for ; Tue, 29 Sep 2020 16:49:43 +0300 (MSK) From: "Alexander V. Tikhonov" Date: Tue, 29 Sep 2020 16:49:41 +0300 Message-Id: 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 (1) 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/gh-3160-misc-heartbeats-on-master-changes.test.lua gh-4940 --- Github: https://github.com/tarantool/tarantool/tree/avtikhon/flaky-checksums .../gh-3160-misc-heartbeats-on-master-changes.result | 5 ++++- .../gh-3160-misc-heartbeats-on-master-changes.test.lua | 5 ++++- test/replication/suite.ini | 2 +- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/test/replication/gh-3160-misc-heartbeats-on-master-changes.result b/test/replication/gh-3160-misc-heartbeats-on-master-changes.result index 9bce55ae1..26c369753 100644 --- a/test/replication/gh-3160-misc-heartbeats-on-master-changes.result +++ b/test/replication/gh-3160-misc-heartbeats-on-master-changes.result @@ -34,6 +34,7 @@ end; --- ... function test_timeout() + local log = require('log') local replicaA = box.info.replication[1].upstream or box.info.replication[2].upstream local replicaB = box.info.replication[3].upstream or box.info.replication[2].upstream local follows = test_run:wait_cond(function() @@ -43,7 +44,9 @@ function test_timeout() for i = 0, 99 do box.space.test_timeout:replace({1}) if wait_not_follow(replicaA, replicaB) then - return error(box.info.replication) + log.info("test_timeout() failed, box.info.replication:") + log.info(box.info.replication) + return false end end return true diff --git a/test/replication/gh-3160-misc-heartbeats-on-master-changes.test.lua b/test/replication/gh-3160-misc-heartbeats-on-master-changes.test.lua index b3d8d2d54..480d4ae6c 100644 --- a/test/replication/gh-3160-misc-heartbeats-on-master-changes.test.lua +++ b/test/replication/gh-3160-misc-heartbeats-on-master-changes.test.lua @@ -16,6 +16,7 @@ function wait_not_follow(replicaA, replicaB) end, box.cfg.replication_timeout) end; function test_timeout() + local log = require('log') local replicaA = box.info.replication[1].upstream or box.info.replication[2].upstream local replicaB = box.info.replication[3].upstream or box.info.replication[2].upstream local follows = test_run:wait_cond(function() @@ -25,7 +26,9 @@ function test_timeout() for i = 0, 99 do box.space.test_timeout:replace({1}) if wait_not_follow(replicaA, replicaB) then - return error(box.info.replication) + log.info("test_timeout() failed, box.info.replication:") + log.info(box.info.replication) + return false end end return true diff --git a/test/replication/suite.ini b/test/replication/suite.ini index 007f4f64c..d32d76753 100644 --- a/test/replication/suite.ini +++ b/test/replication/suite.ini @@ -24,7 +24,7 @@ fragile = { }, "gh-3160-misc-heartbeats-on-master-changes.test.lua": { "issues": [ "gh-4940" ], - "checksums": [ "39b09085bc6398d15324191851d6f556" ] + "checksums": [ "39b09085bc6398d15324191851d6f556", "20b7bf9ce51a1a936da3f465db42bd62" ] }, "skip_conflict_row.test.lua": { "issues": [ "gh-4958" ] -- 2.25.1