Commit 0917380e authored by Kirill Smelkov's avatar Kirill Smelkov

X wcfs: assert that keycov only grow

Currently fails with e.g.:

(neo) (z-dev) (g.env) kirr@deca:~/src/neo/src/lab.nexedi.com/nexedi/wendelin.core/wcfs/internal/xbtree$ go test -short -v -failfast -run 'TestΔBTail$/Update/T3/B1:a-B8:c→T7/B1:a-B8:c'
=== RUN   TestΔBTail
2021/06/23 14:08:45 zodb: FIXME: open /tmp/δBTail926507346/1.fs: raw cache is not ready for invalidations -> NoCache forced
=== RUN   TestΔBTail/Update/T3/B1:a-B8:c→T7/B1:a-B8:c
    δbtail_test.go:812: BUG: tkeyCov1 ⊄ tkeyCov2:
                tkeyCov1: {[3,∞)}
                tkeyCov2: {[7,∞)}
                tkeyCov1 \ tkeyCov2: {[3,7)}
    δbtail_test.go:708: T3/B1:a-B8:c -> T7/B1:a-B8:c  ; tracked={8} :

        d12:  map[]
        δTok: map[]
        δT:   map[]

        δZ:               {000000000000000c}
        Tracked^δZ:       {}
        kadj[Tracked^δZ]: {}
        kadj: map[1:{1 8 9223372036854775807} 8:{1 8 9223372036854775807} 9223372036854775807:{1 8 9223372036854775807}]

--- FAIL: TestΔBTail (0.84s)
    --- FAIL: TestΔBTail/Update/T3/B1:a-B8:c→T7/B1:a-B8:c (0.00s)
parent 595afd6a
......@@ -806,6 +806,12 @@ func xverifyΔBTail_Update1(t *testing.T, subj string, db *zodb.DB, treeRoot zod
δbtail_ := δbtail.Clone()
δB1, err := δbtail_._Update1(δZ); X(err) // XXX don't compute treediff twice
// assert tkeyCov1 ⊂ tkeyCov2
x := tkeyCov1.Difference(tkeyCov2)
if !x.Empty() {
t.Errorf("BUG: tkeyCov1 ⊄ tkeyCov2:\n\ttkeyCov1: %s\n\ttkeyCov2: %s\n\ttkeyCov1 \\ tkeyCov2: %s", tkeyCov1, tkeyCov2, x)
}
// assert δtkeycov == δ(tkeyCov1, tkeyCov2)
δtkeycovOK := tkeyCov2.Difference(tkeyCov1)
//fmt.Printf("tkeyCov1: %s\n", tkeyCov1)
......
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