Skip to content

Commit

Permalink
Tests: TestRandOption fail (#357)
Browse files Browse the repository at this point in the history
* fix: delay after the call eliminates the possibility of creating an enmime.Builder() with the same random seed
  • Loading branch information
pgradoboev authored Dec 9, 2024
1 parent c2226a2 commit 1d9fc9c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions randoption_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ func buildEmail(t *testing.T, mode ReproducibilityMode) string {
b = enmime.Builder()
case TimestampSource:
b = enmime.Builder().RandSeed(time.Now().UTC().UnixNano())
time.Sleep(time.Microsecond)
default:
panic(fmt.Errorf("illegal mode: %d", mode))
}
Expand Down

0 comments on commit 1d9fc9c

Please sign in to comment.