aboutsummaryrefslogtreecommitdiffstats
path: root/src/simtest/timing.rs
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2026-11-29 03:21:43 +0000
committertv <tv@krebsco.de>2026-11-29 03:21:43 +0000
commite63d30c2581033a85489b10c3f5b252fdbb5049e (patch)
tree5f4e6f65f1cecfb32f841e7ad7d9d106aeb69b20 /src/simtest/timing.rs
parent9188fa6e13ea7facfab5fb6f55bf26444ec2c01e (diff)
state: plain writes take a view to write, Automerge's are asked for as such
AppState::mutate_doc, mutate_doc_registering and mutate_doc_by hand what they are given a document::view::Write: the member registry, the users, sessions, forgetting and bootstrap write through them, and take whatever kind of document gives it. AppState::mutate_doc_for is for what asks more of an Automerge document than values at paths (the store's API, a remake's host, a store's events), and gives the heads after the write. What reads a view takes one of any size (dyn Write among them).
Diffstat (limited to 'src/simtest/timing.rs')
-rw-r--r--src/simtest/timing.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/simtest/timing.rs b/src/simtest/timing.rs
index 5f23c21..3f03562 100644
--- a/src/simtest/timing.rs
+++ b/src/simtest/timing.rs
@@ -404,7 +404,7 @@ async fn late_epoch_does_not_flip_a_peers_epoch() {
/// record itself.
#[tokio::test(flavor = "multi_thread", worker_threads = 4)]
async fn forgotten_node_that_is_alive_cancels_its_record() {
- use crate::document::store;
+ use crate::document::{store, view};
use crate::swarm::peer::forgotten_path;
let sim = Sim::new(9);
@@ -416,7 +416,7 @@ async fn forgotten_node_that_is_alive_cancels_its_record() {
let record = forgotten_path(b.local_id());
let written = record.clone();
- a.mutate_doc(move |doc| store::write_path(doc, &written, &json!({"at": 0, "by": "a"})))
+ a.mutate_doc(move |doc| view::write_path(doc, &written, &json!({"at": 0, "by": "a"})))
.await
.expect("write forget record");