From ddf1339adbfa1727b552fdddbf09b7b3eebe1a74 Mon Sep 17 00:00:00 2001 From: Karolina Rogowska Date: Thu, 3 Feb 2022 15:53:34 +0100 Subject: [PATCH] fix for test_ioclass_id_as_condition need to add delay before io - CAS not being able to resolve directory to inode so quickly https://github.com/Open-CAS/open-cas-linux/issues/1046 Signed-off-by: Karolina Rogowska --- test/functional/tests/io_class/test_io_classification.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/test/functional/tests/io_class/test_io_classification.py b/test/functional/tests/io_class/test_io_classification.py index a54481f..d2516b7 100644 --- a/test/functional/tests/io_class/test_io_classification.py +++ b/test/functional/tests/io_class/test_io_classification.py @@ -4,6 +4,7 @@ # import random +import time from itertools import permutations import pytest @@ -444,6 +445,8 @@ def test_ioclass_id_as_condition(filesystem): ioclass_config_path=ioclass_config_path, ) casadm.load_io_classes(cache_id=cache.cache_id, file=ioclass_config_path) + # CAS needs some time to resolve directory to inode + time.sleep(ioclass_config.MAX_CLASSIFICATION_DELAY.seconds) with TestRun.step(f"Prepare {filesystem.name} filesystem " f"and mount {core.path} at {mountpoint}."): @@ -451,6 +454,8 @@ def test_ioclass_id_as_condition(filesystem): core.mount(mountpoint) fs_utils.create_directory(base_dir_path) sync() + # CAS needs some time to resolve directory to inode + time.sleep(ioclass_config.MAX_CLASSIFICATION_DELAY.seconds) with TestRun.step("Run IO fulfilling IO class 1 condition (and not IO class 2) and check if " "it is classified properly."):