mirror of
https://github.com/logos-blockchain/logos-blockchain-testing.git
synced 2026-02-17 03:33:08 +00:00
1.1 KiB
1.1 KiB
Runner review notes
File: testing-framework/core/src/scenario/runtime/runner.rs
Concerns
- Potential hang if workloads don’t self-terminate
run_workloadsnever cancels workloads after the duration expires. It waits fordrive_until_timerto time out, then optionally does a cooldown, thendrain_workloadswhich waits for all tasks to finish. If a workload is long-lived or never exits on its own, the scenario can hang indefinitely after the duration window.- Suggestion: call
workloads.abort_all()whendrive_until_timerreturnsOk(false)(timeout) or add a second timeout arounddrain_workloads.
- Block-feed settle constants are inconsistent
DEFAULT_BLOCK_FEED_SETTLE_WAITis 1s, butMIN_BLOCK_FEED_SETTLE_WAITis 2s. Insettle_before_expectations, any zero wait becomes 1s and then gets max’d to 2s, so the default is effectively unused.- Suggestion: set default ≥ min, or remove the default constant and use min directly.
Questions
- Are workloads guaranteed to finish on their own at the end of
scenario.duration()? If not, the hang risk is real.