Error out slow-tests when server loading errors

This commit is contained in:
Lukas Wirth 2023-04-04 19:12:10 +02:00
parent 1d085cf03b
commit 6644fe3441
2 changed files with 11 additions and 0 deletions

View File

@ -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"]

View File

@ -255,6 +255,9 @@ pub(crate) fn wait_until_workspace_is_loaded(self) -> Server {
.clone()
.extract::<lsp_ext::ServerStatusParams>("experimental/serverStatus")
.unwrap();
if status.health == lsp_ext::Health::Error {
panic!("server errored while loading workspace: {:?}", status.message);
}
status.quiescent
}
_ => false,