From 55d0a3cdb87bcce643bd242406e1dec7e7f61e33 Mon Sep 17 00:00:00 2001 From: Benjamin Bouvier Date: Tue, 16 Jul 2024 13:14:56 +0200 Subject: [PATCH] integration tests: make `test_event_with_context` wait for as long as it claims The previous linear backoff would retry overall 10 times the value, and 10x30 == 300ms, not 3 seconds. --- testing/matrix-sdk-integration-testing/src/tests/room.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/testing/matrix-sdk-integration-testing/src/tests/room.rs b/testing/matrix-sdk-integration-testing/src/tests/room.rs index c9460c07a..a6010f034 100644 --- a/testing/matrix-sdk-integration-testing/src/tests/room.rs +++ b/testing/matrix-sdk-integration-testing/src/tests/room.rs @@ -60,15 +60,15 @@ async fn test_event_with_context() -> Result<()> { // Bob joins it. let mut bob_joined = false; - for i in 1..=4 { + for i in 1..=5 { if let Some(room) = bob.get_room(&room_id) { room.join().await?; bob_joined = true; break; } - sleep(Duration::from_millis(30 * i)).await; + sleep(Duration::from_millis(500 * i)).await; } - anyhow::ensure!(bob_joined, "bob couldn't join after 3 seconds"); + anyhow::ensure!(bob_joined, "bob couldn't join after ~8 seconds"); assert_eq!(alice_room.state(), RoomState::Joined);