Skip to content

Commit

Permalink
reset timeNow and rand
Browse files Browse the repository at this point in the history
  • Loading branch information
it512 committed Jan 13, 2024
1 parent 74c320f commit 6f04689
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions uuid_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -910,7 +910,12 @@ func TestVersion7MonotonicityStrict(t *testing.T) {
timeNow = func() time.Time {
return time.Date(2008, 8, 8, 8, 8, 8, 8, time.UTC)
}
defer func() {
timeNow = time.Now
}()

SetRand(fakeRand{})
defer SetRand(nil)

length := 100000 // > 3906
u1 := Must(NewV7()).String()
Expand Down

0 comments on commit 6f04689

Please # to comment.