Skip to content

Commit 40d5379

Browse files
committed
fix: Address comments in OlmMachine tests
1 parent 8621802 commit 40d5379

File tree

1 file changed

+0
-20
lines changed
  • crates/matrix-sdk-crypto/src/machine/tests

1 file changed

+0
-20
lines changed

crates/matrix-sdk-crypto/src/machine/tests/mod.rs

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -751,8 +751,6 @@ async fn test_megolm_state_encryption() {
751751
to_device_requests_to_content(to_device_requests),
752752
);
753753

754-
let mut room_keys_received_stream = Box::pin(bob.store().room_keys_received_stream());
755-
756754
let decryption_settings =
757755
DecryptionSettings { sender_device_trust_requirement: TrustRequirement::Untrusted };
758756

@@ -776,18 +774,6 @@ async fn test_megolm_state_encryption() {
776774
let sessions = std::slice::from_ref(&group_session);
777775
bob.store().save_inbound_group_sessions(sessions).await.unwrap();
778776

779-
// when we decrypt the room key, the
780-
// inbound_group_session_streamroom_keys_received_stream should tell us
781-
// about it.
782-
let room_keys = room_keys_received_stream
783-
.next()
784-
.now_or_never()
785-
.flatten()
786-
.expect("We should have received an update of room key infos")
787-
.unwrap();
788-
assert_eq!(room_keys.len(), 1);
789-
assert_eq!(room_keys[0].session_id, group_session.session_id());
790-
791777
let plaintext = "It is a secret to everybody";
792778

793779
let content = RoomTopicEventContent::new(plaintext.to_owned());
@@ -823,12 +809,6 @@ async fn test_megolm_state_encryption() {
823809
} else {
824810
panic!("Decrypted room event has the wrong type");
825811
}
826-
827-
// Just decrypting the event should *not* cause an update on the
828-
// inbound_group_session_stream.
829-
if let Some(igs) = room_keys_received_stream.next().now_or_never() {
830-
panic!("Session stream unexpectedly returned update: {igs:?}");
831-
}
832812
}
833813

834814
#[async_test]

0 commit comments

Comments
 (0)