Worktrunk is a CLI for Git worktree management, designed for parallel AI agent workflows
test: raise BG_TIMEOUT to 30s for flakes under parallel load (#2160)
Maximilian Roosa8da418a1bcc
diff --git a/src/testing/mod.rs b/src/testing/mod.rsindex 5b227540d..8bbb0ec27 100644--- a/src/testing/mod.rs+++ b/src/testing/mod.rs@@ -232,7 +232,7 @@ pub const TEST_EPOCH: u64 = 1735776000;/// Default timeout for background hook/command completion./// Generous to avoid flakiness under CI load; exponential backoff means fast tests when things work.-const BG_TIMEOUT: std::time::Duration = std::time::Duration::from_secs(15);+const BG_TIMEOUT: std::time::Duration = std::time::Duration::from_secs(30);/// Static environment variables shared by all test isolation helpers.///diff --git a/tests/CLAUDE.md b/tests/CLAUDE.mdindex 61054d936..0b897088a 100644--- a/tests/CLAUDE.md+++ b/tests/CLAUDE.md@@ -86,7 +86,7 @@ Use the helpers in `tests/common/mod.rs`:```rustuse crate::common::{wait_for_file, wait_for_file_count, wait_for_file_content};-// ✅ Poll for file existence (15-second default timeout)+// ✅ Poll for file existence (30-second default timeout)wait_for_file(&log_file);// ✅ Poll for multiple files@@ -96,7 +96,7 @@ wait_for_file_count(&log_dir, "log", 3);wait_for_file_content(&marker_file);```-These use exponential backoff (10ms → 500ms cap) for fast initial checks that back off on slow CI. The 15-second default timeout is generous enough to avoid flakiness under CI load.+These use exponential backoff (10ms → 500ms cap) for fast initial checks that back off on slow CI. The 30-second default timeout is generous enough to avoid flakiness under CI load.**Exception - testing absence:** When verifying something did NOT happen, polling doesn't work. Use a fixed 500ms+ sleep: