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
337e55b1
Commit
337e55b1
authored
9 years ago
by
Alexandr Lyapunov
Committed by
Roman Tsisyk
9 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Added more test cases to multiengine join test
parent
8b9afae7
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/engine/replica_join.result
+113
-4
113 additions, 4 deletions
test/engine/replica_join.result
test/engine/replica_join.test.lua
+41
-3
41 additions, 3 deletions
test/engine/replica_join.test.lua
with
154 additions
and
7 deletions
test/engine/replica_join.result
+
113
−
4
View file @
337e55b1
...
...
@@ -22,15 +22,125 @@ space = box.schema.space.create('test', { id = 99999, engine = engine })
index = space:create_index('primary', { type = index})
---
...
for k = 1, 123 do space:insert{k, k*k} end
box.snapshot()
---
- ok
...
-- replica join
test_run:cmd("create server replica with rpl_master=default, script='replication/replica.lua'")
---
- true
...
test_run:cmd("start server replica")
---
- true
...
test_run:cmd('wait_lsn replica default')
---
- true
...
test_run:cmd('switch replica')
---
- true
...
box.space.test:select()
---
- []
...
test_run:cmd('switch default')
---
- true
...
test_run:cmd("stop server replica")
---
- true
...
_ = test_run:cmd("cleanup server replica")
---
...
-- new data
_ = box.space.test:insert{1, 1}
---
...
-- replica join
test_run:cmd("deploy server replica")
---
- true
...
test_run:cmd("start server replica")
---
- true
...
test_run:cmd('wait_lsn replica default')
---
- true
...
test_run:cmd('switch replica')
---
- true
...
box.space.test:select()
---
- - [1, 1]
...
test_run:cmd('switch default')
---
- true
...
test_run:cmd("stop server replica")
---
- true
...
_ = test_run:cmd("cleanup server replica")
---
...
-- add snapshot
box.snapshot()
---
- ok
...
-- replica join
test_run:cmd("create server replica with rpl_master=default, script='replication/replica.lua'")
test_run:cmd("deploy server replica")
---
- true
...
test_run:cmd("start server replica")
---
- true
...
test_run:cmd('wait_lsn replica default')
---
- true
...
test_run:cmd('switch replica')
---
- true
...
box.space.test:select()
---
- - [1, 1]
...
test_run:cmd('switch default')
---
- true
...
test_run:cmd("stop server replica")
---
- true
...
_ = test_run:cmd("cleanup server replica")
---
...
-- new data
for k = 2, 123 do box.space.test:insert{k, k*k} end
---
...
box.snapshot()
---
- ok
...
-- replica join
test_run:cmd("deploy server replica")
---
- true
...
...
...
@@ -180,9 +290,8 @@ test_run:cmd("stop server replica")
---
- true
...
test_run:cmd("cleanup server replica")
_ =
test_run:cmd("cleanup server replica")
---
- true
...
space:drop()
---
...
...
This diff is collapsed.
Click to expand it.
test/engine/replica_join.test.lua
+
41
−
3
View file @
337e55b1
...
...
@@ -2,26 +2,64 @@ env = require('test_run')
test_run
=
env
.
new
()
engine
=
test_run
:
get_cfg
(
'engine'
)
index
=
test_run
:
get_cfg
(
'index'
)
box
.
schema
.
user
.
grant
(
'guest'
,
'read,write,execute'
,
'universe'
)
box
.
schema
.
user
.
grant
(
'guest'
,
'replication'
)
space
=
box
.
schema
.
space
.
create
(
'test'
,
{
id
=
99999
,
engine
=
engine
})
index
=
space
:
create_index
(
'primary'
,
{
type
=
index
})
for
k
=
1
,
123
do
space
:
insert
{
k
,
k
*
k
}
end
box
.
snapshot
()
-- replica join
test_run
:
cmd
(
"create server replica with rpl_master=default, script='replication/replica.lua'"
)
test_run
:
cmd
(
"start server replica"
)
test_run
:
cmd
(
'wait_lsn replica default'
)
test_run
:
cmd
(
'switch replica'
)
box
.
space
.
test
:
select
()
test_run
:
cmd
(
'switch default'
)
test_run
:
cmd
(
"stop server replica"
)
_
=
test_run
:
cmd
(
"cleanup server replica"
)
-- new data
_
=
box
.
space
.
test
:
insert
{
1
,
1
}
-- replica join
test_run
:
cmd
(
"deploy server replica"
)
test_run
:
cmd
(
"start server replica"
)
test_run
:
cmd
(
'wait_lsn replica default'
)
test_run
:
cmd
(
'switch replica'
)
box
.
space
.
test
:
select
()
test_run
:
cmd
(
'switch default'
)
test_run
:
cmd
(
"stop server replica"
)
_
=
test_run
:
cmd
(
"cleanup server replica"
)
-- add snapshot
box
.
snapshot
()
-- replica join
test_run
:
cmd
(
"deploy server replica"
)
test_run
:
cmd
(
"start server replica"
)
test_run
:
cmd
(
'wait_lsn replica default'
)
test_run
:
cmd
(
'switch replica'
)
box
.
space
.
test
:
select
()
test_run
:
cmd
(
'switch default'
)
test_run
:
cmd
(
"stop server replica"
)
_
=
test_run
:
cmd
(
"cleanup server replica"
)
-- new data
for
k
=
2
,
123
do
box
.
space
.
test
:
insert
{
k
,
k
*
k
}
end
box
.
snapshot
()
-- replica join
test_run
:
cmd
(
"deploy server replica"
)
test_run
:
cmd
(
"start server replica"
)
test_run
:
cmd
(
'wait_lsn replica default'
)
test_run
:
cmd
(
'switch replica'
)
box
.
space
.
test
:
select
()
test_run
:
cmd
(
'switch default'
)
test_run
:
cmd
(
"stop server replica"
)
test_run
:
cmd
(
"cleanup server replica"
)
_
=
test_run
:
cmd
(
"cleanup server replica"
)
space
:
drop
()
box
.
snapshot
()
box
.
schema
.
user
.
revoke
(
'guest'
,
'replication'
)
box
.
schema
.
user
.
revoke
(
'guest'
,
'read,write,execute'
,
'universe'
)
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