authoravatarclover caruso<git@paperclover.net>2026-10-19 21:49:03-07:00
committeravatarclover caruso<git@paperclover.net>2026-10-19 23:39:58-07:00
log8bdc63d4fcfde20f31903404a9ea024f87f8a8fd
tree93fbcadf6ce6a8cf11df5c930fb8c427feef7935
parentb77e64db05f9b062024344f4a5a1bed1cb8e7014
signature Signed by SSH key SHA256:52mNGHRsVFBDED9IAX5pe+LRWUefqTbxEReunq21QvU

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

1 files changed, 3 insertions(+), 1 deletions(-)

crates/snowbound/src/library.rs+3-1
......@@ -1915,7 +1915,9 @@ mod tests {
19151915 drop(readied);
19161916 let start = Instant::now();
19171917 assert!(library.prefetch(&first, || {}).is_err());
1918 assert!(start.elapsed() < Duration::from_secs(1));
1918 // Well short of the `TIMEOUT * 3` `open` waits for an owner, however loaded the
1919 // machine running the test.
1920 assert!(start.elapsed() < TIMEOUT);
19191921 library.keep(&first, opened);
19201922 library.prefetch(&second, || {}).unwrap();
19211923 library.close_kept();