Skip to content

Commit

Permalink
fix: Make sure all generated message have random headers
Browse files Browse the repository at this point in the history
This avoids deduplication attempts from remote servers.
  • Loading branch information
LBeernaertProton committed Oct 18, 2022
1 parent ce2b376 commit bab2c0a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion benchmarks/gluon_bench/imap_benchmarks/build_mailbox.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package imap_benchmarks

import (
"fmt"
"github.com/google/uuid"
"time"

"github.com/ProtonMail/gluon/benchmarks/gluon_bench/flags"
Expand Down Expand Up @@ -35,7 +36,8 @@ func BuildMailboxWithMessages(cl *client.Client, mailbox string, messageCount in
messagesLen := len(messages)

for i := 0; i < messageCount; i++ {
if err := AppendToMailbox(cl, mailbox, messages[i%messagesLen], time.Now()); err != nil {
literal := fmt.Sprintf("To: %v@a.com\r\nFrom: %v@a.com\r\n", uuid.NewString(), uuid.NewString()) + messages[i%messagesLen]
if err := AppendToMailbox(cl, mailbox, literal, time.Now()); err != nil {
return err
}
}
Expand Down

0 comments on commit bab2c0a

Please sign in to comment.