Skip to content

Commit 437e5ce

Browse files
committed
test(sdk): Fix a test on slow system.
1 parent 36aad65 commit 437e5ce

File tree

1 file changed

+4
-4
lines changed
  • crates/matrix-sdk/src/latest_events

1 file changed

+4
-4
lines changed

crates/matrix-sdk/src/latest_events/mod.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -602,7 +602,7 @@ mod tests {
602602
},
603603
owned_room_id, room_id, user_id,
604604
};
605-
use stream_assert::{assert_next_matches, assert_pending};
605+
use stream_assert::assert_pending;
606606
use tokio::task::yield_now;
607607

608608
use super::{
@@ -1017,9 +1017,9 @@ mod tests {
10171017
// The event cache has received its update from the sync. It has emitted a
10181018
// generic update, which has been received by `LatestEvents` tasks, up to the
10191019
// `compute_latest_events` which has updated the latest event value.
1020-
assert_next_matches!(
1021-
latest_event_stream,
1022-
LatestEventValue::Remote(RemoteLatestEventValue { kind: TimelineEventKind::PlainText { event }, .. }) => {
1020+
assert_matches!(
1021+
latest_event_stream.next().await,
1022+
Some(LatestEventValue::Remote(RemoteLatestEventValue { kind: TimelineEventKind::PlainText { event }, .. })) => {
10231023
assert_matches!(
10241024
event.deserialize().unwrap(),
10251025
AnySyncTimelineEvent::MessageLike(

0 commit comments

Comments
 (0)