2025-12-16 06:55:44 +01:00
|
|
|
use std::time::Duration;
|
|
|
|
|
|
|
|
|
|
use testing_framework_core::scenario::ScenarioBuilder;
|
|
|
|
|
use testing_framework_workflows::ScenarioBuilderExt;
|
|
|
|
|
|
2025-12-18 22:48:45 +01:00
|
|
|
use crate::SnippetResult;
|
|
|
|
|
|
|
|
|
|
pub fn minimum_run_windows() -> SnippetResult<()> {
|
2025-12-16 06:55:44 +01:00
|
|
|
// Bad: too short (~2 blocks with default 2s slots, 0.9 coeff)
|
2026-01-23 09:28:00 +02:00
|
|
|
let _too_short = ScenarioBuilder::with_node_counts(1)
|
2025-12-16 06:55:44 +01:00
|
|
|
.with_run_duration(Duration::from_secs(5))
|
|
|
|
|
.expect_consensus_liveness()
|
2025-12-18 22:48:45 +01:00
|
|
|
.build()?;
|
2025-12-16 06:55:44 +01:00
|
|
|
|
|
|
|
|
// Good: enough blocks for assertions (~27 blocks with default 2s slots, 0.9
|
|
|
|
|
// coeff)
|
2026-01-23 09:28:00 +02:00
|
|
|
let _good = ScenarioBuilder::with_node_counts(1)
|
2025-12-16 06:55:44 +01:00
|
|
|
.with_run_duration(Duration::from_secs(60))
|
|
|
|
|
.expect_consensus_liveness()
|
2025-12-18 22:48:45 +01:00
|
|
|
.build()?;
|
|
|
|
|
Ok(())
|
2025-12-16 06:55:44 +01:00
|
|
|
}
|