test_runner: improve wait_until (#9936)

Improves `wait_until` by:

* Use `timeout` instead of `iterations`. This allows changing the
timeout/interval parameters independently.
* Make `timeout` and `interval` optional (default 20s and 0.5s). Most
callers don't care.
* Only output status every 1s by default, and add optional
`status_interval` parameter.
* Remove `show_intermediate_error`, this was always emitted anyway.

Most callers have been updated to use the defaults, except where they
had good reason otherwise.
This commit is contained in:
Erik Grinaker
2024-12-02 12:26:15 +02:00
committed by Ivan Efremov
parent 7fc2912d06
commit 0e1a336607
46 changed files with 234 additions and 326 deletions

View File

@@ -215,8 +215,6 @@ def test_readonly_node_gc(neon_env_builder: NeonEnvBuilder):
# wait for lease renewal before running query.
_, offset = wait_until(
20,
0.5,
lambda: ep_static.assert_log_contains(
"lsn_lease_bg_task.*Request succeeded", offset=offset
),