Skip to content

Worktrunk is a CLI for Git worktree management, designed for parallel AI agent workflows

test: reduce flakes under load (#2158)

Maximilian Roosd8abafcceceb
diff --git a/.config/nextest.toml b/.config/nextest.toml
index f17c39252..24fdc5a6e 100644
--- a/.config/nextest.toml
+++ b/.config/nextest.toml
@@ -12,15 +12,9 @@
# cargo test --test integration --features shell-integration-tests
[profile.default]
-slow-timeout = { period = "60s", terminate-after = 1 }
+slow-timeout = { period = "180s", terminate-after = 1 }
status-level = "fail"
success-output = "never"
[profile.default.junit]
path = "junit.xml"
-
-# The source_flag test runs `cargo run` inside a PTY, which can take longer than
-# 60s when cargo needs to check/compile dependencies on slow CI runners.
-[[profile.default.overrides]]
-filter = 'test(/test_source_flag_forwards_errors/)'
-slow-timeout = { period = "180s", terminate-after = 1 }
diff --git a/tests/integration_tests/post_start_commands.rs b/tests/integration_tests/post_start_commands.rs
index 6286c782c..53dee587f 100644
--- a/tests/integration_tests/post_start_commands.rs
+++ b/tests/integration_tests/post_start_commands.rs
@@ -916,8 +916,9 @@ approved-commands = ["echo 'stdout output' && echo 'stderr output' >&2"]
})
.expect("Should have a cmd-0 log file");
- // Wait for content to be written (background command might still be writing)
- wait_for_file_content(&cmd_log);
+ // Wait for both lines — `&&` sequences two writes (stdout, then stderr),
+ // so file size > 0 can hit after only the first landed.
+ wait_for_file_lines(&cmd_log, 2);
let log_contents = fs::read_to_string(&cmd_log).unwrap();