Commit c49c7b5c authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 8df86e84
......@@ -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
}
......
......@@ -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('\nBBB\n')
done.recv()
print('\nCCC\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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment