Commit da7b19e3 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 2457af00
...@@ -298,6 +298,9 @@ def test_restructure(): ...@@ -298,6 +298,9 @@ def test_restructure():
ztree[k] = zblkv[k] ztree[k] = zblkv[k]
return ztree return ztree
# XXX check all keys by [] access
# XXX check all keys via iterating (this verifies firstbucket and B->next pointers)
# R restructures ztree according to new topology. # R restructures ztree according to new topology.
def R(ztree, newtopo): def R(ztree, newtopo):
newStructure = xbtree.TopoDecode(newtopo) newStructure = xbtree.TopoDecode(newtopo)
...@@ -323,6 +326,7 @@ def test_restructure(): ...@@ -323,6 +326,7 @@ def test_restructure():
assert isinstance(kids[0], IOTree) assert isinstance(kids[0], IOTree)
kind, keys, kids = bcheck.crack_btree(kids[0]) kind, keys, kids = bcheck.crack_btree(kids[0])
assert kind, keys == BTREE_NORMAL, [] # XXX or should it be BTREE_ONE here? assert kind, keys == BTREE_NORMAL, [] # XXX or should it be BTREE_ONE here?
# XXX no: we need to wire bucket->next properly
assert len(kids) == 0 assert len(kids) == 0
assert isinstance(kids[0], IOBucket) assert isinstance(kids[0], IOBucket)
assert kids[0].keys() == [] assert kids[0].keys() == []
......
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