From 65bb39e08c92e9d72d0243fe8d048cbfcdc6c3c0 Mon Sep 17 00:00:00 2001 From: l0ng-ai <24760907+l0ng-ai@users.noreply.github.com> Date: Wed, 11 Nov 2026 12:08:25 +0800 Subject: [PATCH] test(plugins): give the official examples test a longer command budget (#2643) The plugin_data_tools harness caps plugin commands at 250 ms to test interruption; the official examples' first command compiles and scans the project and ran over that on Windows runners. That test now uses a 10 s budget. --- crates/ide-host/tests/plugin_data_tools.rs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/crates/ide-host/tests/plugin_data_tools.rs b/crates/ide-host/tests/plugin_data_tools.rs index 3721cf935..763bea890 100644 --- a/crates/ide-host/tests/plugin_data_tools.rs +++ b/crates/ide-host/tests/plugin_data_tools.rs @@ -27,6 +27,9 @@ struct Harness { } impl Harness { fn new() -> Self { + Self::with_timeout(Duration::from_millis(250)) + } + fn with_timeout(timeout: Duration) -> Self { ide_ssh::secrets::testing::use_memory_store(); let tmp = tempfile::tempdir().unwrap(); let root = dunce::canonicalize(tmp.path()).unwrap().join("project"); @@ -56,7 +59,7 @@ impl Harness { PluginHost::new( tmp.path().join("plugins"), Arc::new(move |w: Option<&str>, e| out.lock().unwrap().push((w.unwrap_or_default().to_owned(), e))), - Limits { timeout: Duration::from_millis(250), ..Default::default() }, + Limits { timeout, ..Default::default() }, ) .unwrap(), ); @@ -202,7 +205,8 @@ async fn database_imports_are_denied_without_the_optional_grant() { #[tokio::test(flavor = "multi_thread")] async fn official_api_examples_install_and_render_real_component_contributions() { - let f = Harness::new(); + // The real examples' first calls compile and scan; 250 ms is too tight on Windows runners. + let f = Harness::with_timeout(Duration::from_secs(10)); f.host.set_project_trust(&f.root, true, false).await.unwrap(); let official = Path::new(env!("CARGO_MANIFEST_DIR")).join("../../plugins/official"); for name in ["blame-annotations", "todo-finder"] {