diff options
Diffstat (limited to 'src/simtest/holding.rs')
| -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), |
