From 039fce1e8edf5c864f879c130b5fd1ab6809c3e9 Mon Sep 17 00:00:00 2001 From: Dmitry Rodionov Date: Mon, 31 Jul 2023 19:02:51 +0300 Subject: [PATCH] wait for tenant to be active before polling for timeline absence --- test_runner/regress/test_timeline_delete.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test_runner/regress/test_timeline_delete.py b/test_runner/regress/test_timeline_delete.py index 9226ca21d2fe0..da06dcbf355aa 100644 --- a/test_runner/regress/test_timeline_delete.py +++ b/test_runner/regress/test_timeline_delete.py @@ -258,12 +258,12 @@ def test_delete_timeline_exercise_crash_safety_failpoints( if check is Check.RETRY_WITH_RESTART: env.pageserver.stop() env.pageserver.start() - if failpoint == "timeline-delete-before-index-deleted-at": - # We crashed before persisting this to remote storage, need to retry delete request - # Wait till tenant is loaded. Shouldnt take longer than 2 seconds (we shouldnt block tenant loading) - wait_until_tenant_active(ps_http, env.initial_tenant, iterations=2) + # Wait till tenant is loaded. Shouldnt take longer than 2 seconds + wait_until_tenant_active(ps_http, env.initial_tenant, iterations=2) + if failpoint == "timeline-delete-before-index-deleted-at": + # We crashed before persisting this to remote storage, need to retry delete request timeline_delete_wait_completed(ps_http, env.initial_tenant, timeline_id) else: # Pageserver should've resumed deletion after restart.