Skip to content

Commit

Permalink
Parametrize test_deletion_queue_recovery test
Browse files Browse the repository at this point in the history
  • Loading branch information
arpad-m committed May 13, 2024
1 parent ac5d72a commit 297cd5f
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions test_runner/regress/test_pageserver_generations.py
Original file line number Diff line number Diff line change
Expand Up @@ -367,15 +367,19 @@ class KeepAttachment(str, enum.Enum):
class ValidateBefore(str, enum.Enum):
VALIDATE = "validate"
NO_VALIDATE = "no-validate"
class CompactionAlgorithm(str, enum.Enum):
LEGACY = "Legacy"
TIERED = "Tiered"


@pytest.mark.parametrize("keep_attachment", [KeepAttachment.KEEP, KeepAttachment.LOSE])
@pytest.mark.parametrize("validate_before", [ValidateBefore.VALIDATE, ValidateBefore.NO_VALIDATE])
@pytest.mark.parametrize("keep_attachment", [KeepAttachment.KEEP])#, KeepAttachment.LOSE])
@pytest.mark.parametrize("validate_before", [ValidateBefore.VALIDATE])#, ValidateBefore.NO_VALIDATE])
@pytest.mark.parametrize("compaction_algorithm", [CompactionAlgorithm.LEGACY, CompactionAlgorithm.TIERED])
def test_deletion_queue_recovery(
neon_env_builder: NeonEnvBuilder,
pg_bin: PgBin,
keep_attachment: KeepAttachment,
validate_before: ValidateBefore,
compaction_algorithm: CompactionAlgorithm,
):
"""
:param keep_attachment: whether to re-attach after restart. Else, we act as if some other
Expand All @@ -387,7 +391,9 @@ def test_deletion_queue_recovery(
RemoteStorageKind.MOCK_S3,
)
neon_env_builder.num_pageservers = 2
env = neon_env_builder.init_start(initial_tenant_conf=TENANT_CONF)
tenant_conf = TENANT_CONF
tenant_conf["compaction_algorithm"] = f'{{"kind": "{compaction_algorithm.value}"}}'
env = neon_env_builder.init_start(initial_tenant_conf=tenant_conf)

attached_to_id = env.storage_controller.locate(env.initial_tenant)[0]["node_id"]
main_pageserver = env.get_pageserver(attached_to_id)
Expand Down

0 comments on commit 297cd5f

Please sign in to comment.