tests: Fix test_flush_over_640_gibibytes_with_fs

4h timeout for copying and calculating crc

Signed-off-by: Michal Mielewczyk <michal.mielewczyk@huawei.com>
This commit is contained in:
Michal Mielewczyk 2024-10-03 08:49:44 +02:00
parent f2f98226d8
commit c41d5d7176

View File

@ -86,10 +86,12 @@ def test_flush_over_640_gibibytes_with_fs(cache_mode, fs):
with TestRun.step("Validate test file and read its crc32 sum."): with TestRun.step("Validate test file and read its crc32 sum."):
if test_file_main.size != file_size: if test_file_main.size != file_size:
TestRun.fail("Created test file hasn't reached its target size.") TestRun.fail("Created test file hasn't reached its target size.")
test_file_crc32sum_main = test_file_main.crc32sum() test_file_crc32sum_main = test_file_main.crc32sum(timeout=timedelta(hours=4))
with TestRun.step("Write data to exported object."): with TestRun.step("Write data to exported object."):
test_file_copy = test_file_main.copy(mnt_point + "test_file_copy") test_file_copy = test_file_main.copy(
mnt_point + "test_file_copy", timeout=timedelta(hours=4)
)
test_file_copy.refresh_item() test_file_copy.refresh_item()
sync() sync()
@ -107,7 +109,7 @@ def test_flush_over_640_gibibytes_with_fs(cache_mode, fs):
with TestRun.step("Mount core device and check crc32 sum of test file copy."): with TestRun.step("Mount core device and check crc32 sum of test file copy."):
core_dev.mount(mnt_point) core_dev.mount(mnt_point)
if test_file_crc32sum_main != test_file_copy.crc32sum(): if test_file_crc32sum_main != test_file_copy.crc32sum(timeout=timedelta(hours=4)):
TestRun.LOGGER.error("Md5 sums should be equal.") TestRun.LOGGER.error("Md5 sums should be equal.")
with TestRun.step("Delete test files."): with TestRun.step("Delete test files."):