diff --git a/test/functional/api/cas/cache.py b/test/functional/api/cas/cache.py index eb0ab27f4..6fd4aa94e 100644 --- a/test/functional/api/cas/cache.py +++ b/test/functional/api/cas/cache.py @@ -177,8 +177,7 @@ def set_params_alru(self, alru_params: FlushParametersAlru): if alru_params.staleness_time else None, alru_params.flush_max_buffers if alru_params.flush_max_buffers else None, - int(alru_params.activity_threshold.total_seconds() - * 1000) + alru_params.activity_threshold.total_milliseconds() if alru_params.activity_threshold else None) def get_cache_config(self): diff --git a/test/functional/api/cas/cache_config.py b/test/functional/api/cas/cache_config.py index 2af69aff7..0908cb918 100644 --- a/test/functional/api/cas/cache_config.py +++ b/test/functional/api/cas/cache_config.py @@ -6,7 +6,7 @@ from enum import IntEnum from aenum import Enum from test_utils.size import Size, Unit -from datetime import timedelta +from attotime import attotimedelta class CacheLineSize(Enum): @@ -79,7 +79,7 @@ class CacheStatus(Enum): incomplete = 5 -class Time(timedelta): +class Time(attotimedelta): def total_milliseconds(self): return int(self.total_seconds() * 1000) diff --git a/test/functional/requirements.txt b/test/functional/requirements.txt new file mode 100644 index 000000000..4e9f19744 --- /dev/null +++ b/test/functional/requirements.txt @@ -0,0 +1 @@ +attotime>=0.2.0