From e69bb96144a9ae336fe688b4ddbb23fa97263d3b Mon Sep 17 00:00:00 2001 From: Ivan Enderlin Date: Thu, 2 Apr 2026 17:04:03 +0200 Subject: [PATCH] test(integration): Fix the `test_local_echo_to_send_event_has_encryption_info` test. This test forgot to subscribe to the Event Cache, hence the result was partially okay. It was working by luck before. With the previous commits, it was not possible to work without the Event Cache being listening to the sync. --- testing/matrix-sdk-integration-testing/src/tests/timeline.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/testing/matrix-sdk-integration-testing/src/tests/timeline.rs b/testing/matrix-sdk-integration-testing/src/tests/timeline.rs index fe2f03eb3..f742a9ece 100644 --- a/testing/matrix-sdk-integration-testing/src/tests/timeline.rs +++ b/testing/matrix-sdk-integration-testing/src/tests/timeline.rs @@ -1011,6 +1011,7 @@ async fn test_thread_focused_timeline() -> TestResult { async fn test_local_echo_to_send_event_has_encryption_info() -> TestResult { // Set up sync for user Alice, and create a room. let alice = TestClientBuilder::new("alice").use_sqlite().build().await?; + alice.event_cache().subscribe()?; debug!("Creating room…"); let initial_state = vec![ @@ -1073,7 +1074,7 @@ async fn test_local_echo_to_send_event_has_encryption_info() -> TestResult { // Now the new event with the encryption info arrives. let vector_diff = timeout(Duration::from_secs(5), stream.next()).await?; - let sent_event = assert_matches!(vector_diff, Some(VectorDiff::PushFront { value }) => value); + let sent_event = assert_matches!(vector_diff, Some(VectorDiff::PushBack { value }) => value); // The encryption info should be correctly populated. let encryption_info =