diff options
| author | tv <tv@krebsco.de> | 2026-11-17 11:27:38 +0000 |
|---|---|---|
| committer | tv <tv@krebsco.de> | 2026-11-17 12:34:21 +0100 |
| commit | 0bc965cfa3ad42b5ef9850388d856eb18f2ab5d9 (patch) | |
| tree | 9bf7cef2da513b3c3720ce2b773918f4a7c4b38a /src | |
| parent | d4f7e15e28cbd0029a5b189a4aa3cd636ffc9699 (diff) | |
simtest: in row 15, the joiner reads as the node serving it does
d, serving the epoch it made up, puts again there what its store holds, as
every node holding a store does: e, judging every event, reads what d reads,
the checkpoint the others moved to among it, not the root alone.
Diffstat (limited to 'src')
| -rw-r--r-- | src/simtest/holding.rs | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/src/simtest/holding.rs b/src/simtest/holding.rs index 02e8ddf..743e354 100644 --- a/src/simtest/holding.rs +++ b/src/simtest/holding.rs @@ -1514,12 +1514,12 @@ fn not_followed(node: &AppState) -> bool { /// A node with an empty document handed a made-up epoch: e, reaching only d, takes the /// one d made up, whose checkpoint is the root its operator named, and reads what it -/// holds, judging every event: tv's write, not the checkpoint the others moved to; the -/// epoch withholds, at worst. f, reaching only the others, takes not their epoch, whose -/// checkpoint it neither builds nor has pinned. +/// holds, judging every event: what d puts again there too, the epoch withholding at +/// worst, so that it reads as d does. f, reaching only the others, takes not their +/// epoch, whose checkpoint it neither builds nor has pinned. #[tokio::test(flavor = "multi_thread", worker_threads = 4)] async fn store_attack_15() { - let (sim, _nodes, first, id, head, _, lower) = made_up_epoch(97).await; + let (sim, nodes, _, id, head, _, lower) = made_up_epoch(97).await; let away: [(&str, &[&str]); 2] = [("e", &["a", "b", "c", "f"]), ("f", &["d", "e"])]; for (joiner, others) in away { for other in others { @@ -1538,8 +1538,11 @@ async fn store_attack_15() { move || async move { e.local_epoch() == lower && e.is_ready().await && holds(e, &[head]) }, ) .await; - assert_eq!(checkpoint(e), Some(id)); - assert_eq!(current(e), Some(first.hash())); + let d = &nodes[3]; + sim.wait_until("e reads as d does", LONG, move || async move { + counts(e) == counts(d) + }) + .await; sim.wait_until( "f doesn't take the others' epoch", Duration::from_secs(60), |
