diff --git a/wcfs/wcfs_test.py b/wcfs/wcfs_test.py index bba2e1f9f543ca12b76c48cd2c32dcaefbf96240..21e98323557fedb97c42ee1044d18748d2a05776 100644 --- a/wcfs/wcfs_test.py +++ b/wcfs/wcfs_test.py @@ -1337,11 +1337,19 @@ def test_wcfs_watch_setup(): t = tDB(); zf = t.zfile defer(t.close) + f = t.open(zf) + t.change(zf, {2:'c1'}); at1 = t.commit() + t.change(zf, {2:'c2', 3:'d2', 5:'f2'}); at2 = t.commit() + t.change(zf, {2:'c3', 5:'f3'}); at3 = t.commit() + + f.assertData(['','','c3','d2','','x']) + f.assertCache([1,1,1,1,1,0]) + # some watch setup/update requests with explicit pinok (also partly # verifies how tWatchLink.watch computes automatic pinok) wl = t.openwatch() # XXX check @at0 ? - wl.watch(zf, at1, {2: at1, 3: at0}) # -> at1 (new watch) XXX at0 -> ø (blk3 was hole)? + wl.watch(zf, at1, {2: at1, 3: t.at0}) # -> at1 (new watch) XXX at0 -> ø (blk3 was hole)? wl.watch(zf, at2, {2: at2, 3: None}) # at1 -> at2 wl.watch(zf, at3, {2: None}) # at2 -> at3 (current head) # XXX + .watch in presence !accessed & changed [blk]