Commit 3b7f4537 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent fd8b85ac
......@@ -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.Add(kInf) // inf, simulating ZBigFile.Size() query
allKeys := SetKey{}
maxk1 := -kInf; maxk2 := -kInf
for _, b := range xkv1 { for k := range b.kv {
allKeys.Add(k)
......@@ -500,17 +500,19 @@ func xverifyΔBTail(t *testing.T, subj string, db *zodb.DB, treeRoot zodb.Oid, a
for k := range allKeys {
ka := SetKey{}
if k == kInf {
for k_ := range xkv1.Get(maxk1).kv { ka.Add(k_) }
for k_ := range xkv2.Get(maxk2).kv { ka.Add(k_) }
} else {
for k_ := range xkv1.Get(k).kv { ka.Add(k_) }
for k_ := range xkv2.Get(k).kv { ka.Add(k_) }
}
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))
}
......@@ -657,8 +659,8 @@ func xverifyΔBTail1(t *testing.T, subj string, db *zodb.DB, treeRoot zodb.Oid,
emsg += fmt.Sprintf("kadj[Tracked]: %v\nkadj: %v\n\n", kadjTracked, kadj)
emsg += strings.Join(badv, "\n")
emsg += "\n"
//t.Error(emsg)
t.Fatal(emsg)
t.Error(emsg)
//t.Fatal(emsg)
}
}
......
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