From fcf0b87489521c83a2039d9ee7b6bb8f7020be42 Mon Sep 17 00:00:00 2001 From: Benjamin Bouvier Date: Wed, 4 Feb 2026 15:52:52 +0100 Subject: [PATCH] chore: address typos and cosmetic changes in an integration test --- .typos.toml | 1 + crates/matrix-sdk-ui/CHANGELOG.md | 2 +- .../src/tests/timeline.rs | 14 ++++++++++---- 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/.typos.toml b/.typos.toml index ace1d88f6..82205b67f 100644 --- a/.typos.toml +++ b/.typos.toml @@ -19,6 +19,7 @@ WeeChat = "WeeChat" [default.extend-words] # all of these are valid words, but should never appear in this repo bellow = "below" +stat = "state" sing = "sign" singed = "signed" singing = "signing" diff --git a/crates/matrix-sdk-ui/CHANGELOG.md b/crates/matrix-sdk-ui/CHANGELOG.md index e3a2245cc..747b4f5cd 100644 --- a/crates/matrix-sdk-ui/CHANGELOG.md +++ b/crates/matrix-sdk-ui/CHANGELOG.md @@ -256,7 +256,7 @@ All notable changes to this project will be documented in this file. - Don't consider rooms in the banned state to be non-left rooms. This bug was introduced due to the introduction of the banned state for rooms, and the - non-left room filter did not take the new room stat into account. + non-left room filter did not take the new room state into account. ([#4448](https://github.com/matrix-org/matrix-rust-sdk/pull/4448)) - Fix `EventTimelineItem::latest_edit_json()` when it is populated by a live diff --git a/testing/matrix-sdk-integration-testing/src/tests/timeline.rs b/testing/matrix-sdk-integration-testing/src/tests/timeline.rs index 8a0d5c1ab..284c36e7c 100644 --- a/testing/matrix-sdk-integration-testing/src/tests/timeline.rs +++ b/testing/matrix-sdk-integration-testing/src/tests/timeline.rs @@ -1083,6 +1083,10 @@ async fn test_local_echo_to_send_event_has_encryption_info() -> TestResult { Ok(()) } +/// Setup a pinned events test. +/// +/// Let Alice create an encrypted room, send an event that is immediately +/// pinned, and a number of normal events as well. async fn prepare_room_with_pinned_events( alice: &Client, recovery_passphrase: &str, @@ -1163,9 +1167,9 @@ async fn test_pinned_events_are_decrypted_after_recovering_with_event_count( let sync_service = SyncService::builder(another_alice.clone()).build().await?; // We need to subscribe to the room, otherwise we won't request the - // `m.room.pinned_events` stat event. + // `m.room.pinned_events` state event. // - // Additionally if we subscribe to the room after we already synced, we'll won't + // Additionally if we subscribe to the room after we already synced, we won't // receive the event, likely due to a Synapse bug. sync_service.room_list_service().subscribe_to_rooms(&[&room_id]).await; sync_service.start().await; @@ -1195,7 +1199,9 @@ async fn test_pinned_events_are_decrypted_after_recovering_with_event_count( // If we don't have any items as of yet, wait on the stream. if items.is_empty() { - let _ = assert_next_with_timeout!(stream, 5000); + while let Ok(Some(_)) = timeout(Duration::from_secs(5), stream.next()).await { + // Wait until the timeline stabilizes. + } } // Alright, let's get the event from the timeline. @@ -1250,7 +1256,7 @@ async fn test_pinned_events_are_decrypted_after_recovering_with_event_in_timelin } /// Test that pinned UTD events, once decrypted by R2D2 (the redecryptor), get -/// replaced in the timeline with the decrypted variant even if the pinened UTD +/// replaced in the timeline with the decrypted variant even if the pinned UTD /// event isn't part of the main timeline and thus wasn't put into the event /// cache by the main timeline backpaginating. #[tokio::test(flavor = "multi_thread", worker_threads = 4)]