From 402cb2c40a7b9cc33b79c28879c9882e287f6650 Mon Sep 17 00:00:00 2001 From: Yuchen Liang Date: Thu, 20 Jun 2024 17:28:29 -0400 Subject: [PATCH] add allowed errors for leases in two tests that uses static endpoints Signed-off-by: Yuchen Liang --- .../regress/test_ondemand_slru_download.py | 3 +++ test_runner/regress/test_readonly_node.py | 20 ++++++++++++------- 2 files changed, 16 insertions(+), 7 deletions(-) diff --git a/test_runner/regress/test_ondemand_slru_download.py b/test_runner/regress/test_ondemand_slru_download.py index d6babe4393..dced99424a 100644 --- a/test_runner/regress/test_ondemand_slru_download.py +++ b/test_runner/regress/test_ondemand_slru_download.py @@ -88,6 +88,9 @@ def test_ondemand_download_replica(neon_env_builder: NeonEnvBuilder, shard_count initial_tenant_conf=tenant_conf, initial_tenant_shard_count=shard_count ) + for ps in env.pageservers: + ps.allowed_errors.append(".*page_service.*error obtaining lsn lease.*Tenant .* not found") + endpoint = env.endpoints.create_start("main") pg_conn = endpoint.connect() diff --git a/test_runner/regress/test_readonly_node.py b/test_runner/regress/test_readonly_node.py index ba8b91e84d..295cff3554 100644 --- a/test_runner/regress/test_readonly_node.py +++ b/test_runner/regress/test_readonly_node.py @@ -6,18 +6,24 @@ from fixtures.pageserver.utils import wait_for_last_record_lsn from fixtures.utils import query_scalar -# -# Create read-only compute nodes, anchored at historical points in time. -# -# This is very similar to the 'test_branch_behind' test, but instead of -# creating branches, creates read-only nodes. -# def test_readonly_node(neon_simple_env: NeonEnv): + """ + Create read-only compute nodes, anchored at historical points in time. + + This is very similar to the 'test_branch_behind' test, but instead of + creating branches, creates read-only nodes. + """ + env = neon_simple_env env.neon_cli.create_branch("test_readonly_node", "empty") endpoint_main = env.endpoints.create_start("test_readonly_node") - env.pageserver.allowed_errors.append(".*basebackup .* failed: invalid basebackup lsn.*") + env.pageserver.allowed_errors.extend( + [ + ".*basebackup .* failed: invalid basebackup lsn.*", + ".*page_service.*error obtaining lsn lease.*.*tried to request a page version that was garbage collected", + ] + ) main_pg_conn = endpoint_main.connect() main_cur = main_pg_conn.cursor()