From a088135b0e5f0fb1bafb87deb3affc59c57a2a7d Mon Sep 17 00:00:00 2001 From: DeFiDude <59237470+DeFiDude@users.noreply.github.com> Date: Sun, 15 Nov 2026 11:50:44 -0700 Subject: [PATCH] tests: a shared-instance client reads the rows of a running owner --- crates/rns-transport/src/actor/store_worker.rs | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/crates/rns-transport/src/actor/store_worker.rs b/crates/rns-transport/src/actor/store_worker.rs index ee8ec32..478283d 100644 --- a/crates/rns-transport/src/actor/store_worker.rs +++ b/crates/rns-transport/src/actor/store_worker.rs @@ -2119,6 +2119,24 @@ mod tests { let _ = std::fs::remove_dir_all(dir); } + #[test] + fn a_shared_instance_client_reads_a_running_owners_rows() { + let dir = temp_dir(); + let mut owner = actor_on(&dir); + owner + .recent_announces + .insert([5; 16], entry([5; 16], Some(1000.0), false)); + owner.kd.pending.mark_dirty([5; 16]); + owner.flush_known_destinations(); + settle(&mut owner); + // The owner keeps its database open, the rows still in its WAL. + let client = client_on(&dir); + assert!(client.recent_announces.contains_key(&[5; 16])); + drop(client); + owner.on_shutdown(); + let _ = std::fs::remove_dir_all(dir); + } + #[test] fn a_shared_instance_client_writes_nothing() { let dir = temp_dir();