Skip to content

Commit

Permalink
Disable mem cache during API integration test (#4001)
Browse files Browse the repository at this point in the history
disable mem cache during api integration test
  • Loading branch information
eunwoosh authored Oct 8, 2024
1 parent d851151 commit db2eaa0
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions tests/integration/api/conftest.py
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit db2eaa0

Please # to comment.