HomePhabricator

test: Introduce ensure_for helper

Description

test: Introduce ensure_for helper

Summary:
A repeating pattern in the functional tests is that the test sleeps for a while to ensure that a certain condition is still true after some amount of time has elapsed. This PR here introduces an ensure helper to streamline this functionality.

Remove unused attempts parameter from wait_until

This is a partial backport of core#30893
https://github.com/bitcoin/bitcoin/pull/30893/commits/16c87d91fd4d7709fa9d8824d5b641ef71821931
https://github.com/bitcoin/bitcoin/pull/30893/commits/111465d72dd35e42361fc2a089036f652417ed37

For now there is no use case for the 3rd commit in that PR (check_interval parameter for wait_until)

Test Plan: ninja check-functional

Reviewers: #bitcoin_abc, roqqit

Reviewed By: #bitcoin_abc, roqqit

Subscribers: faskalajob

Differential Revision: https://reviews.bitcoinabc.org/D17911

Details

Provenance
Fabian Jahr <fjahr@protonmail.com>Authored on Sep 12 2024, 12:00
PiRKCommitted on Wed, Apr 9, 08:46
PiRKPushed on Wed, Apr 9, 08:46
Reviewer
Restricted Project
Differential Revision
D17911: test: Introduce ensure_for helper
Parents
rABCbccc7e803be0: [chronik] Improve connection of the electrum interface test
Branches
Unknown
Tags
Unknown