From db2eaa03c5263127caf38bc0786c5a7f1adc7573 Mon Sep 17 00:00:00 2001 From: Eunwoo Shin Date: Tue, 8 Oct 2024 20:50:36 +0900 Subject: [PATCH] Disable mem cache during API integration test (#4001) disable mem cache during api integration test --- tests/integration/api/conftest.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 tests/integration/api/conftest.py diff --git a/tests/integration/api/conftest.py b/tests/integration/api/conftest.py new file mode 100644 index 00000000000..da4ea08176f --- /dev/null +++ b/tests/integration/api/conftest.py @@ -0,0 +1,17 @@ +# Copyright (C) 2024 Intel Corporation +# SPDX-License-Identifier: Apache-2.0 +# +from __future__ import annotations + +import pytest +from otx.core.data.mem_cache import MemCacheHandlerSingleton + + +@pytest.fixture(autouse=True) +def fxt_disable_mem_cache(): + """Disable mem cache to reduce memory usage.""" + + original_mem_limit = MemCacheHandlerSingleton.CPU_MEM_LIMITS_GIB + MemCacheHandlerSingleton.CPU_MEM_LIMITS_GIB = 99999999 + yield + MemCacheHandlerSingleton.CPU_MEM_LIMITS_GIB = original_mem_limit