commit 422b3ab27637a33240c8f5c2898d7d9a2812f37c
parent be2bdfe68c01af9ab9ed3647039303dfcf600ba1
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:
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/core/crates/storage/tests/local_relay_e2e.rs b/core/crates/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:?}");