Commit b1a9a71a authored by Kirill Smelkov's avatar Kirill Smelkov

.

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