forked from TrueCloudLab/frostfs-testlib
1. Increase wait time for k6 teardown after stop signal 2. Remove duplicated code
Signed-off-by: Andrey Berezin <a.berezin@yadro.com>
This commit is contained in:
parent
32a8c5274a
commit
123b5425a8
9 changed files with 40 additions and 371 deletions
4
src/frostfs_testlib/storage/controllers/__init__.py
Normal file
4
src/frostfs_testlib/storage/controllers/__init__.py
Normal file
|
@ -0,0 +1,4 @@
|
|||
from frostfs_testlib.storage.controllers.background_load_controller import BackgroundLoadController
|
||||
from frostfs_testlib.storage.controllers.cluster_state_controller import ClusterStateController
|
||||
from frostfs_testlib.storage.controllers.disk_controller import DiskController, DiskInfo
|
||||
from frostfs_testlib.storage.controllers.shards_watcher import ShardsWatcher
|
|
@ -1,3 +1,5 @@
|
|||
import time
|
||||
|
||||
import frostfs_testlib.resources.optionals as optionals
|
||||
from frostfs_testlib.load.k6 import K6
|
||||
from frostfs_testlib.load.load_config import (
|
||||
|
@ -22,6 +24,7 @@ from frostfs_testlib.storage.cluster import ClusterNode
|
|||
from frostfs_testlib.storage.dataclasses.frostfs_services import S3Gate, StorageNode
|
||||
from frostfs_testlib.storage.dataclasses.wallet import WalletInfo
|
||||
from frostfs_testlib.testing.test_control import run_optionally
|
||||
from frostfs_testlib.utils import datetime_utils
|
||||
|
||||
reporter = get_reporter()
|
||||
|
||||
|
@ -57,7 +60,7 @@ class BackgroundLoadController:
|
|||
load_params.load_type, load_params.endpoint_selection_strategy
|
||||
)
|
||||
self.verification_params = LoadParams(
|
||||
clients=load_params.readers,
|
||||
verify_clients=load_params.verify_clients,
|
||||
scenario=LoadScenario.VERIFY,
|
||||
registry_file=load_params.registry_file,
|
||||
verify_time=load_params.verify_time,
|
||||
|
@ -156,6 +159,12 @@ class BackgroundLoadController:
|
|||
for k6_load_instance in self.k6_instances:
|
||||
k6_load_instance.start()
|
||||
|
||||
wait_after_start_time = datetime_utils.parse_time(self.load_params.setup_timeout) + 5
|
||||
with reporter.step(
|
||||
f"Wait for start timeout + couple more seconds ({wait_after_start_time}) before moving on"
|
||||
):
|
||||
time.sleep(wait_after_start_time)
|
||||
|
||||
@run_optionally(optionals.OPTIONAL_BACKGROUND_LOAD_ENABLED)
|
||||
@reporter.step_deco("Stop background load")
|
||||
def stop(self):
|
||||
|
@ -170,6 +179,7 @@ class BackgroundLoadController:
|
|||
|
||||
return True
|
||||
|
||||
@run_optionally(optionals.OPTIONAL_BACKGROUND_LOAD_ENABLED)
|
||||
def wait_until_finish(self):
|
||||
if self.load_params.load_time is None:
|
||||
raise RuntimeError("LoadTime should not be none")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue