Commit b1a9a71a authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 77783055
......@@ -5,7 +5,6 @@ export GOTRACEBACK=crash
ulimit -c unlimited
go test -c
#export DBTail_SEED=1602769537289632682
cwd=$(pwd)
......
......@@ -34,7 +34,6 @@ import (
"reflect"
"regexp"
"sort"
"strconv"
"strings"
"testing"
"time"
......@@ -1541,7 +1540,10 @@ func TestΔBTail(t *testing.T) {
}
var verylongFlag = flag.Bool("verylong", false, `switch tests to run in "very long" mode`)
var (
verylongFlag = flag.Bool("verylong", false, `switch tests to run in "very long" mode`)
randseedFlag = flag.Int64("randseed", -1, `seed for random number generator`)
)
// TestΔBTailAllStructs verifies ΔBtail on tree topologies generated by AllStructs.
func TestΔBTailAllStructs(t *testing.T) {
......@@ -1583,14 +1585,9 @@ func TestΔBTailAllStructs(t *testing.T) {
}()
// random seed
seed := time.Now().UnixNano()
seeds := os.Getenv("DBTail_SEED")
if seeds != "" {
var err error
seed, err = strconv.ParseInt(seeds, 10, 64)
if err != nil {
t.Fatalf("invalid $DBTail_SEED=%s: %s", seeds, err)
}
seed := *randseedFlag
if seed == -1 {
seed = time.Now().UnixNano()
}
rng := rand.New(rand.NewSource(seed))
t.Logf("# maxdepth=%d maxsplit=%d nkeys=%d n=%d seed=%d", maxdepth, maxsplit, nkeys, n, seed)
......
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