Commit 66167e25 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 1ca463d4
......@@ -39,6 +39,8 @@ import (
"lab.nexedi.com/kirr/go123/xerr"
"lab.nexedi.com/kirr/neo/go/transaction"
"lab.nexedi.com/kirr/neo/go/zodb"
"github.com/stretchr/testify/require"
)
// TreeGen represents connection to running `treegen trees` server.
......@@ -220,6 +222,7 @@ func xverifyΔBTail(t *testing.T, db *zodb.DB, treeRoot zodb.Oid, at1, at2 zodb.
// tracked state defined by initialTrackedKeys.
func xverifyΔBTail1(t *testing.T, db *zodb.DB, treeRoot zodb.Oid, at1,at2 zodb.Tid, kv1,kv2 map[Key]string, δZ *zodb.EventCommit, initialTrackedKeys []Key) {
X := exc.Raiseif
assert := require.New(t)
fmt.Println("verify1", initialTrackedKeys)
txn, ctx := transaction.New(context.Background())
......@@ -243,10 +246,16 @@ func xverifyΔBTail1(t *testing.T, db *zodb.DB, treeRoot zodb.Oid, at1,at2 zodb.
// δbtail <- δZ
δB := δbtail.Update(δZ)
assert.Equal(δB.Rev, δZ.Tid)
d12 := kvdiff(kv1, kv2)
fmt.Println("d12:", d12)
if len(d12) == 0 {
assert.Equal(len(δB.ByRoot), 0)
return
}
_ = δB
//assert δB.Rev == δZ.Tid
//assert len(δB.ByRoot) == 1
assert.Equal(len(δB.ByRoot), 1)
// XXX assert δB.keys == treeRoot
// δT = δB[treeRoot]
......
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