test(lsp): wait for the own server's documents in the selector test (#8255)

a_server_is_sent_the_documents_it_registers_a_selector_for waited for one server's didOpen and then asserted the other server's at once; the two are sent separately, so it failed now and then. It now waits for both.

Co-authored-by: audichuang <[email protected]>
Цей коміт міститься в:
audichuang authored and GitHub committed 2026-12-06 02:28:25 +08:00
1 джерело 85e03f72ee
коміт 67c48409c8
1 file changed
+2 -1
+2 -1
Переглянути файл
@@ -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;