Commit 45fde82f authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 5e263705
...@@ -159,6 +159,10 @@ class tDB: ...@@ -159,6 +159,10 @@ class tDB:
raise RuntimeError("wcsync #%d: wczhead (%s) != zhead (%s)" % (i, wchead, t._headv[i])) raise RuntimeError("wcsync #%d: wczhead (%s) != zhead (%s)" % (i, wchead, t._headv[i]))
t._wc_zheadv.append(wchead) t._wc_zheadv.append(wchead)
# head/at = last txn of whole db
assert t.read("head/at") == h(t.head)
# path returns path for object on wcfs. # path returns path for object on wcfs.
# - str: wcfs root + obj; # - str: wcfs root + obj;
# - Persistent: wcfs root + (head|@<at>)/bigfile/obj # - Persistent: wcfs root + (head|@<at>)/bigfile/obj
...@@ -209,9 +213,6 @@ def test_wcfs(): ...@@ -209,9 +213,6 @@ def test_wcfs():
assert _.st_size == 0 assert _.st_size == 0
assert _.st_mtime == tidtime(tid1) assert _.st_mtime == tidtime(tid1)
# head/at = last txn of whole db
assert t.read("head/at") == h(t.head)
# commit data to f and make sure we can see it on wcfs # commit data to f and make sure we can see it on wcfs
# use !wcfs mode so that we prepare data independently of wcfs code paths. # use !wcfs mode so that we prepare data independently of wcfs code paths.
...@@ -228,10 +229,9 @@ def test_wcfs(): ...@@ -228,10 +229,9 @@ def test_wcfs():
# we wrote "hello world" after hole'th block, but size is always mutiple of blksize. # we wrote "hello world" after hole'th block, but size is always mutiple of blksize.
fsize = (hole + 1)*blksize fsize = (hole + 1)*blksize
st = t.stat(f) _ = t.stat(f)
assert st.st_size == fsize assert _.st_size == fsize
assert st.st_mtime == tidtime(t.head) assert _.st_mtime == tidtime(t.head)
assert t.read("head/at") == h(t.head)
data = t.read(f) data = t.read(f)
assert len(data) == fsize assert len(data) == fsize
...@@ -259,10 +259,9 @@ def test_wcfs(): ...@@ -259,10 +259,9 @@ def test_wcfs():
fsize1 = fsize fsize1 = fsize
fsize = fsize1 + blksize # we added one more block fsize = fsize1 + blksize # we added one more block
st = t.stat(f) _ = t.stat(f)
assert st.st_size == fsize assert _.st_size == fsize
assert st.st_mtime == tidtime(t.head) assert _.st_mtime == tidtime(t.head)
assert t.read("head/at") == h(t.head)
data = t.read(f) data = t.read(f)
assert len(data) == fsize assert len(data) == fsize
......
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