Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
W
wendelin.core
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
Kirill Smelkov
wendelin.core
Commits
b039f763
Commit
b039f763
authored
Jun 11, 2019
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
6cb0688e
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
wcfs/wcfs_test.py
wcfs/wcfs_test.py
+6
-3
No files found.
wcfs/wcfs_test.py
View file @
b039f763
...
@@ -521,8 +521,11 @@ class tFile:
...
@@ -521,8 +521,11 @@ class tFile:
if
w
is
not
None
and
w
.
at
<
blkrev
:
if
w
is
not
None
and
w
.
at
<
blkrev
:
if
cached
==
1
:
if
cached
==
1
:
# XXX assert blk already pinned on that watch
# XXX assert blk already pinned on that watch
pass
assert
blk
in
w
.
pinned
# XXX correct?
else
:
else
:
assert
cached
==
0
assert
blk
not
in
w
.
pinned
# cache is cleared only on invalidations
# XXX correct ^^^ ?
# XXX and watch not already pinned on the watch
# XXX and watch not already pinned on the watch
pinok
=
{
blk
:
t
.
tdb
.
_blkRev
(
t
.
zf
,
blk
,
w
.
at
)}
pinok
=
{
blk
:
t
.
tdb
.
_blkRev
(
t
.
zf
,
blk
,
w
.
at
)}
shouldPin
=
True
shouldPin
=
True
...
@@ -949,7 +952,6 @@ def watch(twlink, zf, at, pinok=None): # XXX -> ?
...
@@ -949,7 +952,6 @@ def watch(twlink, zf, at, pinok=None): # XXX -> ?
twlink
.
_watch
(
zf
,
at
,
pinok
,
"ok"
)
twlink
.
_watch
(
zf
,
at
,
pinok
,
"ok"
)
w
.
at
=
at
w
.
at
=
at
# XXX update pinned
# _watch sends watch request for zf@at, expects initial pins specified by pinok and final reply.
# _watch sends watch request for zf@at, expects initial pins specified by pinok and final reply.
#
#
...
@@ -1008,7 +1010,7 @@ def doCheckingPin(f, pinokByWLink, pinfunc=None): # -> []event(str)
...
@@ -1008,7 +1010,7 @@ def doCheckingPin(f, pinokByWLink, pinfunc=None): # -> []event(str)
ev
.
append
(
'pin ack pre'
)
# XXX +details?
ev
.
append
(
'pin ack pre'
)
# XXX +details?
for
p
in
pinv
:
for
p
in
pinv
:
assert
w
.
foid
==
p
.
foid
assert
w
.
foid
==
p
.
foid
if
p
.
at
is
None
:
#
re
pin to @head
if
p
.
at
is
None
:
#
un
pin to @head
assert
p
.
blk
in
w
.
pinned
# must have been pinned before XXX correct?
assert
p
.
blk
in
w
.
pinned
# must have been pinned before XXX correct?
del
w
.
pinned
[
p
.
blk
]
del
w
.
pinned
[
p
.
blk
]
else
:
else
:
...
@@ -1162,6 +1164,7 @@ def test_wcfs():
...
@@ -1162,6 +1164,7 @@ def test_wcfs():
wl
.
_closeTX
()
wl
.
_closeTX
()
wg
.
go
(
_
)
wg
.
go
(
_
)
wg
.
wait
()
wg
.
wait
()
wl
.
close
()
# invalid requests -> wcfs replies error
# invalid requests -> wcfs replies error
wl
=
t
.
openwatch
()
wl
=
t
.
openwatch
()
...
...
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