From 7def2d8ea7e2d71a49057e362ff1f2771425b3e0 Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Mon, 2 Nov 2020 12:55:34 +0100 Subject: [PATCH] Use a non-constant seed --- internal/repository/repack_test.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/internal/repository/repack_test.go b/internal/repository/repack_test.go index 526fa98ea..87470d815 100644 --- a/internal/repository/repack_test.go +++ b/internal/repository/repack_test.go @@ -4,6 +4,7 @@ import ( "context" "math/rand" "testing" + "time" "github.com/restic/restic/internal/index" "github.com/restic/restic/internal/repository" @@ -195,7 +196,7 @@ func TestRepack(t *testing.T) { repo, cleanup := repository.TestRepository(t) defer cleanup() - seed := rand.Int63() + seed := time.Now().UnixNano() rand.Seed(seed) t.Logf("rand seed is %v", seed) @@ -262,7 +263,7 @@ func TestRepackWrongBlob(t *testing.T) { repo, cleanup := repository.TestRepository(t) defer cleanup() - seed := rand.Int63() + seed := time.Now().UnixNano() rand.Seed(seed) t.Logf("rand seed is %v", seed)