From 6f01d74860ec0e8d07b80db4653260b40a6e0df7 Mon Sep 17 00:00:00 2001 From: l0ng-ai <24760907+l0ng-ai@users.noreply.github.com> Date: Wed, 4 Nov 2026 19:58:07 +0800 Subject: [PATCH] test(plugins): let the first call in the deadline test start its instance The first highlights call of edit_path_calls_have_soft_and_hard_deadlines starts the plugin instance, which can take longer than the 50 ms soft deadline on a slow runner (Windows CI). Wait for it as the later calls do. --- crates/ide-host/tests/plugins.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/crates/ide-host/tests/plugins.rs b/crates/ide-host/tests/plugins.rs index 7ec00fc0b..1b8eb4663 100644 --- a/crates/ide-host/tests/plugins.rs +++ b/crates/ide-host/tests/plugins.rs @@ -540,7 +540,13 @@ fn edit_path_calls_have_soft_and_hard_deadlines() { let provider = host.syntax_provider(); let mis = LanguageId::new("mis"); - let tokens = provider.highlights(&mis, "fast").unwrap(); + // The first call starts the instance, which may take longer than the soft deadline. + let mut tokens = None; + assert!(eventually(|| { + tokens = provider.highlights(&mis, "fast"); + tokens.is_some() + })); + let tokens = tokens.unwrap(); assert_eq!((tokens[0].start, tokens[0].end, tokens[0].kind.as_str()), (0, 4, "keyword")); // Slower than the soft deadline: dropped (however late this thread gets