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
b44daf40
Commit
b44daf40
authored
Mar 12, 2019
by
Julien Muchembled
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
qa: comment testExternalInvalidation2
parent
48d936cb
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
0 deletions
+14
-0
neo/tests/threaded/test.py
neo/tests/threaded/test.py
+14
-0
No files found.
neo/tests/threaded/test.py
View file @
b44daf40
...
...
@@ -1008,13 +1008,27 @@ class Test(NEOThreadedTest):
client
.
sync
()
with
cluster
.
master
.
filterConnection
(
client
)
as
mc2
:
mc2
.
delayInvalidateObjects
()
# A first client node (C1) modifies an oid whereas
# invalidations to the other node (C2) are delayed.
x
.
_p_changed
=
1
t
.
commit
()
tid2
=
x
.
_p_serial
# C2 loads the most recent revision of this oid (last_tid=tid1).
self
.
assertEqual
((
tid1
,
tid2
),
client
.
load
(
x
.
_p_oid
)[
1
:])
# C2 poll thread is frozen just before processing invalidation
# packet for tid2. C1 modifies something else -> tid3
r
.
_p_changed
=
1
t
.
commit
()
self
.
assertEqual
(
tid1
,
client
.
last_tid
)
with
Patch
(
client
,
_cache_lock_release
=
_cache_lock_release
):
# 1. Just after having found nothing in cache, the worker
# thread asks the poll thread to get notified about
# invalidations for the loading oid.
# <context switch>
# 2. Both invalidations are processed. -> last_tid=tid3
# <context switch>
# 3. The worker thread loads before tid3+1.
# The poll thread notified [tid2], which must be ignored.
self
.
assertEqual
((
tid2
,
None
),
client
.
load
(
x
.
_p_oid
)[
1
:])
self
.
assertEqual
(
nonlocal_
,
[
2
,
0
])
...
...
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