Skip to content
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

Bump soft_timeout of Wait_condition.blocks_to_be_produced in integration tests #10326

Merged
merged 1 commit into from
Mar 2, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion src/lib/integration_test_lib/wait_condition.ml
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,15 @@ struct
Predicate_passed
else Predicate_continuation init_blocks_generated
in
let soft_timeout_in_slots = 2 * n in
let soft_timeout_in_slots =
(* We add 1 here to make sure that we see the entirety of at least 2*n
full slots, since slot time may be misaligned with wait times after
non-block-related waits.
This ensures that low numbers of blocks (e.g. 1 or 2) have a
reasonable probability of success, reducing flakiness of the tests.
*)
(2 * n) + 1
in
{ description = Printf.sprintf "%d blocks to be produced" n
; predicate = Network_state_predicate (init, check)
; soft_timeout = Slots soft_timeout_in_slots
Expand Down