[test] Slightly more detailed info in a reclassification test
Signed-off-by: Daniel Madej <daniel.madej@intel.com>
This commit is contained in:
parent
a98f1ada2b
commit
f00d10dee9
@ -4,8 +4,10 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
import random
|
import random
|
||||||
import pytest
|
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
|
|
||||||
|
import pytest
|
||||||
|
|
||||||
from api.cas import ioclass_config, casadm
|
from api.cas import ioclass_config, casadm
|
||||||
from core.test_run import TestRun
|
from core.test_run import TestRun
|
||||||
from storage_devices.disk import DiskType, DiskTypeSet, DiskTypeLowerThan
|
from storage_devices.disk import DiskType, DiskTypeSet, DiskTypeLowerThan
|
||||||
@ -420,7 +422,11 @@ def read_files_with_reclassification_check(cache, target_ioclass_id: int, source
|
|||||||
files_to_reclassify.append(file)
|
files_to_reclassify.append(file)
|
||||||
if with_delay and time_from_start <= ioclass_config.MAX_CLASSIFICATION_DELAY:
|
if with_delay and time_from_start <= ioclass_config.MAX_CLASSIFICATION_DELAY:
|
||||||
continue
|
continue
|
||||||
TestRun.LOGGER.error("Target IO class occupancy not changed properly!")
|
TestRun.LOGGER.error(
|
||||||
|
"Target IO class occupancy not changed properly!\n"
|
||||||
|
f"Expected: {file.size + target_occupancy_before}\n"
|
||||||
|
f"Actual: {target_occupancy_after}"
|
||||||
|
)
|
||||||
elif target_occupancy_after > target_occupancy_before and with_delay:
|
elif target_occupancy_after > target_occupancy_before and with_delay:
|
||||||
files_to_reclassify.append(file)
|
files_to_reclassify.append(file)
|
||||||
|
|
||||||
@ -429,7 +435,11 @@ def read_files_with_reclassification_check(cache, target_ioclass_id: int, source
|
|||||||
files_to_reclassify.append(file)
|
files_to_reclassify.append(file)
|
||||||
if with_delay and time_from_start <= ioclass_config.MAX_CLASSIFICATION_DELAY:
|
if with_delay and time_from_start <= ioclass_config.MAX_CLASSIFICATION_DELAY:
|
||||||
continue
|
continue
|
||||||
TestRun.LOGGER.error("Source IO class occupancy not changed properly!")
|
TestRun.LOGGER.error(
|
||||||
|
"Source IO class occupancy not changed properly!\n"
|
||||||
|
f"Before: {source_occupancy_before}\n"
|
||||||
|
f"After: {source_occupancy_after}"
|
||||||
|
)
|
||||||
|
|
||||||
if len(files_to_reclassify):
|
if len(files_to_reclassify):
|
||||||
TestRun.LOGGER.info("Rereading unclassified test files...")
|
TestRun.LOGGER.info("Rereading unclassified test files...")
|
||||||
|
Loading…
Reference in New Issue
Block a user