Commit 5d32b4b0 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 54c1e3b6
......@@ -161,7 +161,7 @@ class ZCtx(object):
valdict = zctx.root.get('treegen/values', None)
if valdict is None:
valdict = zctx.root['treegen/values'] = PersistentMapping()
valv = b'abcdefgh'
valv = b'abcdefghij'
for v in valv:
zblk = valdict.get(v, None)
if zblk is not None and zblk.loadblkdata() == v:
......
......@@ -475,7 +475,7 @@ func xverifyΔBTail(t *testing.T, subj string, db *zodb.DB, treeRoot zodb.Oid, a
d12 := kvdiff(xkvFlatten(xkv1), xkvFlatten(xkv2))
// verify transition at1->at2 for all initial states of tracked {keys} from kv1 + kv2 + ∞
allKeys := SetKey{}
allKeys := SetKey{}; allKeys.Add(kInf) // ∞ simulating ZBigFile.Size() query
maxk1 := -kInf; maxk2 := -kInf
for _, b := range xkv1 { for k := range b.kv {
allKeys.Add(k)
......@@ -500,22 +500,20 @@ func xverifyΔBTail(t *testing.T, subj string, db *zodb.DB, treeRoot zodb.Oid, a
for k := range allKeys {
ka := SetKey{}
/* XXX wrong
b := xkv1.Get(k)
for k_ := range allKeys {
if b.lo <= k_ && k_ < b.hi {
ka.Add(k_)
}
k1 := k
k2 := k
if k == kInf {
k1 = maxk1
k2 = maxk2
}
*/
for k_ := range xkv1.Get(k).kv {
for k_ := range xkv1.Get(k1).kv {
ka.Add(k_)
for k__ := range xkv2.Get(k_).kv {
ka.Add(k__)
}
}
for k_ := range xkv2.Get(k).kv {
for k_ := range xkv2.Get(k2).kv {
ka.Add(k_)
for k__ := range xkv1.Get(k_).kv {
ka.Add(k__)
......@@ -525,12 +523,14 @@ func xverifyΔBTail(t *testing.T, subj string, db *zodb.DB, treeRoot zodb.Oid, a
kadj[k] = ka
}
/*
// k=∞ simulating ZBigFile.Size() query
allKeys.Add(kInf)
allKeyv = append(allKeyv, kInf)
kadj[kInf] = SetKey{}
for k_ := range xkv1.Get(maxk1).kv { kadj[kInf].Add(k_) }
for k_ := range xkv2.Get(maxk2).kv { kadj[kInf].Add(k_) }
*/
if kadjOK != nil && !reflect.DeepEqual(kadj, kadjOK) {
panic(fmt.Sprintf("BUG: %s: computed kadj is wrong:\nkadjOK: %v\nkadj : %v\n", subj, kadjOK, kadj))
......
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