[Tarantool-patches] [PATCH v1] test: move error messages for tests into logs (3)

Alexander V. Tikhonov avtikhon at tarantool.org
Wed Sep 30 11:58:02 MSK 2020


Set error message to log output in test:

  replication/gh-4402-info-errno.test.lua gh-5366
---

Github: https://github.com/tarantool/tarantool/tree/avtikhon/flaky-checksums

 test/replication/gh-4402-info-errno.result   | 4 ++--
 test/replication/gh-4402-info-errno.test.lua | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/test/replication/gh-4402-info-errno.result b/test/replication/gh-4402-info-errno.result
index 9c6b352a4..682aac6f3 100644
--- a/test/replication/gh-4402-info-errno.result
+++ b/test/replication/gh-4402-info-errno.result
@@ -27,7 +27,7 @@ i = box.info
 replica_id = i.id % 2 + 1
  | ---
  | ...
-test_run:wait_downstream(replica_id, {status = 'follow'}) or i
+test_run:wait_downstream(replica_id, {status = 'follow'}) or require('log').error(i)
  | ---
  | - true
  | ...
@@ -50,7 +50,7 @@ i = box.info
 d = i.replication[replica_id].downstream
  | ---
  | ...
-d ~= nil and d.system_message ~= nil and d.message ~= nil or i
+d ~= nil and d.system_message ~= nil and d.message ~= nil or require('log').error(i)
  | ---
  | - true
  | ...
diff --git a/test/replication/gh-4402-info-errno.test.lua b/test/replication/gh-4402-info-errno.test.lua
index 8f72e7f72..bfaf30d38 100644
--- a/test/replication/gh-4402-info-errno.test.lua
+++ b/test/replication/gh-4402-info-errno.test.lua
@@ -12,13 +12,13 @@ test_run:cmd('create server replica with rpl_master=default, script="replication
 test_run:cmd('start server replica')
 i = box.info
 replica_id = i.id % 2 + 1
-test_run:wait_downstream(replica_id, {status = 'follow'}) or i
+test_run:wait_downstream(replica_id, {status = 'follow'}) or require('log').error(i)
 
 test_run:cmd('stop server replica')
 test_run:cmd("cleanup server replica")
 test_run:cmd("delete server replica")
 i = box.info
 d = i.replication[replica_id].downstream
-d ~= nil and d.system_message ~= nil and d.message ~= nil or i
+d ~= nil and d.system_message ~= nil and d.message ~= nil or require('log').error(i)
 
 box.schema.user.revoke('guest', 'replication')
-- 
2.25.1



More information about the Tarantool-patches mailing list