Skip to content

test: Fix flaky test_no_old_msg_is_fresh: Wait for incoming message before sending outgoing one#8064

Merged
iequidoo merged 1 commit intomainfrom
iequidoo/test_no_old_msg_is_fresh
Apr 5, 2026
Merged

test: Fix flaky test_no_old_msg_is_fresh: Wait for incoming message before sending outgoing one#8064
iequidoo merged 1 commit intomainfrom
iequidoo/test_no_old_msg_is_fresh

Conversation

@iequidoo
Copy link
Copy Markdown
Collaborator

@iequidoo iequidoo commented Apr 2, 2026

We don't want to send an outgoing message from the 2nd device (ac1_clone) before receiving the incoming one and expect that the messages will be ordered correctly on the 1st device (ac1). Let's ensure the correct message order locally in the first place. I checked logs of a failed test run and it indeed happened that ac1_clone sent the message earlier, so it can't reference the incoming message and tweak_sort_timestamp() does nothing on ac1, so the messages can't be ordered correctly considering that smeared clocks on the devices are different.

…efore sending outgoing one

We don't want to send an outgoing message from the 2nd device (`ac1_clone`) before receiving the
incoming one and expect that the messages will be ordered correctly on the 1st device (`ac1`). Let's
ensure the correct message order locally in the first place. I checked logs of a failed test run and
it indeed happened that `ac1_clone` sent the message earlier, so it can't reference the incoming
message and `tweak_sort_timestamp()` does nothing on `ac1`, so the messages can't be ordered
correctly considering that smeared clocks on the devices are diferent.
@iequidoo iequidoo marked this pull request as ready for review April 2, 2026 02:19
@iequidoo iequidoo requested review from Hocuri and link2xt April 2, 2026 02:20
Copy link
Copy Markdown
Collaborator

@Hocuri Hocuri left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, thanks!

@iequidoo iequidoo merged commit bc48b17 into main Apr 5, 2026
55 of 56 checks passed
@iequidoo iequidoo deleted the iequidoo/test_no_old_msg_is_fresh branch April 5, 2026 23:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants