-
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] baseline failures #15632
[test] baseline failures #15632
Changes from 2 commits
e3eb8e3
8c69113
328f7e8
51d88e9
d01d497
21875f4
527e90c
ae2e092
f06b514
0c1d51b
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(()) | ||
} | ||
} | ||
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 returns immediately after setting the failpoints, without waiting for the specified 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 unconditionally, regardless of whether the test logic succeeds or fails. Since the test appears to be validating leader equivocation fault tolerance, the test should be allowed to complete normally and verify the expected behavior through its assertions.Spotted by Graphite Reviewer
Is this helpful? React 👍 or 👎 to let us know.