tests: a stopped wave lists only the nodes it entered
This commit is contained in:
parent
91296c0863
commit
634d95f31d
1 changed files with 18 additions and 3 deletions
|
|
@ -3029,9 +3029,21 @@ async fn a_v1_tick_or_run_row_is_refused_by_name() {
|
|||
#[tokio::test]
|
||||
async fn a_wave_that_stops_reports_only_the_nodes_it_reached() {
|
||||
let (_dir, verse) = Harness::fresh().await;
|
||||
let config = deep_config(1);
|
||||
let mut tick = opened_tick(&verse, &config).await;
|
||||
// A third node behind the two the fault will stop inside.
|
||||
let gone = SubjectId::issue();
|
||||
tick.cells.push(FrozenCell {
|
||||
id: tick.cells[0].id,
|
||||
group: false,
|
||||
members: vec![gone],
|
||||
node: NodeId::of(tick.world_id, &NodeAnchor::Subject(gone)),
|
||||
distance: 3,
|
||||
});
|
||||
verse.runs.put_tick(&tick).unwrap();
|
||||
let mut reports = Vec::new();
|
||||
let ended = verse
|
||||
.run_under(fault_at(1), u64::MAX, deep_config(1), |report| {
|
||||
.run_under(fault_at(1), u64::MAX, config, |report| {
|
||||
reports.push(report.clone());
|
||||
ControlFlow::Continue(())
|
||||
})
|
||||
|
|
@ -3040,9 +3052,12 @@ async fn a_wave_that_stops_reports_only_the_nodes_it_reached() {
|
|||
let [report] = reports.as_slice() else {
|
||||
panic!("the open tick is reported")
|
||||
};
|
||||
assert_eq!(report.nodes.len(), 1, "the second node was never reached");
|
||||
assert_eq!(report.acts().count(), 1);
|
||||
// The first node acted; the second was entered and its call faulted; the
|
||||
// third was never reached and is not listed.
|
||||
assert_eq!(report.nodes.len(), 2);
|
||||
assert_eq!(report.nodes[0].acts.len(), 1);
|
||||
assert!(report.nodes[1].acts.is_empty());
|
||||
assert!(report.nodes[1].refusals.is_empty());
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
|
|
|
|||
Loading…
Reference in a new issue