[#332] Remove files for heavy failover test
Some checks failed
DCO check / DCO (pull_request) Has been cancelled
Some checks failed
DCO check / DCO (pull_request) Has been cancelled
Signed-off-by: a.berezin <a.berezin@yadro.com>
This commit is contained in:
parent
b999d7cf9b
commit
b268e613ed
1 changed files with 11 additions and 2 deletions
|
@ -101,12 +101,21 @@ class TestFailoverServer(ClusterTestBase):
|
|||
sizes = sizes_samples + random.choices(sizes_samples, weights=sizes_weights, k=object_count - samples_count)
|
||||
|
||||
results = parallel(
|
||||
[container.generate_object for _ in sizes for container in containers],
|
||||
size=itertools.cycle([size.value for size in sizes]),
|
||||
[self._generate_files_and_remove_physical_copy for _ in containers],
|
||||
container=itertools.cycle(containers),
|
||||
size=itertools.cycle(sizes),
|
||||
)
|
||||
|
||||
return [result.result() for result in results]
|
||||
|
||||
def _generate_files_and_remove_physical_copy(self, container: StorageContainer, size: ObjectSize) -> StorageObjectInfo:
|
||||
storage_object = container.generate_object(size.value)
|
||||
|
||||
# Deliberately remove physical copy of the file for this test since it can generate multibytes of test objects
|
||||
os.remove(storage_object.file_path)
|
||||
|
||||
return storage_object
|
||||
|
||||
@allure.title("[Test] Create objects and get nodes with object")
|
||||
@pytest.fixture()
|
||||
def object_and_nodes(self, simple_object_size: ObjectSize, container: StorageContainer) -> tuple[StorageObjectInfo, list[ClusterNode]]:
|
||||
|
|
Loading…
Reference in a new issue