Skip to content

Commit

Permalink
tests: ability to use arbitrary type for scale tests
Browse files Browse the repository at this point in the history
in favor of:
3cc67d6
  • Loading branch information
gousteris committed Mar 15, 2023
1 parent a25371c commit c53c678
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 8 deletions.
3 changes: 2 additions & 1 deletion tests/rptest/scale_tests/cloud_storage_compaction_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,8 @@ def _setup_read_replica(self):
"Cannot validate Kafka record batch. Missmatching CRC",
"batch has invalid CRC"
])
@matrix(cloud_storage_type=get_cloud_storage_type())
@matrix(
cloud_storage_type=get_cloud_storage_type(docker_use_arbitrary=True))
def test_read_from_replica(self, cloud_storage_type):
self.start_workload()
self.start_consumer(num_nodes=2,
Expand Down
3 changes: 2 additions & 1 deletion tests/rptest/scale_tests/extreme_recovery_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,8 @@ def tearDown(self):
super(ExtremeRecoveryTest, self).tearDown()

@cluster(num_nodes=8, log_allow_list=TRANSIENT_ERRORS)
@matrix(cloud_storage_type=get_cloud_storage_type())
@matrix(
cloud_storage_type=get_cloud_storage_type(docker_use_arbitrary=True))
def test_recovery_scale(self, cloud_storage_type):
# This test requires dedicated system resources
assert self.redpanda.dedicated_nodes
Expand Down
6 changes: 4 additions & 2 deletions tests/rptest/scale_tests/franz_go_verifiable_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -226,12 +226,14 @@ def with_timeboxed(self):

class KgoVerifierWithSiTestLargeSegments(KgoVerifierWithSiTest):
@cluster(num_nodes=4, log_allow_list=KGO_LOG_ALLOW_LIST)
@matrix(cloud_storage_type=get_cloud_storage_type())
@matrix(
cloud_storage_type=get_cloud_storage_type(docker_use_arbitrary=True))
def test_si_without_timeboxed(self, cloud_storage_type):
self.without_timeboxed()

@cluster(num_nodes=4, log_allow_list=KGO_RESTART_LOG_ALLOW_LIST)
@matrix(cloud_storage_type=get_cloud_storage_type())
@matrix(
cloud_storage_type=get_cloud_storage_type(docker_use_arbitrary=True))
def test_si_with_timeboxed(self, cloud_storage_type):
self.with_timeboxed()

Expand Down
14 changes: 10 additions & 4 deletions tests/rptest/services/redpanda.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,8 @@ def one_or_many(value):
return value


def get_cloud_storage_type(applies_only_on: list(CloudStorageType) = None):
def get_cloud_storage_type(applies_only_on: list(CloudStorageType) = None,
docker_use_arbitrary=False):
"""
Returns a list(CloudStorageType) based on the "CLOUD_PROVIDER"
environment variable. For example:
Expand All @@ -182,16 +183,21 @@ def get_cloud_storage_type(applies_only_on: list(CloudStorageType) = None):
test.
If it's set the function will return the inresection
of:
* <cloud_storage_type>: discovered based on the CLOUD_PROVIDER env
* <applies_only_on>: param provided
* <cloud_storage_type>: discovered based on the CLOUD_PROVIDER env
* <applies_only_on>: param provided
:param docker_use_arbitrary: optional bool to use arbitrary backend when
the cloud provider is docker.
"""

if applies_only_on is None:
applies_only_on = []

cloud_provider = os.getenv("CLOUD_PROVIDER", "docker")
if cloud_provider == "docker":
cloud_storage_type = [CloudStorageType.S3, CloudStorageType.ABS]
if docker_use_arbitrary:
cloud_storage_type = [CloudStorageType.S3]
else:
cloud_storage_type = [CloudStorageType.S3, CloudStorageType.ABS]
elif cloud_provider in ("aws", "gcp"):
cloud_storage_type = [CloudStorageType.S3]
elif cloud_provider == "azure":
Expand Down

0 comments on commit c53c678

Please sign in to comment.