test: Add unique offsets to ids generated by TestContext to increase test correctness (#7297)

and fix the mistakes in tests that get discovered by this.

closes #6799
This commit is contained in:
Simon Laux
2025-10-19 19:08:23 +02:00
committed by GitHub
parent 65b61efb31
commit 59fac54f7b
14 changed files with 137 additions and 60 deletions

View File

@@ -2901,9 +2901,9 @@ async fn test_accept_outgoing() -> Result<()> {
let bob1_chat = bob1.create_chat(&alice1).await;
let sent = bob1.send_text(bob1_chat.id, "Hello!").await;
alice1.recv_msg(&sent).await;
let alice1_msg = alice1.recv_msg(&sent).await;
alice2.recv_msg(&sent).await;
let alice1_msg = bob2.recv_msg(&sent).await;
bob2.recv_msg(&sent).await;
assert_eq!(alice1_msg.text, "Hello!");
let alice1_chat = chat::Chat::load_from_db(&alice1, alice1_msg.chat_id).await?;
assert!(alice1_chat.is_contact_request());