Skip to content

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

test(merge): fix race in post-merge marker assertion (#2139)

Maximilian Roosd831458952d0
diff --git a/tests/integration_tests/merge.rs b/tests/integration_tests/merge.rs
index ff3155151..901be96bc 100644
--- a/tests/integration_tests/merge.rs
+++ b/tests/integration_tests/merge.rs
@@ -673,7 +673,7 @@ fn test_merge_post_merge_command_success(mut repo: TestRepo) {
// Verify the command ran in the main worktree (not the feature worktree).
// post-merge runs in the background, so poll for the file.
let marker_file = repo.root_path().join("post-merge-ran.txt");
- wait_for_file(&marker_file);
+ wait_for_file_content(&marker_file);
let content = fs::read_to_string(&marker_file).unwrap();
assert!(
content.contains("merged feature to main"),