test: Work around test_sync_broadcast_and_send_message flakiness#7967
Merged
test: Work around test_sync_broadcast_and_send_message flakiness#7967
Conversation
The test sometimes fails because of wrong message ordering for bob:
[...]
Waiting for the device of alice@example.org to reply… [NOTICED][INFO]
<Msg#2010🔒: (Contact#Contact#2001): hi [FRESH]
Msg#2008🔒: (Contact#Contact#2001): You joined the channel. [FRESH][INFO]
>Msg#2010🔒: (Contact#Contact#2001): hi [FRESH]
Msg#2011🔒: (Contact#Contact#2001): Member Me removed by alice@example.org. [FRESH][INFO]
This adds `SystemTime::shift(Duration::from_secs(1))` as a workaround.
Hocuri
approved these changes
Mar 10, 2026
src/chat/chat_tests.rs
Outdated
Comment on lines
+4704
to
+4705
| // alice2's smeared clock may be behind alice's one, so "hi" from alice2 may appear before "You | ||
| // joined the channel." for bob. Work around this for now. |
Collaborator
There was a problem hiding this comment.
Suggested change
| // alice2's smeared clock may be behind alice's one, so "hi" from alice2 may appear before "You | |
| // joined the channel." for bob. Work around this for now. | |
| // alice2's smeared clock may be behind alice's one, so "hi" from alice2 may appear before "You | |
| // joined the channel." for bob. |
There are no plans to introduce a replacement for timesmearing, so, this is probably not just "for now".
Collaborator
Author
There was a problem hiding this comment.
I don't suggest to replace timesmearing completely, but the 2nd device could at least adjust "Date" in its messages if it received an outgoing message with greater "Date". This also should be limited to MAX_SECONDS_TO_LEND_FROM_FUTURE (30s currently). Also this way we don't leak the fact that messages are sent from different devices
Co-authored-by: Hocuri <hocuri@gmx.de>
Collaborator
Author
|
One second didn't help: https://github.com/chatmail/core/actions/runs/22903698439/job/66456520063 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The test sometimes fails because of wrong message ordering for bob (https://github.com/chatmail/core/actions/runs/22780794012/job/66085797963):
This adds
SystemTime::shift(Duration::from_secs(1))as a workaround.