Commit f34f301b authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 77b87664
......@@ -529,13 +529,13 @@ func xverifyΔBTail(t *testing.T, subj string, db *zodb.DB, treeRoot zodb.Oid, a
keys.Add(allKeyv[idx])
}
xverifyΔBTail1(t, subj, db, treeRoot, at1,at2, d12, maxKey, δZ, keys)
xverifyΔBTail1(t, subj, db, treeRoot, at1,at2, d12, maxKey, δZ, keys, kadj)
}
}
// xverifyΔBTail1 verifies how ΔBTail handles ZODB update at1->at2 from initial
// tracked state defined by initialTrackedKeys.
func xverifyΔBTail1(t *testing.T, subj string, db *zodb.DB, treeRoot zodb.Oid, at1,at2 zodb.Tid, d12 map[Key]string, maxKey Key, δZ *zodb.EventCommit, initialTrackedKeys SetKey) {
func xverifyΔBTail1(t *testing.T, subj string, db *zodb.DB, treeRoot zodb.Oid, at1,at2 zodb.Tid, d12 map[Key]string, maxKey Key, δZ *zodb.EventCommit, initialTrackedKeys SetKey, kadj map[Key]SetKey) {
X := exc.Raiseif
assert := require.New(t)
......@@ -605,6 +605,8 @@ func xverifyΔBTail1(t *testing.T, subj string, db *zodb.DB, treeRoot zodb.Oid,
// - outside tracked set -> may be present in δT
// - maxkey -> must be present in δT if trackingMaxKey
// XXX use kadj - check exactly whether k is present in δT or not present
// δT is subset of d12
for k := range δT {
_, ind12 := d12[k]
......@@ -721,7 +723,6 @@ func TestΔBTail(t *testing.T) {
for _, k := range keyv { ks.Add(k) }
return ks
}
_ = K
// oo is shorthand for kInf
const oo = kInf
// A is shorthand for map[Key]SetKey
......@@ -773,12 +774,22 @@ _ = K
// bucket split; +3 in new bucket
"T/B1:a,2:b",
"T2/B1:a-B2:b,3:c",
Δ("T2/B1:a-B2:b,3:c",
A{1: K(1,2), // no 3
2: K(1,2,3),
3: K(1,2,3),
oo: K(2,3)}), // no 1 XXX correct?
// bucket split; +3 in new bucket; +4 +5 in another new bucket
// which remain not tracked (XXX unless TrackMaxKey TODO verify)
// which remain not tracked if 4 and 5 were not previously accessed.
"T/B1:a,2:b",
"T2,4/B1:a-B2:b,3:c-B4:d,5:e",
Δ("T2,4/B1:a-B2:b,3:c-B4:d,5:e",
A{1: K(1,2),
2: K(1,2,3),
3: K(1,2,3),
4: K(1,2,4,5),
5: K(1,2,4,5),
oo: K(2,4,5)}), // XXX correct?
// depth=2; bucket split; +3 in new bucket; left T remain
// _unchanged_ even though B under it is modified; right arm is
......
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