Skip to content

Commit

Permalink
Merge pull request #2217 from EspressoSystems/keyao/ci-test-with-fail…
Browse files Browse the repository at this point in the history
…ures

Fix `test_with_failures` and update logging
  • Loading branch information
shenkeyao authored Dec 13, 2023
2 parents 7e82b30 + 056cc92 commit 33241fd
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
11 changes: 7 additions & 4 deletions crates/task-impls/src/consensus.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1016,10 +1016,13 @@ impl<TYPES: NodeType, I: NodeImplementation<TYPES>, A: ConsensusApi<TYPES, I> +
timeout_certificate: Option<TimeoutCertificate<TYPES>>,
) -> bool {
if self.quorum_membership.get_leader(view) != self.public_key {
error!(
"Somehow we formed a QC but are not the leader for the next view {:?}",
view
);
// This is expected for view 1, so skipping the logging.
if view != TYPES::Time::new(1) {
error!(
"Somehow we formed a QC but are not the leader for the next view {:?}",
view
);
}
return false;
}

Expand Down
2 changes: 2 additions & 0 deletions crates/testing/tests/basic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,8 @@ async fn test_with_failures_half_f() {
node_changes: vec![(5, dead_nodes)],
};
metadata.overall_safety_properties.num_failed_views = 6;
// Make sure we keep commiting rounds after the bad leaders, but not the full 50 because of the numerous timeouts
metadata.overall_safety_properties.num_successful_views = 22;
metadata
.gen_launcher::<TestTypes, MemoryImpl>(0)
.launch()
Expand Down

0 comments on commit 33241fd

Please sign in to comment.