diff --git a/crates/ide-lsp/tests/integration/mock_server.rs b/crates/ide-lsp/tests/integration/mock_server.rs index bba6268908..2957c8c8e5 100644 --- a/crates/ide-lsp/tests/integration/mock_server.rs +++ b/crates/ide-lsp/tests/integration/mock_server.rs @@ -9678,7 +9678,8 @@ async fn a_server_is_sent_the_documents_it_registers_a_selector_for() { let after = open_data("after.dt"); eventually(|| fw.docs.lock().contains_key(&uri_of(&after))).await; // Its own server keeps the documents, and one the selector doesn't name stays with it alone. - assert!(own.docs.lock().contains_key(&uri_of(&after)) && own.docs.lock().contains_key(&uri_of(&unrelated))); + eventually(|| own.docs.lock().contains_key(&uri_of(&after)) && own.docs.lock().contains_key(&uri_of(&unrelated))) + .await; assert!(!fw.docs.lock().contains_key(&uri_of(&unrelated))); // The server list names the language among the ones it serves. let served = h.mgr.servers().into_iter().find(|s| s.name == "fw").unwrap().languages;