Commit 77783055 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent b5e39d4a
...@@ -24,6 +24,7 @@ package main ...@@ -24,6 +24,7 @@ package main
import ( import (
"bufio" "bufio"
"context" "context"
"flag"
"fmt" "fmt"
"io" "io"
"io/ioutil" "io/ioutil"
...@@ -662,9 +663,11 @@ func xverifyΔBTail_Update(t *testing.T, subj string, db *zodb.DB, treeRoot zodb ...@@ -662,9 +663,11 @@ func xverifyΔBTail_Update(t *testing.T, subj string, db *zodb.DB, treeRoot zodb
keys.Add(allKeyv[idx]) keys.Add(allKeyv[idx])
} }
t.Run(fmt.Sprintf(" track=%s", keys), func(t *testing.T) { // XXX allocates and keeps too much memory in -verylong
// XXX also not so useful as above "Update/t1->t2" ?
// t.Run(fmt.Sprintf(" track=%s", keys), func(t *testing.T) {
xverifyΔBTail_Update1(t, subj, db, treeRoot, t1.at,t2.at, t1.xkv,t2.xkv, t2.δZ, t2.δxkv, keys, kadj12) xverifyΔBTail_Update1(t, subj, db, treeRoot, t1.at,t2.at, t1.xkv,t2.xkv, t2.δZ, t2.δxkv, keys, kadj12)
}) // })
} }
}) })
} }
...@@ -1538,6 +1541,8 @@ func TestΔBTail(t *testing.T) { ...@@ -1538,6 +1541,8 @@ func TestΔBTail(t *testing.T) {
} }
var verylongFlag = flag.Bool("verylong", false, `switch tests to run in "very long" mode`)
// TestΔBTailAllStructs verifies ΔBtail on tree topologies generated by AllStructs. // TestΔBTailAllStructs verifies ΔBtail on tree topologies generated by AllStructs.
func TestΔBTailAllStructs(t *testing.T) { func TestΔBTailAllStructs(t *testing.T) {
X := exc.Raiseif X := exc.Raiseif
...@@ -1554,10 +1559,22 @@ func TestΔBTailAllStructs(t *testing.T) { ...@@ -1554,10 +1559,22 @@ func TestΔBTailAllStructs(t *testing.T) {
// imports; https://github.com/pypa/setuptools/issues/510) // imports; https://github.com/pypa/setuptools/issues/510)
// -> we spawn `treegen allstructs` once and use request/response approach. // -> we spawn `treegen allstructs` once and use request/response approach.
maxdepth := 2 // XXX -> 3? N := func(short, medium, long int) int {
maxsplit := 1 // XXX -> 2? // -short
n := 10 // XXX -> more? if testing.Short() {
nkeys := 5; if testing.Short() { nkeys -= 2 } return short
}
// -verylong
if *verylongFlag {
return long
}
// default
return medium
}
maxdepth := N(2, 3, 4)
maxsplit := N(1, 2, 2)
n := N(10,10,100)
nkeys := N(3, 5, 10)
// server to generate AllStructs(kv1, kv2, ...) // server to generate AllStructs(kv1, kv2, ...)
sg, err := StartAllStructsSrv(); X(err) sg, err := StartAllStructsSrv(); X(err)
......
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