forked from scylladb/scylla-cluster-tests
-
Notifications
You must be signed in to change notification settings - Fork 0
/
longevity_operator_multi_tenant_test.py
38 lines (31 loc) · 1.46 KB
/
longevity_operator_multi_tenant_test.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#!/usr/bin/env python
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
#
# See LICENSE for more details.
#
# Copyright (c) 2022 ScyllaDB
from longevity_test import LongevityTest
from sdcm.utils.common import ParallelObject
from sdcm.utils.operator.multitenant_common import MultiTenantTestMixin
class LongevityOperatorMultiTenantTest(MultiTenantTestMixin, LongevityTest):
def test_custom_time(self):
def _run_test_on_one_tenant(tenant):
self.log.info("Longevity test for cluster %s with parameters: %s",
tenant.db_cluster, tenant.params)
tenant.test_custom_time()
self.log.info("Starting tests worker threads")
tenants_number = self.k8s_clusters[0].tenants_number
self.log.info("Clusters count: %s", tenants_number)
object_set = ParallelObject(
timeout=int(self.test_duration) * 60,
objects=[[tenant] for tenant in self.tenants],
num_workers=tenants_number,
)
object_set.run(func=_run_test_on_one_tenant, unpack_objects=True, ignore_exceptions=False)