mirror of
https://github.com/wneessen/go-mail.git
synced 2024-11-22 05:40:50 +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
|
// TestMsg_SetMessageIDRandomness tests the randomness of Msg.SetMessageID methods
|
||||||
func TestMsg_SetMessageIDRandomness(t *testing.T) {
|
func TestMsg_SetMessageIDRandomness(t *testing.T) {
|
||||||
var mids []string
|
var mids []string
|
||||||
for i := 0; i < 100; i++ {
|
for i := 0; i < 50_000; i++ {
|
||||||
m := NewMsg()
|
m := NewMsg()
|
||||||
m.SetMessageID()
|
m.SetMessageID()
|
||||||
mid := m.GetGenHeader(HeaderMessageID)
|
mid := m.GetMessageID()
|
||||||
if len(mid) > 0 {
|
mids = append(mids, mid)
|
||||||
mids = append(mids, mid[0])
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
c := make(map[string]int)
|
c := make(map[string]int)
|
||||||
for i := range mids {
|
for i := range mids {
|
||||||
|
|
Loading…
Reference in a new issue