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
5ba816da
Commit
5ba816da
authored
Dec 22, 2019
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
X restore test_wcfs_watch_robust after
f05271b1
.
parent
30553e72
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
5 deletions
+12
-5
wcfs/internal/wcfs_watchlink.cpp
wcfs/internal/wcfs_watchlink.cpp
+1
-1
wcfs/wcfs.go
wcfs/wcfs.go
+1
-1
wcfs/wcfs_test.py
wcfs/wcfs_test.py
+10
-3
No files found.
wcfs/internal/wcfs_watchlink.cpp
View file @
5ba816da
...
...
@@ -85,7 +85,7 @@ error _WatchLink::closeWrite() {
// XXX vvv should be ~ shutdown(TX, wlink._f), however shutdown does
// not work for non-socket file descriptors. And even if we dup link
// fd, and close only one used for TX, peer's RX will still be blocked
// a
d
fds are referring to one file object which stays in opened
// a
s
fds are referring to one file object which stays in opened
// state. So just use ^^^ "bye" as "TX closed" message.
// wlink._wtx.close();
});
...
...
wcfs/wcfs.go
View file @
5ba816da
...
...
@@ -1647,7 +1647,7 @@ func (wlink *WatchLink) setupWatch(ctx context.Context, foid zodb.Oid, at zodb.T
continue
}
toPin
[
blk
],
_
=
f
.
LastBlkRev
(
ctx
,
blk
,
at
)
toPin
[
blk
],
_
=
f
.
LastBlkRev
(
ctx
,
blk
,
at
)
// XXX err
}
}
...
...
wcfs/wcfs_test.py
View file @
5ba816da
...
...
@@ -1235,9 +1235,16 @@ def test_wcfs_watch_robust():
wl
=
t
.
openwatch
()
wg
=
sync
.
WorkGroup
(
timeout
())
def
_
(
ctx
):
assert
wl
.
sendReq
(
ctx
,
b"watch %s @%s"
%
(
h
(
zf
.
_p_oid
),
h
(
at1
)))
==
\
"error setup watch f<%s> @%s: "
%
(
h
(
zf
.
_p_oid
),
h
(
at1
))
+
\
"pin #%d @%s: context canceled"
%
(
2
,
h
(
at1
))
# TODO clarify what wcfs should do if pin handler closes wlink TX:
# - reply error + close, or
# - just close
# t = when reviewing WatchLink.serve in wcfs.go
#assert wl.sendReq(ctx, b"watch %s @%s" % (h(zf._p_oid), h(at1))) == \
# "error setup watch f<%s> @%s: " % (h(zf._p_oid), h(at1)) + \
# "pin #%d @%s: context canceled" % (2, h(at1))
with
raises
(
RuntimeError
,
match
=
"unexpected EOF"
):
wl
.
sendReq
(
ctx
,
b"watch %s @%s"
%
(
h
(
zf
.
_p_oid
),
h
(
at1
)))
wg
.
go
(
_
)
def
_
(
ctx
):
req
=
wl
.
recvReq
(
ctx
)
...
...
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