logos-blockchain-testing/examples/doc-snippets/src/testing_philosophy_minimum_run_windows.rs
Hansie Odendaal 13497ba95b
merge dev into master
This merge brings the following updates from the dev branch:

Pull Requests:
- #10: chore: update main repo dependencies (@hansieodendaal)
  Update for main repo changes including removal of DA config-related code and executor node dependencies

- #8: Add support to use framework without running scenario (@andrussal)
  Add ManualCluster for controlling nodes lifecycle and reorganize node-control logic

- #7: Remove DA (@andrussal)
  Remove DA workload usage from framework following node changes

- #6: feat: refactor for using external cucumber (@hansieodendaal)
  Removed all references to cucumber and prepared compose docker workspace for external repo root

- #4: Individual nodes connect at runtime (@andrussal)
  Add option to connect to arbitrary peers when starting a node

- #2: feat: add cucumber auto deployer (@hansieodendaal)
  Added example for selecting deployer based on environment variable

- #1: chore: allow older curl versions as well (@hansieodendaal)
  Allow compatibility with older and newer curl versions

Contributors:
- @andrussal
- @hansieodendaal
2026-01-26 07:17:37 +02:00

23 lines
716 B
Rust

use std::time::Duration;
use testing_framework_core::scenario::ScenarioBuilder;
use testing_framework_workflows::ScenarioBuilderExt;
use crate::SnippetResult;
pub fn minimum_run_windows() -> SnippetResult<()> {
// Bad: too short (~2 blocks with default 2s slots, 0.9 coeff)
let _too_short = ScenarioBuilder::with_node_counts(1)
.with_run_duration(Duration::from_secs(5))
.expect_consensus_liveness()
.build()?;
// Good: enough blocks for assertions (~27 blocks with default 2s slots, 0.9
// coeff)
let _good = ScenarioBuilder::with_node_counts(1)
.with_run_duration(Duration::from_secs(60))
.expect_consensus_liveness()
.build()?;
Ok(())
}