Commit 85acf6d6 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 05952f40
......@@ -1226,24 +1226,36 @@ def test_wcfs():
at4 = t.commit()
f.assertCache([1,1,0,1,0,0]) # FIXME a must be invalidated - see δbtree ^^^
t.dump_history()
f.assertBlk(0, '', {wl1: {}, wl2: {}}) # XXX + {0, at3} after δbtree works
f.assertBlk(1, '', {wl1: {}, wl2: {}})
f.assertBlk(2, '4c', {wl1: {2: at3}, wl2: {}})
f.assertBlk(3, '2d', {wl1: {}, wl2: {}})
# blk4 is hole @head - the same as at earlier db view - not pinned
# XXX or do not allow hole past .size ?
f.assertBlk(4, '', {wl1: {}, wl2: {}})
f.assertBlk(5, '4f', {wl1: {5: at0}, wl2: {5: at0}}) # XXX at0 -> ø XXX also triggers access to #4 ?
# XXX commit again, but block is already pinned - not notified
# commit again:
# - block is already pinned (#2) -> not notified
# - wlink closed -> watch no longer notified this
f.assertCache([1,1,1,1,1,1])
t.change(zf, {2: '5c', 3: '5d'})
at5 = t.commit()
f.assertCache([1,1,0,0,1,1])
t.dump_history()
wl2.close()
f.assertBlk(0, '', {wl1: {}, wl2: {}}) # no change
f.assertBlk(1, '', {wl1: {}, wl2: {}})
f.assertBlk(2, '5c', {wl1: {}, wl2: {}}) # blk2 already pinned on wl1 XXX wl2 = ?
f.assertBlk(3, '5d', {wl1: {3: at2}, wl2: {}}) # wl2 not notified, because it was closed
# XXX wlink close -> watch no longer notified
# XXX watch with at="-" -> watch no longer notified this
# XXX 2 opened watchs for 1 file at the same time
# XXX watch with at="-" -> watch no longer notified
wl1.close()
wl2.close() # XXX temp
# XXX commit after current file size -> watch
......
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