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
4283b91d
Commit
4283b91d
authored
Jun 06, 2019
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
d1fc5e8c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
2 deletions
+20
-2
wcfs/wcfs_test.py
wcfs/wcfs_test.py
+20
-2
No files found.
wcfs/wcfs_test.py
View file @
4283b91d
...
...
@@ -113,6 +113,10 @@ def timeout(parent=context.background()): # -> ctx
ctx
,
_
=
with_timeout
()
return
ctx
# XXX
def
tdelay
():
time
.
sleep
(
10
*
time
.
millisecond
)
# XXX -> 1ms ?
# ---- test join/autostart ----
...
...
@@ -780,9 +784,10 @@ def _watch(twlink, zf, at, pinok, replyok):
def
_
(
ctx
):
pinv
=
twlink
.
_expectPin
(
ctx
,
zf
,
pinok
)
tdelay
()
# increase probability to receive erroneous extra pins
for
p
in
pinv
:
p
.
reply
(
b"ack"
)
# XXX -> return to caller?
# check that we don't get extra pins before
"ok"
reply to "watch"
# check that we don't get extra pins before reply to "watch"
try
:
req
=
twlink
.
recvReq
(
ctx
)
except
Exception
as
e
:
...
...
@@ -961,7 +966,20 @@ def test_wcfs():
at4
=
t
.
commit
()
f
.
assertCache
([
1
,
1
,
0
,
1
,
0
,
0
])
# FIXME a must be invalidated - see ^^^
f
.
assertBlk
(
2
,
'4c'
)
->
pin
2
ev
=
[]
def
_
(
ctx
):
ev
.
append
(
'pin rx'
)
tdelay
()
# XXX + ev.sleep ?
ev
.
append
(
'pin ack'
)
pin
.
ack
()
ev
.
append
(
'read pre'
)
blk
=
f
.
blk
(
2
)
blk
[
0
]
# read access -> XXX without GIL
ev
.
append
(
'read post'
)
f
.
assertBlk
(
2
,
'4c'
)
assert
ev
==
[
'read pre'
,
'pin rx'
,
'pin ack'
,
'read post'
]
# XXX commit after current file size -> watch
...
...
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