Commit 4adb2a06 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 14b40012
......@@ -487,7 +487,7 @@ class tFile:
# It also checks that file watches are properly notified on data access -
# - see "7.2) for all registered client@at watchers ..."
#
# pinokByWLink: {} tWatchLink -> (zf, {} blk -> at).
# pinokByWLink: {} tWatchLink -> {} blk -> at.
# pinokByWLink can be None - in that case it is computed automatically.
def assertBlk(t, blk, dataok, pinokByWLink=None):
if not isinstance(dataok, bytes):
......@@ -515,12 +515,16 @@ class tFile:
# XXX and watch not already pinned on the watch
pinok = {blk: t.tdb._blkRev(t.zf, blk, wat)}
shouldPin = True
wpin[wlink] = (t.zf, pinok)
wpin[wlink] = pinok
if pinokByWLink is not None:
assert wpin == pinokByWLink, "computed vs explicit pinokByWLink"
pinokByWLink = wpin
# doCheckingPin expect every wlink entry to also contain zf
for wlink, pinok in pinokByWLink.items():
pinokByWLink[wlink] = (t.zf, pinok)
blkview = t.blk(blk)
assert t.cached()[blk] == cached
......
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