Skip to content

Commit 6644fe3

Browse files
committed
Error out slow-tests when server loading errors
1 parent 1d085cf commit 6644fe3

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

crates/rust-analyzer/tests/slow-tests/main.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1093,10 +1093,18 @@ version = "0.0.0"
10931093
10941094
//- /bar/src/lib.rs
10951095
pub fn bar() {}
1096+
1097+
//- /baz/Cargo.toml
1098+
[package]
1099+
name = "baz"
1100+
version = "0.0.0"
1101+
1102+
//- /baz/src/lib.rs
10961103
"#,
10971104
)
10981105
.root("foo")
10991106
.root("bar")
1107+
.root("baz")
11001108
.with_config(json!({
11011109
"files": {
11021110
"excludeDirs": ["foo", "bar"]

crates/rust-analyzer/tests/slow-tests/support.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -255,6 +255,9 @@ impl Server {
255255
.clone()
256256
.extract::<lsp_ext::ServerStatusParams>("experimental/serverStatus")
257257
.unwrap();
258+
if status.health == lsp_ext::Health::Error {
259+
panic!("server errored while loading workspace: {:?}", status.message);
260+
}
258261
status.quiescent
259262
}
260263
_ => false,

0 commit comments

Comments
 (0)