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
c49c7b5c
Commit
c49c7b5c
authored
Apr 23, 2019
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
8df86e84
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
9 deletions
+3
-9
wcfs/wcfs.go
wcfs/wcfs.go
+1
-6
wcfs/wcfs_test.py
wcfs/wcfs_test.py
+2
-3
No files found.
wcfs/wcfs.go
View file @
c49c7b5c
...
...
@@ -1409,7 +1409,7 @@ func (wlink *WatchLink) setupWatch(ctx context.Context, foid zodb.Oid, at zodb.T
for
blk
,
rev
:=
range
toPin
{
blk
:=
blk
rev
:=
rev
fmt
.
Printf
(
"S: watch: -> pin #%d @%s
\n
"
,
blk
,
rev
)
//
fmt.Printf("S: watch: -> pin #%d @%s\n", blk, rev)
wg
.
Go
(
func
()
error
{
return
w
.
pin
(
ctx
,
blk
,
rev
)
})
...
...
@@ -1546,22 +1546,17 @@ func (wlink *WatchLink) handleWatch(ctx context.Context, stream uint64, msg stri
return
err
}
fmt
.
Printf
(
"S: watch: AAA
\n
"
)
err
=
wlink
.
setupWatch
(
ctx
,
foid
,
at
)
if
err
!=
nil
{
fmt
.
Printf
(
"S: watch: QQQ: %s
\n
"
,
err
)
return
err
}
fmt
.
Printf
(
"S: watch: BBB
\n
"
)
err
=
wlink
.
send
(
ctx
,
stream
,
"ok"
)
if
err
!=
nil
{
return
err
}
fmt
.
Printf
(
"S: watch: CCC
\n
"
)
return
nil
}
...
...
wcfs/wcfs_test.py
View file @
c49c7b5c
...
...
@@ -620,20 +620,19 @@ def test_wcfs():
@
func
def
_
():
defer
(
done
.
close
)
print
(
'C: aaa'
)
pinv
=
w
.
expectPin
([(
zf
,
2
,
at1
),
(
zf
,
3
,
at0
)])
#pinv = w.expectPin({zf: [(2, at1), (3, at0)]}) XXX <- this way better? (sugar)
#print('C: bbb')
#print('C: ccc', pinv)
for
p
in
pinv
:
p
.
reply
(
b"ack"
)
print
(
'C: eee'
)
go
(
_
)
assert
w
.
sendReq
(
b"watch %s @%s"
%
(
h
(
zf
.
_p_oid
),
h
(
at1
)))
==
"ok"
print
(
'
\
n
BBB
\
n
'
)
done
.
recv
()
print
(
'
\
n
CCC
\
n
'
)
return
# XXX test watch with all at variants
# XXX both from scratch and going e.g. at1 -> at2 -> at3
# XXX going not only up, but also down at1 <- at2 <- at3
...
...
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