From 99d274ad9130996a29488ae4f61218af8f3f9366 Mon Sep 17 00:00:00 2001 From: JoshuaBatty Date: Tue, 25 Jul 2023 10:24:00 +1000 Subject: [PATCH] await for requests from server without timing out --- sway-lsp/tests/utils/src/lib.rs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/sway-lsp/tests/utils/src/lib.rs b/sway-lsp/tests/utils/src/lib.rs index fa39c6c581e..3183f6d372a 100644 --- a/sway-lsp/tests/utils/src/lib.rs +++ b/sway-lsp/tests/utils/src/lib.rs @@ -103,11 +103,7 @@ pub async fn assert_server_requests( ) -> JoinHandle<()> { tokio::spawn(async move { let request_stream = socket.take(expected_requests.len()).collect::>(); - let requests = - tokio::time::timeout(timeout.unwrap_or(Duration::from_secs(10)), request_stream) - .await - .expect("Timed out waiting for requests from server"); - + let requests = request_stream.await; assert_eq!(requests.len(), expected_requests.len()); for (actual, expected) in requests.iter().zip(expected_requests.iter()) { assert_eq!(expected["method"], actual.method());