Page MenuHomePhabricator

test: Introduce ensure_for helper
ClosedPublic

Authored by PiRK on Tue, Apr 8, 13:49.

Details

Reviewers
roqqit
Group Reviewers
Restricted Project
Commits
rABCf881f585a838: 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

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable