diff --git a/crates/maestro-daemon/tests/blocked_work_cost.rs b/crates/maestro-daemon/tests/blocked_work_cost.rs index a04a923..81f19b2 100644 --- a/crates/maestro-daemon/tests/blocked_work_cost.rs +++ b/crates/maestro-daemon/tests/blocked_work_cost.rs @@ -14,7 +14,7 @@ use std::process::Command; use std::time::Duration; use common::{init_bare_repo, init_repo, push_all_to_origin, wait_for_async, DaemonFixture}; -use maestro_protocol::{CreateSessionRequest, InTheWay, WorktreeSpec}; +use maestro_protocol::{CreateSessionRequest, WorktreeSpec}; use tempfile::TempDir; fn request(cwd: &std::path::Path, repo: &std::path::Path, branch: &str) -> CreateSessionRequest { @@ -91,13 +91,12 @@ async fn a_session_without_a_worktree_costs_no_probe() { Duration::from_millis(100), ); - // The pass demonstrably runs and probed A's tree... - wait_for_async(Duration::from_secs(5), || async { - fx.manager - .snapshot() - .await - .iter() - .any(|s| s.worktree.is_some() && s.blocked_work == Some(InTheWay::default())) + // 30s is a hang guard only, not the property under test — that's the + // timing-free `contains` check below. + wait_for_async(Duration::from_secs(30), || async { + std::fs::read_to_string(&log_path) + .map(|calls| calls.contains(repo_a.path().to_str().unwrap())) + .unwrap_or(false) }) .await;