From f157f5489fc65fac56e6f24f66e7a0f986881c4c Mon Sep 17 00:00:00 2001 From: semmelrinde <124386289+semmelrinde@users.noreply.github.com> Date: Sun, 25 Oct 2026 01:25:22 +0000 Subject: [PATCH] test: the desktop-PATH agent probe waits long enough on a loaded machine (#6072) desktop_path_can_start_an_agent_and_its_runtime gave the version probe 3 s and the first reply 5 s. Under a full test run on a loaded macOS machine the probe came back empty (version None, twice in a row), while the test alone passes in 0.4 s. Both limits are now 20 s; a working agent still answers at once, so the test takes no longer. Co-authored-by: Claude Opus 5.5 --- crates/ui-egui/src/agent_chat/discover.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/crates/ui-egui/src/agent_chat/discover.rs b/crates/ui-egui/src/agent_chat/discover.rs index 07bfa6a36..17663d4df 100644 --- a/crates/ui-egui/src/agent_chat/discover.rs +++ b/crates/ui-egui/src/agent_chat/discover.rs @@ -489,11 +489,13 @@ mod tests { if let Some(root) = std::env::var_os(CHILD) { let root = PathBuf::from(root); let agent = find_in("solidcraft-test-agent", &search_dirs()).unwrap(); - assert_eq!(version(&agent, Duration::from_secs(3)).as_deref(), Some("1.2.3")); + // Generous limits: both answer at once, but a whole test run on a loaded machine + // can keep `env`, the shell and the script from starting within 3 s. + assert_eq!(version(&agent, Duration::from_secs(20)).as_deref(), Some("1.2.3")); let mut p = AgentProcess::spawn(&[agent.to_string_lossy().into_owned()], &root, &[], || {}).unwrap(); let message = serde_json::json!({"id": 1, "method": "initialize"}); p.send(&message); - let reply = p.from_agent.recv_timeout(Duration::from_secs(5)).unwrap(); + let reply = p.from_agent.recv_timeout(Duration::from_secs(20)).unwrap(); p.shutdown(true); match reply { FromAgent::Line(line) => assert_eq!(serde_json::from_str::(&line).unwrap(), message),