From 012fb7f3d948cd87517424f737f9e0d3c6f71ce5 Mon Sep 17 00:00:00 2001 From: tv Date: Tue, 17 Nov 2026 00:59:15 +0000 Subject: simtest: nodes started from a store's root synced before a test takes them apart The simulations of swarms holding a store start their nodes from the root and wait, besides each holding the store, until they synced: each took the others' handshakes and holds their entries. So a test taking nodes apart right after starts from nodes that know each other, as it means to. --- src/simtest/holding.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/simtest/holding.rs') diff --git a/src/simtest/holding.rs b/src/simtest/holding.rs index ed6a9a5..ba33470 100644 --- a/src/simtest/holding.rs +++ b/src/simtest/holding.rs @@ -109,7 +109,8 @@ fn of_the_store(config: &mut NodeConfig, id: Id, root: Option<&[u8]>, holding: H } /// Starts `nodes`, each by its name with what it keeps of its store, from the store's -/// `root`, the first one the others' seed, and waits until each holds the store. +/// `root`, the first one the others' seed, and waits until each holds the store, and +/// until they synced: each took the others' handshakes, and holds their entries. async fn started(sim: &Sim, root: &[u8], nodes: Vec<(&str, Holding)>) -> Vec { started_with(sim, root, nodes, |_| {}).await } @@ -150,6 +151,7 @@ async fn started_with( all.iter().all(|node| node.holding.tells_members()) }) .await; + sim.wait_converged(all, LONG).await; states } -- cgit v1.3.1