tests: remove redundant wait_while (#4952)

Remove redundant `wait_while` in tests. It had only one usage. Use
`wait_tenant_status404`.

Related:
https://github.com/neondatabase/neon/pull/4855#discussion_r1289610641
This commit is contained in:
Dmitry Rodionov
2023-08-11 10:18:13 +03:00
committed by GitHub
parent 73d7a9bc6e
commit d39fd66773
3 changed files with 11 additions and 36 deletions
-16
View File
@@ -303,22 +303,6 @@ def wait_until(number_of_iterations: int, interval: float, func: Fn):
raise Exception("timed out while waiting for %s" % func) from last_exception
def wait_while(number_of_iterations: int, interval: float, func):
"""
Wait until 'func' returns false, or throws an exception.
"""
for i in range(number_of_iterations):
try:
if not func():
return
log.info("waiting for %s iteration %s failed", func, i + 1)
time.sleep(interval)
continue
except Exception:
return
raise Exception("timed out while waiting for %s" % func)
def run_pg_bench_small(pg_bin: "PgBin", connstr: str):
"""
Fast way to populate data.