From 528deb296b41dcd1eebd41ab59a834404ea896ab Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Sat, 31 Oct 2026 06:32:51 +0100 Subject: [PATCH] sources tests: do not hold the fake's lock across its own accessor Co-Authored-By: Claude Sonnet 5.5 --- crates/huginn-daemon/src/sources/tests.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/crates/huginn-daemon/src/sources/tests.rs b/crates/huginn-daemon/src/sources/tests.rs index 54f0b84..2e94287 100644 --- a/crates/huginn-daemon/src/sources/tests.rs +++ b/crates/huginn-daemon/src/sources/tests.rs @@ -311,7 +311,8 @@ fn rebuild_on_model_or_chunker_change() { let before = rig.index.held(); let (refreshed, _) = rig.run(&mut forge); assert!(format!("{:#}", refreshed.unwrap_err()).contains("no Huginn metadata")); - assert_eq!((rig.index.state.lock().unwrap().recreated, rig.index.held()), (3, before), "untouched"); + let recreated = rig.index.state.lock().unwrap().recreated; + assert_eq!((recreated, rig.index.held()), (3, before), "untouched"); } /// A NUL blob, an LFS pointer, an oversize file, Unity YAML and a lock file