From ee2587d3e57225c41650370c377ed661a353fba7 Mon Sep 17 00:00:00 2001 From: Antonio Scandurra Date: Tue, 11 Oct 2022 17:09:54 +0200 Subject: [PATCH] Fix integration tests --- crates/collab/src/integration_tests.rs | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/crates/collab/src/integration_tests.rs b/crates/collab/src/integration_tests.rs index 29d1c1b833..bdd240fda8 100644 --- a/crates/collab/src/integration_tests.rs +++ b/crates/collab/src/integration_tests.rs @@ -801,18 +801,11 @@ async fn test_host_disconnect( assert!(!cx_b.is_window_edited(workspace_b.window_id())); // Ensure client B is not prompted to save edits when closing window after disconnecting. - workspace_b - .update(cx_b, |workspace, cx| { - workspace.close(&Default::default(), cx) - }) - .unwrap() + let can_close = workspace_b + .update(cx_b, |workspace, cx| workspace.prepare_to_close(true, cx)) .await .unwrap(); - assert_eq!(cx_b.window_ids().len(), 0); - cx_b.update(|_| { - drop(workspace_b); - drop(project_b); - }); + assert!(can_close); } #[gpui::test(iterations = 10)]