From 5c0ecc6aa5fed5d23f5c982d34357e2c8c2fdf5c Mon Sep 17 00:00:00 2001 From: JJ Liebig Date: Sun, 13 Sep 2026 18:03:42 +0400 Subject: [PATCH] test: deflake windows metadata ttl expiry assertion (#4050) The clear-only metadata test used a 1 ms ttl, so on loaded Windows runners set_agent_metadata could see the entry as expired, drop it, and recreate it with a None ttl before next_agent_metadata_expiry() ran. Expiry is forced explicitly later in the test, so use a long ttl to keep the no-extension assertion independent of wall-clock scheduling. --- src/terminal/metadata.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/terminal/metadata.rs b/src/terminal/metadata.rs index 91b1d582..e82a5a3a 100644 --- a/src/terminal/metadata.rs +++ b/src/terminal/metadata.rs @@ -861,7 +861,9 @@ mod tests { clear_title: false, clear_display_agent: false, clear_state_labels: false, - ttl: Some(Duration::from_millis(1)), + // Expiry is forced with the captured deadline below; keep the + // no-extension assertion independent of wall-clock scheduling. + ttl: Some(Duration::from_secs(60)), seq: None, }); let old_deadline = terminal.next_agent_metadata_expiry().unwrap();