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
Levin Zimmermann
neoppod
Commits
80d180e7
Commit
80d180e7
authored
Dec 17, 2020
by
Julien Muchembled
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
qa: add testStorageGettingReadyDuringRecovery
parent
b22847d2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
42 additions
and
0 deletions
+42
-0
neo/tests/threaded/test.py
neo/tests/threaded/test.py
+42
-0
No files found.
neo/tests/threaded/test.py
View file @
80d180e7
...
...
@@ -2790,6 +2790,48 @@ class Test(NEOThreadedTest):
ClusterStates
.
RUNNING
)
self
.
assertFalse
(
s0m
.
isClosed
())
@
with_cluster
(
storage_count
=
2
,
replicas
=
1
)
def
testStorageGettingReadyDuringRecovery
(
self
,
cluster
):
"""
Similar to testAnswerInformationLockedDuringRecovery in that a late
non-RECOVERING packet is unexpected when the cluster becomes
non-operational and results in extra storage-master disconnection.
Here, the same connection is closed from both sides at the same time:
M -> S: unexpected AskRecovery in MasterOperationHandler
S -> M: unexpected NotifyReady in RecoveryManager
Contrary to the processing of answering packets, unexpected requests
& notifications are immediately rejected and a less subjects to buggy
code. No reason to make this test pass without a more beautiful way
of how packets are processed in general.
"""
s0
,
s1
=
cluster
.
storage_list
s0m
=
s0
.
master_conn
cluster
.
neoctl
.
killNode
(
s1
.
uuid
)
cluster
.
join
((
s1
,))
s1
.
resetNode
()
t
,
c
=
cluster
.
getTransaction
()
c
.
root
().
_p_changed
=
1
t
.
commit
()
self
.
assertPartitionTable
(
cluster
,
'UO'
)
with
ConnectionFilter
()
as
f
:
@
f
.
delayNotifyReady
def
delay
(
_
):
s0
.
em
.
wakeup
(
s0
.
master_conn
.
close
)
@
f
.
delayAskRecovery
def
_
(
_
):
s0
.
em
.
wakeup
(
lambda
:
f
.
discard
(
delay
))
return
False
s1
.
start
()
self
.
assertFalse
(
s0m
.
isClosed
())
self
.
tic
()
self
.
assertEqual
(
cluster
.
neoctl
.
getClusterState
(),
ClusterStates
.
RUNNING
)
self
.
assertPartitionTable
(
cluster
,
'UU'
)
with
self
.
expectedFailure
():
\
self
.
assertFalse
(
s0m
.
isClosed
())
if
__name__
==
"__main__"
:
unittest
.
main
()
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