diff options
| author | Ogulcan Celik <ogulcancelik@gmail.com> | 2026-05-21 03:03:22 +0300 |
|---|---|---|
| committer | Ogulcan Celik <ogulcancelik@gmail.com> | 2026-05-21 03:03:22 +0300 |
| commit | d1576ade07a7236996869d78f37a4aee00367b42 (patch) | |
| tree | 30614035a361dcbb3e18fd96320cfd3aedc5ddee /tests | |
| parent | 741095256765d09d54d9fc541a7fd060a92287b4 (diff) | |
test: stabilize done agent status api test
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/api_ping.rs | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/tests/api_ping.rs b/tests/api_ping.rs index 1289abe6..7e00c315 100644 --- a/tests/api_ping.rs +++ b/tests/api_ping.rs @@ -1654,9 +1654,13 @@ fn pane_info_and_subscriptions_expose_done_agent_status() { fs::create_dir_all(&bin_dir).unwrap(); let fake_pi = bin_dir.join("pi"); + let stop_file = base.join("pi-stop"); fs::write( &fake_pi, - "#!/bin/sh\nprintf 'Working...\\n'\nsleep 1\nprintf '\\033[2J\\033[Hdone\\n'\n", + format!( + "#!/bin/sh\nprintf 'Working...\\n'\nsleep 1\nprintf '\\033[2J\\033[Hdone\\n'\nwhile [ ! -f '{}' ]; do sleep 0.05; done\n", + stop_file.display() + ), ) .unwrap(); #[cfg(unix)] @@ -1764,5 +1768,7 @@ fn pane_info_and_subscriptions_expose_done_agent_status() { ); assert_eq!(pane_after_focus["result"]["pane"]["agent_status"], "idle"); + fs::write(&stop_file, "stop").unwrap(); + cleanup_spawned_herdr(child, base); } |
