Skip to content

Commit 169f617

Browse files
author
Andrei Neagu
committed
use in memory redis
1 parent 7860ae9 commit 169f617

File tree

2 files changed

+4
-12
lines changed

2 files changed

+4
-12
lines changed

packages/service-library/tests/fastapi/long_running_tasks/test_long_running_tasks.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,6 @@
4040
from tenacity.wait import wait_fixed
4141
from yarl import URL
4242

43-
pytest_simcore_core_services_selection = [
44-
"redis",
45-
]
46-
4743
ITEM_PUBLISH_SLEEP: Final[float] = 0.1
4844

4945

@@ -97,12 +93,12 @@ async def create_string_list_task(
9793

9894
@pytest.fixture
9995
async def app(
100-
server_routes: APIRouter, redis_service: RedisSettings
96+
server_routes: APIRouter, use_in_memory_redis: RedisSettings
10197
) -> AsyncIterator[FastAPI]:
10298
# overrides fastapi/conftest.py:app
10399
app = FastAPI(title="test app")
104100
app.include_router(server_routes)
105-
setup_server(app, redis_settings=redis_service, redis_namespace="test")
101+
setup_server(app, redis_settings=use_in_memory_redis, redis_namespace="test")
106102
setup_client(app)
107103
async with LifespanManager(app):
108104
yield app

packages/service-library/tests/fastapi/long_running_tasks/test_long_running_tasks_context_manager.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,6 @@
3030
from servicelib.long_running_tasks.task import TaskRegistry
3131
from settings_library.redis import RedisSettings
3232

33-
pytest_simcore_core_services_selection = [
34-
"redis",
35-
]
36-
3733
TASK_SLEEP_INTERVAL: Final[PositiveFloat] = 0.1
3834

3935
# UTILS
@@ -94,7 +90,7 @@ async def create_task_which_fails(
9490

9591
@pytest.fixture
9692
async def bg_task_app(
97-
user_routes: APIRouter, router_prefix: str, redis_service: RedisSettings
93+
user_routes: APIRouter, router_prefix: str, use_in_memory_redis: RedisSettings
9894
) -> AsyncIterable[FastAPI]:
9995
app = FastAPI()
10096

@@ -103,7 +99,7 @@ async def bg_task_app(
10399
setup_server(
104100
app,
105101
router_prefix=router_prefix,
106-
redis_settings=redis_service,
102+
redis_settings=use_in_memory_redis,
107103
redis_namespace="test",
108104
)
109105
setup_client(app, router_prefix=router_prefix)

0 commit comments

Comments
 (0)