lib

Core libraries for Radroots
git clone https://radroots.dev/git/lib.git
Log | Files | Refs | README

commit 576a834b1ba3f61805c351ca955aaab092dc8aaf
parent 084d436101cb13317a5a7205870af5e312e9a8b7
Author: triesap <tyson@radroots.org>
Date:   Sun,  2 Aug 2026 20:19:00 +0000

test(core): release relay observer before shutdown

- clone recorded snapshots out of the synchronization guard
- avoid holding a standard mutex across asynchronous shutdown
- use the snapshot revision accessor directly in assertions
- keep the local relay integration lane warning-free under Clippy

Diffstat:
Mcrates/studio_storage/tests/local_relay_e2e.rs | 9+++++----
1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/crates/studio_storage/tests/local_relay_e2e.rs b/crates/studio_storage/tests/local_relay_e2e.rs @@ -102,18 +102,19 @@ async fn local_relay_e2e_imports_activates_refreshes_and_caches_profile() { cached.candidate().metadata().preferred_name(), Some("Farm Account") ); - let observed = observer.0.lock().expect("observer snapshots"); - assert!(observed.iter().any(|snapshot| { + let recorded_snapshots = observer.0.lock().expect("observer snapshots").clone(); + assert!(recorded_snapshots.iter().any(|snapshot| { snapshot.active_account().is_some_and(|account| { account.profile_state() == ProfileLoadState::Loading && account.relay_state() == RelayConnectionState::Connecting }) })); assert_eq!( - observed.last().map(|snapshot| snapshot.revision()), + recorded_snapshots + .last() + .map(radroots_studio_application::AppSnapshot::revision), Some(refreshed.revision()) ); - drop(observed); assert!(adapter.core().unsubscribe(handle)); let public_debug = format!("{refreshed:?}");