From 6b2f02fdfd4ad22bc88f6fb2176ff6dd7c66d7e1 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Tue, 31 Mar 2020 12:02:47 +0200 Subject: Ignore createProgress request in tests closes #3783 --- crates/rust-analyzer/src/main_loop.rs | 14 +++++++------- crates/rust-analyzer/tests/heavy_tests/support.rs | 1 + 2 files changed, 8 insertions(+), 7 deletions(-) (limited to 'crates') diff --git a/crates/rust-analyzer/src/main_loop.rs b/crates/rust-analyzer/src/main_loop.rs index 79ea90cc9..d818243e3 100644 --- a/crates/rust-analyzer/src/main_loop.rs +++ b/crates/rust-analyzer/src/main_loop.rs @@ -808,14 +808,14 @@ fn send_startup_progress(sender: &Sender, loop_state: &mut LoopState) { ), _ => {} } -} -fn send_startup_progress_notif(sender: &Sender, work_done_progress: WorkDoneProgress) { - let notif = notification_new::(req::ProgressParams { - token: req::ProgressToken::String("rustAnalyzer/startup".into()), - value: req::ProgressParamsValue::WorkDone(work_done_progress), - }); - sender.send(notif.into()).unwrap(); + fn send_startup_progress_notif(sender: &Sender, work_done_progress: WorkDoneProgress) { + let notif = notification_new::(req::ProgressParams { + token: req::ProgressToken::String("rustAnalyzer/startup".into()), + value: req::ProgressParamsValue::WorkDone(work_done_progress), + }); + sender.send(notif.into()).unwrap(); + } } struct PoolDispatcher<'a> { diff --git a/crates/rust-analyzer/tests/heavy_tests/support.rs b/crates/rust-analyzer/tests/heavy_tests/support.rs index 67f3c9332..fc3c65ad9 100644 --- a/crates/rust-analyzer/tests/heavy_tests/support.rs +++ b/crates/rust-analyzer/tests/heavy_tests/support.rs @@ -188,6 +188,7 @@ impl Server { self.client.sender.send(r.into()).unwrap(); while let Some(msg) = self.recv() { match msg { + Message::Request(req) if req.method == "window/workDoneProgress/create" => (), Message::Request(req) => panic!("unexpected request: {:?}", req), Message::Notification(_) => (), Message::Response(res) => { -- cgit v1.2.3