test: TestBridge_SendAddTextBodyPartIfNotExists eventually fix

It may take a couple of fetch requests until the pending state updates
get applied.
This commit is contained in:
Leander Beernaert 2023-07-28 16:18:51 +02:00
parent 823ca4d207
commit 750de0cd31
1 changed files with 3 additions and 1 deletions

View File

@ -467,7 +467,9 @@ SGVsbG8gd29ybGQK
require.Eventually(t, func() bool {
messages, err := clientFetch(senderIMAPClient, `Sent`, imap.FetchBodyStructure)
require.NoError(t, err)
require.Equal(t, 4, len(messages))
if len(messages) != 4 {
return false
}
// messages may not be in order
for _, message := range messages {