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
Vincent Pelletier
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):
...
@@ -933,39 +933,60 @@ class ReplicationTests(NEOThreadedTest):
def
testReplicationBlockedByUnfinished2
(
self
):
def
testReplicationBlockedByUnfinished2
(
self
):
self
.
testReplicationBlockedByUnfinished1
(
True
)
self
.
testReplicationBlockedByUnfinished1
(
True
)
@
with_cluster
(
partitions
=
6
,
storage_count
=
4
,
start_cluster
=
0
)
@
with_cluster
(
partitions
=
6
,
storage_count
=
5
,
start_cluster
=
0
)
def
test
CloneStorag
e
(
self
,
cluster
):
def
test
SplitAndMakeResilientUsingClon
e
(
self
,
cluster
):
"""
"""
Test cloning of storage nodes using --new-nid instead NEO replication.
Test cloning of storage nodes using --new-nid instead NEO replication.
"""
"""
s01
=
cluster
.
storage_list
[:
2
]
s0
=
cluster
.
storage_list
[
0
]
s23
=
cluster
.
storage_list
[
2
:]
s12
=
cluster
.
storage_list
[
1
:
3
]
cluster
.
start
(
storage_list
=
s01
)
s34
=
cluster
.
storage_list
[
3
:]
cluster
.
start
(
storage_list
=
(
s0
,))
cluster
.
importZODB
()(
6
)
cluster
.
importZODB
()(
6
)
for
s
in
s12
:
s
.
start
()
self
.
tic
()
self
.
tic
()
with
Patch
(
cluster
,
storage_list
=
s01
):
drop_list
=
[
s0
.
uuid
]
cluster
.
sortStorageList
()
self
.
assertRaises
(
SystemExit
,
cluster
.
neoctl
.
tweakPartitionTable
,
cluster
.
stop
()
drop_list
)
cluster
.
storage_list
[:
2
]
=
s01
cluster
.
enableStorageList
(
s12
)
storage_dict
=
{}
def
expected
(
changed
):
for
s
,
d
in
zip
(
s01
,
s23
):
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
.
dm
.
restore
(
s
.
dm
.
dump
())
d
.
resetNode
(
new_nid
=
True
)
d
.
resetNode
(
new_nid
=
True
)
storage_dict
[
s
]
=
NodeStates
.
RUNNING
s
.
start
()
storage_dict
[
d
]
=
NodeStates
.
DOWN
d
.
start
()
cluster
.
start
(
storage_dict
)
self
.
tic
()
cluster
.
join
(
s23
)
self
.
assertEqual
(
cluster
.
getNodeState
(
s
),
NodeStates
.
RUNNING
)
for
d
in
s23
:
self
.
assertEqual
(
cluster
.
getNodeState
(
d
),
NodeStates
.
DOWN
)
cluster
.
join
((
d
,))
d
.
resetNode
(
new_nid
=
False
)
d
.
resetNode
(
new_nid
=
False
)
d
.
start
()
d
.
start
()
self
.
tic
()
self
.
tic
()
self
.
checkReplicas
(
cluster
)
self
.
checkReplicas
(
cluster
)
expected
=
'|'
.
join
([
'U
.U.|
.U.U'
]
*
3
)
expected
=
'|'
.
join
([
'U
U.U.|U
.U.U'
]
*
3
)
self
.
assertPartitionTable
(
cluster
,
expected
)
self
.
assertPartitionTable
(
cluster
,
expected
)
cluster
.
neoctl
.
setNumReplicas
(
1
)
cluster
.
neoctl
.
setNumReplicas
(
1
)
cluster
.
neoctl
.
tweakPartitionTable
()
cluster
.
neoctl
.
tweakPartitionTable
(
drop_list
)
self
.
tic
()
self
.
tic
()
self
.
assertPartitionTable
(
cluster
,
expected
)
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
)
@
with_cluster
(
partitions
=
5
,
replicas
=
2
,
storage_count
=
3
)
def
testCheckReplicas
(
self
,
cluster
):
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