2025-12-16 06:55:44 +01:00
|
|
|
use std::time::Duration;
|
|
|
|
|
|
|
|
|
|
use anyhow::Result;
|
|
|
|
|
use testing_framework_core::scenario::{Deployer, ScenarioBuilder};
|
|
|
|
|
use testing_framework_runner_compose::ComposeDeployer;
|
|
|
|
|
use testing_framework_workflows::ScenarioBuilderExt;
|
|
|
|
|
|
|
|
|
|
pub async fn load_progression_test() -> Result<()> {
|
|
|
|
|
for rate in [5, 10, 20, 30] {
|
|
|
|
|
println!("Testing with rate: {}", rate);
|
|
|
|
|
|
2026-01-25 10:11:16 +02:00
|
|
|
let mut plan = ScenarioBuilder::topology_with(|t| t.network_star().validators(3))
|
|
|
|
|
.wallets(50)
|
|
|
|
|
.transactions_with(|txs| txs.rate(rate).users(20))
|
|
|
|
|
.expect_consensus_liveness()
|
|
|
|
|
.with_run_duration(Duration::from_secs(60))
|
|
|
|
|
.build()?;
|
2025-12-16 06:55:44 +01:00
|
|
|
|
|
|
|
|
let deployer = ComposeDeployer::default();
|
|
|
|
|
let runner = deployer.deploy(&plan).await?;
|
|
|
|
|
let _handle = runner.run(&mut plan).await?;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Ok(())
|
|
|
|
|
}
|