Fix hang in editor completion unit test

This commit is contained in:
Max Brunsfeld 2022-02-02 17:09:36 -08:00
parent bbdf62f263
commit 45898daf83
2 changed files with 8 additions and 5 deletions

View File

@ -6826,6 +6826,7 @@ mod tests {
.with_language_server(language_server, cx)
});
let buffer = cx.add_model(|cx| MultiBuffer::singleton(buffer, cx));
buffer.next_notification(&cx).await;
let (_, editor) = cx.add_window(|cx| build_editor(buffer, settings, cx));
@ -6881,6 +6882,7 @@ mod tests {
);
apply_additional_edits
});
let (id, _) = fake
.receive_request::<lsp::request::ResolveCompletionItem>()
.await;
@ -6900,11 +6902,11 @@ mod tests {
assert_eq!(
editor.read_with(&cx, |editor, cx| editor.text(cx)),
"
one.second_completion
two
three
additional edit
"
one.second_completion
two
three
additional edit
"
.unindent()
);
}

View File

@ -746,6 +746,7 @@ impl Buffer {
Operation::UpdateCompletionTriggers { triggers },
cx,
);
cx.notify();
});
} else {
return;