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
68cad21b
Commit
68cad21b
authored
Jun 24, 2019
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
27d34296
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
5 deletions
+6
-5
wcfs/wcfs_test.py
wcfs/wcfs_test.py
+6
-5
No files found.
wcfs/wcfs_test.py
View file @
68cad21b
...
@@ -1270,20 +1270,21 @@ def test_wcfs_inv_watch_robust():
...
@@ -1270,20 +1270,21 @@ def test_wcfs_inv_watch_robust():
t
=
tDB
();
zf
=
t
.
zfile
t
=
tDB
();
zf
=
t
.
zfile
defer
(
t
.
close
)
defer
(
t
.
close
)
t
.
change
(
zf
,
{
2
:
'c1'
}
t
.
change
(
zf
,
{
2
:
'c1'
});
at1
=
t
.
commit
()
t
.
change
(
zf
,
{
2
:
'c2'
});
at2
=
t
.
commit
()
# closeTX/bye cancels blocked pin handlers
# closeTX/bye cancels blocked pin handlers
wl
=
t
.
openwatch
()
wl
=
t
.
openwatch
()
wg
=
sync
.
WorkGroup
(
timeout
())
wg
=
sync
.
WorkGroup
(
timeout
())
def
_
(
ctx
):
def
_
(
ctx
):
assert
wl
.
sendReq
(
ctx
,
b"watch %s @%s"
%
(
h
(
zf
.
_p_oid
),
h
(
at
2
)))
==
\
assert
wl
.
sendReq
(
ctx
,
b"watch %s @%s"
%
(
h
(
zf
.
_p_oid
),
h
(
at
1
)))
==
\
"error setup watch f<%s> @%s: pin #%d @%s: context canceled"
%
\
"error setup watch f<%s> @%s: pin #%d @%s: context canceled"
%
\
(
h
(
zf
.
_p_oid
),
h
(
at
2
),
2
,
h
(
at2
))
(
h
(
zf
.
_p_oid
),
h
(
at
1
),
2
,
h
(
at1
))
wg
.
go
(
_
)
wg
.
go
(
_
)
def
_
(
ctx
):
def
_
(
ctx
):
req
=
wl
.
recvReq
(
ctx
)
req
=
wl
.
recvReq
(
ctx
)
assert
req
is
not
None
assert
req
is
not
None
assert
req
.
msg
==
b"pin %s #%d @%s"
%
(
h
(
zf
.
_p_oid
),
2
,
h
(
at
2
))
assert
req
.
msg
==
b"pin %s #%d @%s"
%
(
h
(
zf
.
_p_oid
),
2
,
h
(
at
1
))
# don't reply to req - close instead
# don't reply to req - close instead
wl
.
_closeTX
()
wl
.
_closeTX
()
wg
.
go
(
_
)
wg
.
go
(
_
)
...
@@ -1292,7 +1293,7 @@ def test_wcfs_inv_watch_robust():
...
@@ -1292,7 +1293,7 @@ def test_wcfs_inv_watch_robust():
# NOTE if wcfs.go does not fully cleanup this canceled watch and leaves it
# NOTE if wcfs.go does not fully cleanup this canceled watch and leaves it
# in half-working state, it will break on further commit, as pin to the
# in half-working state, it will break on further commit, as pin to the
# watch won't be handled.
# watch won't be handled.
# TODO -> add explicit check for ^^^ if/when moved to separate test. XXX
t
.
change
(
zf
,
{
2
:
'c3'
});
at3
=
t
.
commit
()
# 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