Unnamed repository; edit this file 'description' to name the repository.
test: force client-side watching
The direct reason for this is to fix CI on windows, which seems to fail for some reason after we fixed the watcher-selection logic which (I think) changed the tests behavior to use notify rather than client. But this patch seems to make sense in general -- file watching is notoriously finicky, so controlling it explicitly leads to less fragile tests.
Aleksey Kladov 2022-01-01
parent 0d1e23e · commit a1c33c2
-rw-r--r--crates/rust-analyzer/tests/slow-tests/support.rs8
1 files changed, 8 insertions, 0 deletions
diff --git a/crates/rust-analyzer/tests/slow-tests/support.rs b/crates/rust-analyzer/tests/slow-tests/support.rs
index a8c2a5bb61..6e7ecec5b2 100644
--- a/crates/rust-analyzer/tests/slow-tests/support.rs
+++ b/crates/rust-analyzer/tests/slow-tests/support.rs
@@ -101,6 +101,14 @@ impl<'a> Project<'a> {
let mut config = Config::new(
tmp_dir_path,
lsp_types::ClientCapabilities {
+ workspace: Some(lsp_types::WorkspaceClientCapabilities {
+ did_change_watched_files: Some(
+ lsp_types::DidChangeWatchedFilesClientCapabilities {
+ dynamic_registration: Some(true),
+ },
+ ),
+ ..Default::default()
+ }),
text_document: Some(lsp_types::TextDocumentClientCapabilities {
definition: Some(lsp_types::GotoCapability {
link_support: Some(true),