diff --git a/test_runner/fixtures/pageserver/utils.py b/test_runner/fixtures/pageserver/utils.py index 3b95990a57..a2a49b8a6e 100644 --- a/test_runner/fixtures/pageserver/utils.py +++ b/test_runner/fixtures/pageserver/utils.py @@ -191,7 +191,11 @@ def wait_timeline_detail_404( tenant_id: TenantId, timeline_id: TimelineId, iterations: int, + interval: Optional[float] = None, ): + if interval is None: + interval = 0.25 + def timeline_is_missing(): data = {} try: @@ -204,7 +208,7 @@ def wait_timeline_detail_404( raise RuntimeError(f"Timeline exists state {data.get('state')}") - wait_until(iterations, interval=0.250, func=timeline_is_missing) + wait_until(iterations, interval, func=timeline_is_missing) def timeline_delete_wait_completed( @@ -212,10 +216,11 @@ def timeline_delete_wait_completed( tenant_id: TenantId, timeline_id: TimelineId, iterations: int = 20, + interval: Optional[float] = None, **delete_args, ): pageserver_http.timeline_delete(tenant_id=tenant_id, timeline_id=timeline_id, **delete_args) - wait_timeline_detail_404(pageserver_http, tenant_id, timeline_id, iterations) + wait_timeline_detail_404(pageserver_http, tenant_id, timeline_id, iterations, interval) if TYPE_CHECKING: diff --git a/test_runner/regress/test_remote_storage.py b/test_runner/regress/test_remote_storage.py index d642a6d190..502ae71cec 100644 --- a/test_runner/regress/test_remote_storage.py +++ b/test_runner/regress/test_remote_storage.py @@ -607,7 +607,9 @@ def test_timeline_deletion_with_files_stuck_in_upload_queue( ".* ERROR .*Error processing HTTP request: InternalServerError\\(timeline is Stopping" ) - timeline_delete_wait_completed(client, tenant_id, timeline_id) + # Generous timeout, because currently deletions can get blocked waiting for compaction + # This can be reduced when https://github.com/neondatabase/neon/issues/4998 is fixed. + timeline_delete_wait_completed(client, tenant_id, timeline_id, iterations=30, interval=1) assert not timeline_path.exists()