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
1
Issues
1
List
Boards
Labels
Milestones
Merge Requests
2
Merge Requests
2
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
neoppod
Commits
ab552d87
Commit
ab552d87
authored
Nov 10, 2016
by
Kirill Smelkov
Committed by
Julien Muchembled
Nov 15, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tests/threaded: Add handy shortcuts to NEOCluster to concisely check cluster properties in tests
parent
d9dd39f0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
2 deletions
+12
-2
neo/tests/threaded/__init__.py
neo/tests/threaded/__init__.py
+10
-0
neo/tests/threaded/testReplication.py
neo/tests/threaded/testReplication.py
+2
-2
No files found.
neo/tests/threaded/__init__.py
View file @
ab552d87
...
...
@@ -668,10 +668,20 @@ class NEOCluster(object):
return
admin
###
# More handy shortcuts for tests
@
property
def
backup_tid
(
self
):
return
self
.
neoctl
.
getRecovery
()[
1
]
@
property
def
last_tid
(
self
):
return
self
.
primary_master
.
getLastTransaction
()
@
property
def
primary_master
(
self
):
master
,
=
[
master
for
master
in
self
.
master_list
if
master
.
primary
]
return
master
###
def
reset
(
self
,
clear_database
=
False
):
for
node_type
in
'master'
,
'storage'
,
'admin'
:
...
...
neo/tests/threaded/testReplication.py
View file @
ab552d87
...
...
@@ -142,7 +142,7 @@ class ReplicationTests(NEOThreadedTest):
self
.
tic
()
self
.
tic
()
self
.
assertEqual
(
np
*
nr
,
self
.
checkBackup
(
backup
,
max_tid
=
backup
.
master
.
getLastTransaction
()
))
max_tid
=
backup
.
last_tid
))
finally
:
backup
.
stop
()
backup
.
reset
()
...
...
@@ -160,7 +160,7 @@ class ReplicationTests(NEOThreadedTest):
self
.
tic
()
self
.
tic
()
self
.
assertEqual
(
np
*
nr
,
self
.
checkBackup
(
backup
,
max_tid
=
backup
.
master
.
getLastTransaction
()
))
max_tid
=
backup
.
last_tid
))
finally
:
backup
.
stop
()
finally
:
...
...
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