Commit d8939f4d authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 05974da5
......@@ -533,6 +533,8 @@ func TestΔBTail(t *testing.T) {
// Verify ΔBtail on tree topologies generated by AllStructs.
func TestΔBTreeAllStructs(t *testing.T) {
X := exc.Raiseif
// considerations:
// - depth↑ better for testing (more tricky topologies)
// - nsplit↑ not so better for testing (leave s=1, max s=2)
......@@ -550,6 +552,12 @@ func TestΔBTreeAllStructs(t *testing.T) {
maxsplit := 1 // XXX -> 2?
n := 10 // XXX -> more?
// server to generate AllStructs(kv1, kv2, ...)
sg, err := StartAllStructsSrv(); X(err)
defer func() {
err := sg.Close(); X(err)
}()
// random seed
seed := time.Now().UnixNano()
seeds := os.Getenv("DBTail_SEED")
......@@ -597,11 +605,16 @@ func TestΔBTreeAllStructs(t *testing.T) {
for k := range keys1 { kv1[Key(k)] = randv() }
for k := range keys2 { kv2[Key(k)] = randv() }
// given (kv1, kv2) test on automatically generated (tree1 -> tree2)
//reqSeed = rng.Int63()
fmt.Printf("%s -> %s\n", kvtxt(kv1), kvtxt(kv2))
// given (kv1, kv2) - test on automatically generated (tree1 -> tree2)
reqSeed := rng.Int63()
treev, err := sg.AllStructs(kv1, kv2, maxdepth, maxsplit, n, reqSeed)
if err != nil {
t.Fatal(err)
}
//testq <- ...
for _, tree := range treev {
testq <- tree
}
}
}()
......
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