diff --git a/crates/rust-analyzer/tests/slow-tests/main.rs b/crates/rust-analyzer/tests/slow-tests/main.rs index 3fe3b9ae854..02b5e0e5e98 100644 --- a/crates/rust-analyzer/tests/slow-tests/main.rs +++ b/crates/rust-analyzer/tests/slow-tests/main.rs @@ -1093,10 +1093,18 @@ pub fn foo() {} //- /bar/src/lib.rs pub fn bar() {} + +//- /baz/Cargo.toml +[package] +name = "baz" +version = "0.0.0" + +//- /baz/src/lib.rs "#, ) .root("foo") .root("bar") + .root("baz") .with_config(json!({ "files": { "excludeDirs": ["foo", "bar"] diff --git a/crates/rust-analyzer/tests/slow-tests/support.rs b/crates/rust-analyzer/tests/slow-tests/support.rs index 8600fbc3fb0..d81926855eb 100644 --- a/crates/rust-analyzer/tests/slow-tests/support.rs +++ b/crates/rust-analyzer/tests/slow-tests/support.rs @@ -255,6 +255,9 @@ pub(crate) fn wait_until_workspace_is_loaded(self) -> Server { .clone() .extract::("experimental/serverStatus") .unwrap(); + if status.health == lsp_ext::Health::Error { + panic!("server errored while loading workspace: {:?}", status.message); + } status.quiescent } _ => false,