Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
neoppod
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Carlos Ramos Carreño
neoppod
Commits
ef4d58f6
Commit
ef4d58f6
authored
Apr 07, 2019
by
Julien Muchembled
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
qa: extend test reproducing the migration of a big ZODB to NEO
parent
ab082d7e
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
40 additions
and
19 deletions
+40
-19
neo/tests/threaded/testReplication.py
neo/tests/threaded/testReplication.py
+40
-19
No files found.
neo/tests/threaded/testReplication.py
View file @
ef4d58f6
...
...
@@ -933,39 +933,60 @@ class ReplicationTests(NEOThreadedTest):
def
testReplicationBlockedByUnfinished2
(
self
):
self
.
testReplicationBlockedByUnfinished1
(
True
)
@
with_cluster
(
partitions
=
6
,
storage_count
=
4
,
start_cluster
=
0
)
def
test
CloneStorag
e
(
self
,
cluster
):
@
with_cluster
(
partitions
=
6
,
storage_count
=
5
,
start_cluster
=
0
)
def
test
SplitAndMakeResilientUsingClon
e
(
self
,
cluster
):
"""
Test cloning of storage nodes using --new-nid instead NEO replication.
"""
s01
=
cluster
.
storage_list
[:
2
]
s23
=
cluster
.
storage_list
[
2
:]
cluster
.
start
(
storage_list
=
s01
)
s0
=
cluster
.
storage_list
[
0
]
s12
=
cluster
.
storage_list
[
1
:
3
]
s34
=
cluster
.
storage_list
[
3
:]
cluster
.
start
(
storage_list
=
(
s0
,))
cluster
.
importZODB
()(
6
)
for
s
in
s12
:
s
.
start
()
self
.
tic
()
with
Patch
(
cluster
,
storage_list
=
s01
):
cluster
.
sortStorageList
()
cluster
.
stop
()
cluster
.
storage_list
[:
2
]
=
s01
storage_dict
=
{}
for
s
,
d
in
zip
(
s01
,
s23
):
drop_list
=
[
s0
.
uuid
]
self
.
assertRaises
(
SystemExit
,
cluster
.
neoctl
.
tweakPartitionTable
,
drop_list
)
cluster
.
enableStorageList
(
s12
)
def
expected
(
changed
):
s0
=
1
,
CellStates
.
UP_TO_DATE
s
=
CellStates
.
OUT_OF_DATE
if
changed
else
CellStates
.
UP_TO_DATE
return
changed
,
3
*
[[
s0
,
(
2
,
s
)],
[
s0
,
(
3
,
s
)]]
for
dry_run
in
True
,
False
:
self
.
assertEqual
(
expected
(
True
),
cluster
.
neoctl
.
tweakPartitionTable
(
drop_list
,
dry_run
))
self
.
tic
()
self
.
assertEqual
(
expected
(
False
),
cluster
.
neoctl
.
tweakPartitionTable
(
drop_list
))
for
s
,
d
in
zip
(
s12
,
s34
):
s
.
stop
()
cluster
.
join
((
s
,))
s
.
resetNode
()
d
.
dm
.
restore
(
s
.
dm
.
dump
())
d
.
resetNode
(
new_nid
=
True
)
storage_dict
[
s
]
=
NodeStates
.
RUNNING
storage_dict
[
d
]
=
NodeStates
.
DOWN
cluster
.
start
(
storage_dict
)
cluster
.
join
(
s23
)
for
d
in
s23
:
s
.
start
()
d
.
start
()
self
.
tic
()
self
.
assertEqual
(
cluster
.
getNodeState
(
s
),
NodeStates
.
RUNNING
)
self
.
assertEqual
(
cluster
.
getNodeState
(
d
),
NodeStates
.
DOWN
)
cluster
.
join
((
d
,))
d
.
resetNode
(
new_nid
=
False
)
d
.
start
()
self
.
tic
()
self
.
checkReplicas
(
cluster
)
expected
=
'|'
.
join
([
'U
.U.|
.U.U'
]
*
3
)
expected
=
'|'
.
join
([
'U
U.U.|U
.U.U'
]
*
3
)
self
.
assertPartitionTable
(
cluster
,
expected
)
cluster
.
neoctl
.
setNumReplicas
(
1
)
cluster
.
neoctl
.
tweakPartitionTable
()
cluster
.
neoctl
.
tweakPartitionTable
(
drop_list
)
self
.
tic
()
self
.
assertPartitionTable
(
cluster
,
expected
)
s0
.
stop
()
cluster
.
join
((
s0
,))
cluster
.
neoctl
.
dropNode
(
s0
.
uuid
)
expected
=
'|'
.
join
([
'U.U.|.U.U'
]
*
3
)
self
.
assertPartitionTable
(
cluster
,
expected
)
@
with_cluster
(
partitions
=
5
,
replicas
=
2
,
storage_count
=
3
)
def
testCheckReplicas
(
self
,
cluster
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment