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
fac36e13
Commit
fac36e13
authored
May 03, 2019
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
723388c4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
6 deletions
+18
-6
wcfs/wcfs_test.py
wcfs/wcfs_test.py
+18
-6
No files found.
wcfs/wcfs_test.py
View file @
fac36e13
...
...
@@ -544,6 +544,7 @@ class tWatch:
req
=
t
.
recvReq
(
ctx
)
except
Exception
as
e
:
raise
RuntimeError
(
"%s
\
n
not all pin missages received - pending:
\
n
%s"
%
(
e
,
expected
))
assert
False
# XXX temp
assert
req
is
not
None
# channel not closed
assert
req
.
msg
in
expected
expected
.
remove
(
req
.
msg
)
...
...
@@ -658,6 +659,7 @@ def test_wcfs():
print
(
'
\
n
\
n
inv. protocol
\
n
\
n
'
)
w
=
t
.
openwatch
()
"""
ctx = context.background() # XXX stub
wg = sync.WorkGroup(ctx)
...
...
@@ -670,6 +672,7 @@ def test_wcfs():
assert w.sendReq(ctx, b"watch %s @%s" % (h(zf._p_oid), h(at1))) == "ok"
wg.go(_)
wg.wait()
"""
print
(
'
\
n
CCC
\
n
'
)
bg
=
context
.
background
()
...
...
@@ -677,7 +680,7 @@ def test_wcfs():
# checkSetupWatch verifies setting up new watch for zf@at.
def
checkSetupWatch
(
zf
,
at
):
print
(
'C: check setup watch f
%s
%s'
%
(
h
(
zf
.
_p_oid
),
t
.
hat
(
at
)))
print
(
'C: check setup watch f
<%s>
%s'
%
(
h
(
zf
.
_p_oid
),
t
.
hat
(
at
)))
# all changes to zf
vdf
=
[
_
.
byfile
[
zf
]
for
_
in
t
.
dFtail
if
zf
in
_
.
byfile
]
...
...
@@ -710,12 +713,21 @@ def test_wcfs():
for
p
in
pinv
:
p
.
reply
(
b"ack"
)
wg
.
go
(
_
)
assert
w
.
sendReq
(
ctx
,
b"watch %s @%s"
%
(
h
(
zf
.
_p_oid
),
h
(
at
)))
==
"ok"
# cancel expectPin waiting upon receiving "ok" from wcfs
# -> error that missed pins were not received.
cancel
()
wg
.
wait
()
def
_
(
ctx
):
assert
w
.
sendReq
(
ctx
,
b"watch %s @%s"
%
(
h
(
zf
.
_p_oid
),
h
(
at
)))
==
"ok"
# cancel expectPin waiting upon receiving "ok" from wcfs
# -> error that missed pins were not received.
cancel
()
wg
.
go
(
_
)
try
:
wg
.
wait
()
except
:
import
traceback
traceback
.
print_exc
()
raise
# XXX for zf: check all revisions, even if zf was not changed in rev
for
dF
in
t
.
dFtail
:
for
zf
in
dF
.
byfile
:
checkSetupWatch
(
zf
,
dF
.
rev
)
...
...
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