Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
T
tarantool
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
core
tarantool
Commits
ca0c2799
Commit
ca0c2799
authored
4 years ago
by
Alexander V. Tikhonov
Committed by
Kirill Yukhin
4 years ago
Browse files
Options
Downloads
Patches
Plain Diff
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
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
test/replication/replica_rejoin.result
+7
-4
7 additions, 4 deletions
test/replication/replica_rejoin.result
test/replication/replica_rejoin.test.lua
+5
-4
5 additions, 4 deletions
test/replication/replica_rejoin.test.lua
with
12 additions
and
8 deletions
test/replication/replica_rejoin.result
+
7
−
4
View file @
ca0c2799
...
...
@@ -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
...
...
...
This diff is collapsed.
Click to expand it.
test/replication/replica_rejoin.test.lua
+
5
−
4
View file @
ca0c2799
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
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment