Skip to content
Snippets Groups Projects
Commit ca0c2799 authored by Alexander V. Tikhonov's avatar Alexander V. Tikhonov Committed by Kirill Yukhin
Browse files

test: move error messages into logs gh-4985

Set error message to log output in test:

  replication/replica_rejoin.test.lua
parent 1433ed8e
No related branches found
No related tags found
No related merge requests found
......@@ -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.error(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.error(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.error(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.error(box.info)
---
- true
...
......
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.error(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.error(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.error(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.error(box.info)
box.space.test:select()
-- Check that rebootstrap is NOT initiated unless the replica
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment