diff --git a/pkg/count/counters_test.go b/pkg/count/counters_test.go index 10e0fcbb..207df28d 100644 --- a/pkg/count/counters_test.go +++ b/pkg/count/counters_test.go @@ -24,8 +24,6 @@ import ( "github.com/scylladb/gemini/pkg/count" ) -var rnd = rand.New(rand.NewSource(uint64(time.Now().Unix()))) - func TestSimpleCounters(t *testing.T) { t.Parallel() countersInfo := []count.Info{{ @@ -106,6 +104,7 @@ func TestTotalCounters(t *testing.T) { func scOperations(counters count.SimpleCounters, adds int) { cl := len(counters) + rnd := rand.New(rand.NewSource(uint64(time.Now().Unix()))) for c := 0; c < adds; c++ { counters[rnd.Intn(cl)].Inc() counters[rnd.Intn(cl)].Get() @@ -122,6 +121,7 @@ func getSimpleCounterSum(counters count.SimpleCounters) int { func totalCounterOperations(counters count.TotalCounters, adds int) { cl := len(counters) + rnd := rand.New(rand.NewSource(uint64(time.Now().Unix()))) for c := 0; c < adds; c++ { n := rnd.Intn(10) counters[rnd.Intn(cl)].Inc(n)