Compare commits
2
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
85ddca5e7b | ||
|
|
fed0c102a5 |
@@ -14,7 +14,7 @@ use std::process::Command;
|
|||||||
use std::time::Duration;
|
use std::time::Duration;
|
||||||
|
|
||||||
use common::{init_bare_repo, init_repo, push_all_to_origin, wait_for_async, DaemonFixture};
|
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;
|
use tempfile::TempDir;
|
||||||
|
|
||||||
fn request(cwd: &std::path::Path, repo: &std::path::Path, branch: &str) -> CreateSessionRequest {
|
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),
|
Duration::from_millis(100),
|
||||||
);
|
);
|
||||||
|
|
||||||
// The pass demonstrably runs and probed A's tree...
|
// 30s is a hang guard only, not the property under test — that's the
|
||||||
wait_for_async(Duration::from_secs(5), || async {
|
// timing-free `contains` check below.
|
||||||
fx.manager
|
wait_for_async(Duration::from_secs(30), || async {
|
||||||
.snapshot()
|
std::fs::read_to_string(&log_path)
|
||||||
.await
|
.map(|calls| calls.contains(repo_a.path().to_str().unwrap()))
|
||||||
.iter()
|
.unwrap_or(false)
|
||||||
.any(|s| s.worktree.is_some() && s.blocked_work == Some(InTheWay::default()))
|
|
||||||
})
|
})
|
||||||
.await;
|
.await;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user