Skip to content

Commit c7ad0b1

Browse files
committed
test: make test_group_with_removed_message_id less flaky
It failed in CI once, apparently because "Gr." was generated inside the group ID.
1 parent 0dd9e3a commit c7ad0b1

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/chat.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5147,9 +5147,11 @@ mod tests {
51475147
// Alice has an SMTP-server replacing the `Message-ID:`-header (as done eg. by outlook.com).
51485148
let sent_msg = alice.pop_sent_msg().await;
51495149
let msg = sent_msg.payload();
5150-
assert_eq!(msg.match_indices("Gr.").count(), 2);
5150+
assert_eq!(msg.match_indices("Message-ID: <Gr.").count(), 1);
5151+
assert_eq!(msg.match_indices("References: <Gr.").count(), 1);
51515152
let msg = msg.replace("Message-ID: <Gr.", "Message-ID: <XXX");
5152-
assert_eq!(msg.match_indices("Gr.").count(), 1);
5153+
assert_eq!(msg.match_indices("Message-ID: <Gr.").count(), 0);
5154+
assert_eq!(msg.match_indices("References: <Gr.").count(), 1);
51535155

51545156
// Bob receives this message, he may detect group by `References:`- or `Chat-Group:`-header
51555157
receive_imf(&bob, msg.as_bytes(), false).await.unwrap();

0 commit comments

Comments
 (0)