-
Notifications
You must be signed in to change notification settings - Fork 3.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[test] failures #15631
[test] failures #15631
Changes from 2 commits
740b95e
a1ba033
2dd9b35
da3739d
21240ee
834bd77
bc7a2da
6ad6679
4c6b8a5
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,8 +2,11 @@ | |
// Parts of the project are originally copyright © Meta Platforms, Inc. | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
use std::{sync::Arc, time::Duration}; | ||
use anyhow::{anyhow, bail, Context}; | ||
|
||
use crate::NetworkLoadTest; | ||
use aptos_forge::{NetworkContextSynchronizer, NetworkTest, Result, Test}; | ||
use aptos_forge::{NetworkContextSynchronizer, NetworkTest, Result, Swarm, SwarmExt, Test, TestReport}; | ||
use async_trait::async_trait; | ||
|
||
pub struct PerformanceBenchmark; | ||
|
@@ -14,7 +17,35 @@ impl Test for PerformanceBenchmark { | |
} | ||
} | ||
|
||
impl NetworkLoadTest for PerformanceBenchmark {} | ||
#[async_trait] | ||
impl NetworkLoadTest for PerformanceBenchmark { | ||
async fn test( | ||
&self, | ||
swarm: Arc<tokio::sync::RwLock<Box<dyn Swarm>>>, | ||
_report: &mut TestReport, | ||
duration: Duration, | ||
) -> Result<()> { | ||
let validators = { swarm.read().await.get_validator_clients_with_names() }; | ||
// 10 vals, test 1,2,3 failures | ||
let num_bad_leaders = 3; | ||
for (name, validator) in validators[..num_bad_leaders].iter() { | ||
validator | ||
.set_failpoint( | ||
"consensus::leader_equivocation".to_string(), | ||
"return".to_string(), | ||
) | ||
.await | ||
.map_err(|e| { | ||
anyhow!( | ||
"set_failpoint to set consensus leader equivocation on {} failed, {:?}", | ||
name, | ||
e | ||
) | ||
})?; | ||
}; | ||
Ok(()) | ||
} | ||
Comment on lines
+22
to
+47
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The test currently sets up the failpoints but returns immediately without running for the specified test duration. Consider adding Spotted by Graphite Reviewer |
||
} | ||
|
||
#[async_trait] | ||
impl NetworkTest for PerformanceBenchmark { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This
panic!()
statement causes the test to fail before it can validate the leader equivocation behavior. Consider removing it to allow the test to complete and verify the fault tolerance mechanisms are working as expected.Spotted by Graphite Reviewer
Is this helpful? React 👍 or 👎 to let us know.