From fcd220afcfdee916f9edcd7393b8eac579a7741e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arpad=20M=C3=BCller?= Date: Tue, 27 May 2025 01:52:38 +0200 Subject: [PATCH] Remove parametrization from the tests --- test_runner/regress/test_normal_work.py | 14 +++----------- test_runner/regress/test_wal_acceptor_async.py | 14 ++++---------- 2 files changed, 7 insertions(+), 21 deletions(-) diff --git a/test_runner/regress/test_normal_work.py b/test_runner/regress/test_normal_work.py index 44590ea4b9..4c8eedaa5f 100644 --- a/test_runner/regress/test_normal_work.py +++ b/test_runner/regress/test_normal_work.py @@ -10,14 +10,9 @@ if TYPE_CHECKING: from fixtures.pageserver.http import PageserverHttpClient -def check_tenant( - env: NeonEnv, pageserver_http: PageserverHttpClient, safekeeper_proto_version: int -): +def check_tenant(env: NeonEnv, pageserver_http: PageserverHttpClient): tenant_id, timeline_id = env.create_tenant() - config_lines = [ - f"neon.safekeeper_proto_version = {safekeeper_proto_version}", - ] - endpoint = env.endpoints.create_start("main", tenant_id=tenant_id, config_lines=config_lines) + endpoint = env.endpoints.create_start("main", tenant_id=tenant_id) # we rely upon autocommit after each statement res_1 = endpoint.safe_psql_many( queries=[ @@ -42,13 +37,10 @@ def check_tenant( @pytest.mark.parametrize("num_timelines,num_safekeepers", [(3, 1)]) -# Test both proto versions until we fully migrate. -@pytest.mark.parametrize("safekeeper_proto_version", [2, 3]) def test_normal_work( neon_env_builder: NeonEnvBuilder, num_timelines: int, num_safekeepers: int, - safekeeper_proto_version: int, ): """ Basic test: @@ -68,4 +60,4 @@ def test_normal_work( pageserver_http = env.pageserver.http_client() for _ in range(num_timelines): - check_tenant(env, pageserver_http, safekeeper_proto_version) + check_tenant(env, pageserver_http) diff --git a/test_runner/regress/test_wal_acceptor_async.py b/test_runner/regress/test_wal_acceptor_async.py index 4070f99568..fb69bda551 100644 --- a/test_runner/regress/test_wal_acceptor_async.py +++ b/test_runner/regress/test_wal_acceptor_async.py @@ -540,16 +540,13 @@ def test_recovery_uncommitted(neon_env_builder: NeonEnvBuilder): asyncio.run(run_recovery_uncommitted(env)) -async def run_wal_truncation(env: NeonEnv, safekeeper_proto_version: int): +async def run_wal_truncation(env: NeonEnv): tenant_id = env.initial_tenant timeline_id = env.initial_timeline (sk1, sk2, sk3) = env.safekeepers - config_lines = [ - f"neon.safekeeper_proto_version = {safekeeper_proto_version}", - ] - ep = env.endpoints.create_start("main", config_lines=config_lines) + ep = env.endpoints.create_start("main") ep.safe_psql("create table t (key int, value text)") ep.safe_psql("insert into t select generate_series(1, 100), 'payload'") @@ -568,7 +565,6 @@ async def run_wal_truncation(env: NeonEnv, safekeeper_proto_version: int): sk2.start() ep = env.endpoints.create_start( "main", - config_lines=config_lines, ) ep.safe_psql("insert into t select generate_series(1, 200), 'payload'") @@ -587,13 +583,11 @@ async def run_wal_truncation(env: NeonEnv, safekeeper_proto_version: int): # Simple deterministic test creating tail of WAL on safekeeper which is # truncated when majority without this sk elects walproposer starting earlier. -# Test both proto versions until we fully migrate. -@pytest.mark.parametrize("safekeeper_proto_version", [2, 3]) -def test_wal_truncation(neon_env_builder: NeonEnvBuilder, safekeeper_proto_version: int): +def test_wal_truncation(neon_env_builder: NeonEnvBuilder): neon_env_builder.num_safekeepers = 3 env = neon_env_builder.init_start() - asyncio.run(run_wal_truncation(env, safekeeper_proto_version)) + asyncio.run(run_wal_truncation(env)) async def quorum_sanity_single(