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
d7245ee9
Commit
d7245ee9
authored
Sep 28, 2018
by
Julien Muchembled
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
qa: deindent code
parent
9a5b46dd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
32 deletions
+27
-32
neo/tests/threaded/test.py
neo/tests/threaded/test.py
+27
-32
No files found.
neo/tests/threaded/test.py
View file @
d7245ee9
...
@@ -740,26 +740,23 @@ class Test(NEOThreadedTest):
...
@@ -740,26 +740,23 @@ class Test(NEOThreadedTest):
@
with_cluster
(
replicas
=
1
)
@
with_cluster
(
replicas
=
1
)
def
testStorageReconnectDuringStore
(
self
,
cluster
):
def
testStorageReconnectDuringStore
(
self
,
cluster
):
if
1
:
t
,
c
=
cluster
.
getTransaction
()
t
,
c
=
cluster
.
getTransaction
()
c
.
root
()[
0
]
=
'ok'
c
.
root
()[
0
]
=
'ok'
cluster
.
client
.
cp
.
closeAll
()
cluster
.
client
.
cp
.
closeAll
()
t
.
commit
()
# store request
t
.
commit
()
# store request
@
with_cluster
(
storage_count
=
2
,
partitions
=
2
)
@
with_cluster
(
storage_count
=
2
,
partitions
=
2
)
def
testStorageReconnectDuringTransactionLog
(
self
,
cluster
):
def
testStorageReconnectDuringTransactionLog
(
self
,
cluster
):
if
1
:
t
,
c
=
cluster
.
getTransaction
()
t
,
c
=
cluster
.
getTransaction
()
cluster
.
client
.
cp
.
closeAll
()
cluster
.
client
.
cp
.
closeAll
()
tid
,
(
t1
,)
=
cluster
.
client
.
transactionLog
(
tid
,
(
t1
,)
=
cluster
.
client
.
transactionLog
(
ZERO_TID
,
c
.
db
().
lastTransaction
(),
10
)
ZERO_TID
,
c
.
db
().
lastTransaction
(),
10
)
@
with_cluster
(
storage_count
=
2
,
partitions
=
2
)
@
with_cluster
(
storage_count
=
2
,
partitions
=
2
)
def
testStorageReconnectDuringUndoLog
(
self
,
cluster
):
def
testStorageReconnectDuringUndoLog
(
self
,
cluster
):
if
1
:
t
,
c
=
cluster
.
getTransaction
()
t
,
c
=
cluster
.
getTransaction
()
cluster
.
client
.
cp
.
closeAll
()
cluster
.
client
.
cp
.
closeAll
()
t1
,
=
cluster
.
client
.
undoLog
(
0
,
10
)
t1
,
=
cluster
.
client
.
undoLog
(
0
,
10
)
@
with_cluster
(
storage_count
=
2
,
replicas
=
1
)
@
with_cluster
(
storage_count
=
2
,
replicas
=
1
)
def
testDropNodeThenRestartCluster
(
self
,
cluster
):
def
testDropNodeThenRestartCluster
(
self
,
cluster
):
...
@@ -981,24 +978,22 @@ class Test(NEOThreadedTest):
...
@@ -981,24 +978,22 @@ class Test(NEOThreadedTest):
@
with_cluster
(
storage_count
=
2
,
partitions
=
2
)
@
with_cluster
(
storage_count
=
2
,
partitions
=
2
)
def
testReadVerifyingStorage
(
self
,
cluster
):
def
testReadVerifyingStorage
(
self
,
cluster
):
if
1
:
t1
,
c1
=
cluster
.
getTransaction
()
t1
,
c1
=
cluster
.
getTransaction
()
c1
.
root
()[
'x'
]
=
x
=
PCounter
()
c1
.
root
()[
'x'
]
=
x
=
PCounter
()
t1
.
commit
()
t1
.
commit
()
# We need a second client for external invalidations.
# We need a second client for external invalidations.
with
cluster
.
newClient
(
1
)
as
db
:
with
cluster
.
newClient
(
1
)
as
db
:
t2
,
c2
=
cluster
.
getTransaction
(
db
)
t2
,
c2
=
cluster
.
getTransaction
(
db
)
r
=
c2
.
root
()
r
=
c2
.
root
()
r
[
'y'
]
=
None
r
[
'y'
]
=
None
self
.
readCurrent
(
r
[
'x'
])
self
.
readCurrent
(
r
[
'x'
])
# Force the new tid to be even, like the modified oid and unlike
# Force the new tid to be even, like the modified oid and
# the oid on which we used readCurrent. Thus we check that the node
# unlike the oid on which we used readCurrent. Thus we check
# containing only the partition 1 is also involved in tpc_finish.
# that the node containing only the partition 1 is also
with
cluster
.
moduloTID
(
0
):
# involved in tpc_finish.
t2
.
commit
()
with
cluster
.
moduloTID
(
0
):
for
storage
in
cluster
.
storage_list
:
t2
.
commit
()
self
.
assertFalse
(
storage
.
tm
.
_transaction_dict
)
for
storage
in
cluster
.
storage_list
:
self
.
assertFalse
(
storage
.
tm
.
_transaction_dict
)
# Check we didn't get an invalidation, which would cause an
# Check we didn't get an invalidation, which would cause an
# assertion failure in the cache. Connection does the same check in
# assertion failure in the cache. Connection does the same check in
# _setstate_noncurrent so this could be also done by starting a
# _setstate_noncurrent so this could be also done by starting a
...
...
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