aboutsummaryrefslogtreecommitdiffstats
path: root/src/simtest
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2026-11-17 00:59:15 +0000
committertv <tv@krebsco.de>2026-11-17 02:03:23 +0100
commit012fb7f3d948cd87517424f737f9e0d3c6f71ce5 (patch)
tree370d3d4f940bf8fd54583005850caa9b51e0d69e /src/simtest
parent0c25a28979ee6734fe26f9ac12839160b2dc33a2 (diff)
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.
Diffstat (limited to 'src/simtest')
-rw-r--r--src/simtest/holding.rs4
1 files changed, 3 insertions, 1 deletions
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<AppState> {
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
}