mirror of
https://github.com/wneessen/go-mail.git
synced 2024-12-22 10:40:39 +01:00
Increase test iterations for SetMessageID randomness check
Updated the TestMsg_SetMessageIDRandomness test to run 50,000 iterations instead of 100, ensuring a more robust evaluation of the Msg.SetMessageID method's randomness. Additionally, streamlined the retrieval of Message ID using GetMessageID.
This commit is contained in:
parent
19330fc108
commit
f5d4cdafea
1 changed files with 3 additions and 5 deletions
|
@ -786,13 +786,11 @@ func TestMsg_SetMessageIDWithValue(t *testing.T) {
|
|||
// TestMsg_SetMessageIDRandomness tests the randomness of Msg.SetMessageID methods
|
||||
func TestMsg_SetMessageIDRandomness(t *testing.T) {
|
||||
var mids []string
|
||||
for i := 0; i < 100; i++ {
|
||||
for i := 0; i < 50_000; i++ {
|
||||
m := NewMsg()
|
||||
m.SetMessageID()
|
||||
mid := m.GetGenHeader(HeaderMessageID)
|
||||
if len(mid) > 0 {
|
||||
mids = append(mids, mid[0])
|
||||
}
|
||||
mid := m.GetMessageID()
|
||||
mids = append(mids, mid)
|
||||
}
|
||||
c := make(map[string]int)
|
||||
for i := range mids {
|
||||
|
|
Loading…
Reference in a new issue