diff options
| author | tv <tv@krebsco.de> | 2026-11-06 04:42:57 +0100 |
|---|---|---|
| committer | tv <tv@krebsco.de> | 2026-11-06 04:42:57 +0100 |
| commit | 50d57c3d223cb5fab3e213023c2466b602742106 (patch) | |
| tree | f099c0ea650eeca833b415703e603c0d7438701c /src/simtest | |
| parent | 61de605b91bab60fe9c0346c2d051fdc66391f73 (diff) | |
simtest: cut coordinator before its commit
Diffstat (limited to 'src/simtest')
| -rw-r--r-- | src/simtest/remakes.rs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/simtest/remakes.rs b/src/simtest/remakes.rs index b1a6b12..4a193aa 100644 --- a/src/simtest/remakes.rs +++ b/src/simtest/remakes.rs @@ -352,6 +352,16 @@ async fn coordinator_cut_off_after_committing_rejoins_the_others() { ..LinkParams::default() } }; + // Their votes take half a second to reach a, so a commits after the cut below: on + // fast links a commits as soon as b's vote is in, and its decision could reach b and c + // before this test sees that they have the proposal. + let slow = LinkParams { + delay: (Duration::from_millis(500), Duration::from_millis(500)), + ..LinkParams::default() + }; + for other in ["b", "c"] { + sim.net.set_link(other, "a", slow.clone()); + } let lost = propose(&a, json!({ "kind": "compact" })).await; let (a_ref, b_ref, c_ref, lost_ref) = (&a, &b, &c, lost.as_str()); sim.wait_until("b and c have the proposal", SOON, move || async move { @@ -385,6 +395,7 @@ async fn coordinator_cut_off_after_committing_rejoins_the_others() { for other in ["b", "c"] { sim.net.set_link("a", other, LinkParams::default()); + sim.net.set_link(other, "a", LinkParams::default()); } sim.net.bring_up("a"); sim.wait_until("a is on b's and c's epoch", REMAKE, move || async move { |
