fix: flaky test due to second-resolution for thread ordering (#12692)

This commit is contained in:
jif-oai
2026-02-25 09:59:25 +00:00
committed by GitHub
parent 10c04e11b8
commit a046849438

View File

@@ -278,6 +278,11 @@ fn exec_resume_last_respects_cwd_filter_and_all_flag() -> anyhow::Result<()> {
.assert()
.success();
// `resume --last` sorts by `updated_at`, which is second-granularity. Sleep so
// the upcoming `resume --last --all` write lands in a later second and becomes
// deterministically newest (instead of tying and falling back to UUID order).
std::thread::sleep(std::time::Duration::from_millis(1100));
let marker_b2 = format!("resume-cwd-b-2-{}", Uuid::new_v4());
let prompt_b2 = format!("echo {marker_b2}");
test.cmd()