diff --git a/crates/editor/src/editor_tests.rs b/crates/editor/src/editor_tests.rs index 7137d08c71..9e51091ab6 100644 --- a/crates/editor/src/editor_tests.rs +++ b/crates/editor/src/editor_tests.rs @@ -7320,6 +7320,8 @@ async fn test_lsp_shutdown(cx: &mut gpui::TestAppContext) { cx, ) .await; + + drop(cx); } #[gpui::test] diff --git a/crates/gpui/src/app.rs b/crates/gpui/src/app.rs index 82fa13b96e..9c732ea9e9 100644 --- a/crates/gpui/src/app.rs +++ b/crates/gpui/src/app.rs @@ -369,7 +369,7 @@ impl AppContext { let futures = futures::future::join_all(futures); if background_executor - .block_with_timeout_background_and_foreground(SHUTDOWN_TIMEOUT, futures) + .block_to_shutdown(SHUTDOWN_TIMEOUT, futures) .is_err() { log::error!("timed out waiting on app_will_quit"); diff --git a/crates/gpui/src/executor.rs b/crates/gpui/src/executor.rs index 4500bd9f0e..8167144cfa 100644 --- a/crates/gpui/src/executor.rs +++ b/crates/gpui/src/executor.rs @@ -301,7 +301,7 @@ impl BackgroundExecutor { /// Block the current thread until the given future resolves /// or `duration` has elapsed. - pub fn block_with_timeout_background_and_foreground( + pub fn block_to_shutdown( &self, duration: Duration, future: impl Future,