From 8bdc63d4fcfde20f31903404a9ea024f87f8a8fd Mon Sep 17 00:00:00 2001 From: clover caruso Date: Mon, 19 Oct 2026 21:49:03 -0700 Subject: [PATCH] test(desktop): let a loaded machine refuse a held section within the timeout kept_sections_open_at_once checks that readying a section another holds leaves it at once, rather than waiting for the owner as open does, for up to TIMEOUT * 3. It bounded that one attempt at a second, which a loaded gate (20261019-181040) exceeded: prefetch passes open_by a deadline of now, so it tries once and never sleeps, and the second was only the machine. It now bounds it by TIMEOUT, still a third of what waiting would take. Assisted-by: claude-opus-5.5 --- crates/snowbound/src/library.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/crates/snowbound/src/library.rs b/crates/snowbound/src/library.rs index 0f0d8c31a2bd6a59abdb6c5141b551a78970a931..0c460aae14cae3050b0b1b98fa476600df1119da 100644 --- a/crates/snowbound/src/library.rs +++ b/crates/snowbound/src/library.rs @@ -1915,7 +1915,9 @@ mod tests { drop(readied); let start = Instant::now(); assert!(library.prefetch(&first, || {}).is_err()); - assert!(start.elapsed() < Duration::from_secs(1)); + // Well short of the `TIMEOUT * 3` `open` waits for an owner, however loaded the + // machine running the test. + assert!(start.elapsed() < TIMEOUT); library.keep(&first, opened); library.prefetch(&second, || {}).unwrap(); library.close_kept(); -- 2.54.1