From: "Alexander V. Tikhonov" <avtikhon@tarantool.org>
To: Kirill Yukhin <kyukhin@tarantool.org>
Cc: tarantool-patches@dev.tarantool.org
Subject: [Tarantool-patches] [PATCH v1] test: move error messages for tests into logs (2)
Date: Tue, 29 Sep 2020 16:49:51 +0300 [thread overview]
Message-ID: <6e26af8f3a75332420900d1e6198baf8af37105c.1601387191.git.avtikhon@tarantool.org> (raw)
In-Reply-To: <68a49784105d96be398abae0e3f0684d878a4d5a.1601387191.git.avtikhon@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
next prev parent reply other threads:[~2020-09-29 13:49 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-29 13:47 [Tarantool-patches] [PATCH v1] test: flaky replication/replica_rejoin.test.lua Alexander V. Tikhonov
2020-09-29 13:49 ` [Tarantool-patches] [PATCH v1] test: move error messages for tests into logs (1) Alexander V. Tikhonov
2020-10-01 22:10 ` Vladislav Shpilevoy
2020-09-29 13:49 ` Alexander V. Tikhonov [this message]
2020-10-01 22:10 ` [Tarantool-patches] [PATCH v1] test: flaky replication/replica_rejoin.test.lua Vladislav Shpilevoy
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=6e26af8f3a75332420900d1e6198baf8af37105c.1601387191.git.avtikhon@tarantool.org \
--to=avtikhon@tarantool.org \
--cc=kyukhin@tarantool.org \
--cc=tarantool-patches@dev.tarantool.org \
--subject='Re: [Tarantool-patches] [PATCH v1] test: move error messages for tests into logs (2)' \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox