Distributed Concurrent Editor

main_test.go at [f83c1422bc]
Login

File document/main_test.go artifact e9d36c04fa part of check-in f83c1422bc


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
package document_test

import (
	"flag"
	"os"
	"testing"
	"time"
)

var (
	seed int64
	soak uint
)

func TestMain(m *testing.M) {
	flag.Int64Var(&seed, "seed", 0, "Set seed for Random number generator. If 0, then time.Now().UnixNano() is used")
	flag.UintVar(&soak, "soak", 0, "Number of events soak tests should perform. If 0, no soak tests are run")
	flag.Parse()

	if seed == 0 {
		seed = time.Now().UnixNano()
	}

	os.Exit(m.Run())
}