Commit 083fbaa1 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent f39029a0
......@@ -306,7 +306,6 @@ class tDB:
return zfs
# tFile provides testing environment for one bigfile on wcfs.
#
# .blk() provides access to data of a block. .cached() gives state of which
......@@ -511,7 +510,7 @@ class tWatch:
# _send sends raw message via specified stream.
#
# multiple _send can be called in parallel - _send serializes writes.
# XXX +ctx
# XXX +ctx?
def _send(t, stream, msg):
assert '\n' not in msg
with t._txmu:
......@@ -665,6 +664,7 @@ def test_wcfs():
f.assertCache([1,1,0,1])
# f @head
f.assertCache([1,1,0,1])
f.assertData ([b'',b'',b'kitty',b'gamma'], mtime=t.head)
# f @at2
......@@ -677,17 +677,16 @@ def test_wcfs():
# >>> f close / open again -> cache must not be lost
# XXX bit flaky since OS can evict whole f cache under pressure
# XXX a bit flaky since OS can evict whole f cache under pressure
f.assertCache([1,1,1,1])
f.close()
# XXX os.sync?
f = t.open(zf)
assert f.cached() != [0,0,0,0]
# >>> XXX commit data to not yet accessed f part - nothing happens
# XXX invalidation protocol ...
# >>> invalidation protocol
print('\n\n inv. protocol \n\n')
bg = context.background()
......@@ -719,6 +718,8 @@ def test_wcfs():
# open watch, send watch request and check that we receive pins for
# in-cache blocks changed > at.
w = t.openwatch()
# defer(w.close) XXX close here, or checkSetupWatch -> tDB.topenwatch(zf, at) ?
ctx, cancel = context.with_cancel(bg)
wg = sync.WorkGroup(ctx)
def _(ctx):
......
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