diff options
Diffstat (limited to 'src/simtest')
| -rw-r--r-- | src/simtest/hyparview.rs | 4 | ||||
| -rw-r--r-- | src/simtest/mod.rs | 4 | ||||
| -rw-r--r-- | src/simtest/remakes.rs | 4 | ||||
| -rw-r--r-- | src/simtest/timing.rs | 4 |
4 files changed, 8 insertions, 8 deletions
diff --git a/src/simtest/hyparview.rs b/src/simtest/hyparview.rs index 65d581c..b5177d1 100644 --- a/src/simtest/hyparview.rs +++ b/src/simtest/hyparview.rs @@ -218,12 +218,12 @@ async fn a_swarm_switches_to_hyparview_at_runtime() { nodes[0] .mutate_doc(|doc| { - crate::document::store::write_path( + crate::document::view::write_path( doc, &crate::swarm::topology::topology_path(), &json!("hyparview"), )?; - crate::document::store::write_path( + crate::document::view::write_path( doc, &crate::swarm::topology::dissemination_path(), &json!("plumtree"), diff --git a/src/simtest/mod.rs b/src/simtest/mod.rs index d0f80da..d11a402 100644 --- a/src/simtest/mod.rs +++ b/src/simtest/mod.rs @@ -32,8 +32,8 @@ use serde_json::Value as JsonValue; use tokio::time::Instant; use crate::document::replica::Epoch; -use crate::document::store; use crate::document::{ChangeHash, Document}; +use crate::document::{store, view}; use crate::files::Files; use crate::identity::NodeKey; use crate::locks::{MutexExt, RwLockExt}; @@ -482,7 +482,7 @@ pub(crate) fn path(path: &str) -> Vec<String> { /// Writes `value` at `path` (`a/b/c`) as one change, as the API does. pub(crate) async fn write(node: &AppState, at: &str, value: JsonValue) { let at = path(at); - node.mutate_doc(move |doc| store::write_path(doc, &at, &value)) + node.mutate_doc(move |doc| view::write_path(doc, &at, &value)) .await .expect("write"); } diff --git a/src/simtest/remakes.rs b/src/simtest/remakes.rs index 6fa4235..49139b6 100644 --- a/src/simtest/remakes.rs +++ b/src/simtest/remakes.rs @@ -17,7 +17,7 @@ use serde_json::{Value as JsonValue, json}; use super::{SOON, Sim, read, write}; use crate::document::ChangeHash; use crate::document::replica::Epoch; -use crate::document::store; +use crate::document::view; use crate::remake::testing; use crate::state::AppState; use crate::swarm::bootstrap::Start; @@ -257,7 +257,7 @@ async fn writes_through_a_rejoin_are_kept() { while !stop.load(Ordering::Relaxed) { let at = vec!["w".to_owned(), n.to_string()]; let written = c - .mutate_doc(move |doc| store::write_path(doc, &at, &json!(n))) + .mutate_doc(move |doc| view::write_path(doc, &at, &json!(n))) .await; assert!(written.is_ok(), "write {n} refused: {written:?}"); answered.lock().unwrap().push(n); 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"); |
