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
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Joshua
wendelin.core
Commits
8689314b
Commit
8689314b
authored
Jun 07, 2019
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
8c05bc4c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
wcfs/wcfs_test.py
wcfs/wcfs_test.py
+6
-6
No files found.
wcfs/wcfs_test.py
View file @
8689314b
...
...
@@ -846,7 +846,7 @@ def _watch(twlink, zf, at, pinok, replyok):
assert
reply
[:
len
(
rok
)]
==
rok
else
:
assert
reply
==
replyok
doCheckingPin
(
_
,
{
twlink
:
pinok
})
doCheckingPin
(
_
,
{
twlink
:
(
zf
,
pinok
)
})
twlink
.
_watching
[
zf
]
=
at
...
...
@@ -855,7 +855,7 @@ def _watch(twlink, zf, at, pinok, replyok):
# time f executes.
#
# f(ctx) # XXX + ev?
# pinokByWLink: {} tWatchLink ->
{} blk -> at
.
# pinokByWLink: {} tWatchLink ->
(zf, {} blk -> at)
.
# pinfunc(wlink, foid, blk, at) | None. XXX foid -> ZBigFile?
#
# pinfunc is called after pin request is received from wcfs but before pin ack
...
...
@@ -870,9 +870,9 @@ def doCheckingPin(f, pinokByWLink, pinfunc=None):
ctx
,
cancel
=
with_timeout
()
wg
=
sync
.
WorkGroup
(
ctx
)
for
wlink
,
pinok
in
pinokByWLink
.
items
():
for
wlink
,
(
zf
,
pinok
)
in
pinokByWLink
.
items
():
def
_
(
ctx
,
wlink
):
pinv
=
wlink
.
_expectPin
(
ctx
,
zf
,
pinok
)
# XXX zf?
pinv
=
wlink
.
_expectPin
(
ctx
,
zf
,
pinok
)
tdelay
()
# increase probability to receive erroneous extra pins
for
p
in
pinv
:
if
pinfunc
is
not
None
:
...
...
@@ -1067,6 +1067,7 @@ def test_wcfs():
blk_data
=
f
.
blk
(
blk
)
assert
f
.
cached
()[
blk
]
==
0
ev
=
[]
def
_
(
ctx
):
assert
f
.
cached
()[
blk
]
==
0
ev
.
append
(
'read pre'
)
...
...
@@ -1089,13 +1090,12 @@ def test_wcfs():
b
=
_rx
ev
.
append
(
'read '
+
chr
(
b
))
doCheckingPin
(
_
,
{
wl
:
pinok
})
doCheckingPin
(
_
,
{
wl
:
(
zf
,
pinok
)
})
"""
# XXX dup wrte tWatchLink._watch
ev = []
def _(ctx):
pinv = wl._expectPin(ctx, zf, pinok)
ev.append('pin rx')
...
...
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