Skip to content

Commit fb46c34

Browse files
iequidooHocuri
authored andcommitted
test: Shift time even more in flaky test_sync_broadcast_and_send_message
As of now, alice1 makes 3 more calls of create_smeared_timestamp() than alice2 does, so we need to shift time by 3s to fix the test.
1 parent 9393753 commit fb46c34

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

src/chat/chat_tests.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4733,9 +4733,10 @@ async fn test_sync_broadcast_and_send_message() -> Result<()> {
47334733
vec![a2b_contact_id]
47344734
);
47354735

4736-
// alice2's smeared clock may be behind alice's one, so "hi" from alice2 may appear before "You
4737-
// joined the channel." for bob.
4738-
SystemTime::shift(Duration::from_secs(1));
4736+
// alice2's smeared clock may be behind alice1's one, so we need to work around "hi" appearing
4737+
// before "You joined the channel." for bob. alice1 makes 3 more calls of
4738+
// create_smeared_timestamp() than alice2 does as of 2026-03-10.
4739+
SystemTime::shift(Duration::from_secs(3));
47394740
tcm.section("Alice's second device sends a message to the channel");
47404741
let sent_msg = alice2.send_text(a2_broadcast_id, "hi").await;
47414742
let msg = bob.recv_msg(&sent_msg).await;

0 commit comments

Comments
 (0)