chore: apply pending code updates
This commit is contained in:
@@ -4,12 +4,15 @@ This test verifies that the /api/anime/add endpoint can handle
|
||||
multiple concurrent requests without blocking.
|
||||
"""
|
||||
import asyncio
|
||||
import logging
|
||||
import time
|
||||
from unittest.mock import AsyncMock, MagicMock, patch
|
||||
|
||||
import pytest
|
||||
from httpx import ASGITransport, AsyncClient
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
from src.server.fastapi_app import app
|
||||
from src.server.services.auth_service import auth_service
|
||||
from src.server.services.background_loader_service import get_background_loader_service
|
||||
@@ -103,7 +106,7 @@ async def test_concurrent_anime_add_requests(authenticated_client):
|
||||
f"indicating possible blocking issues"
|
||||
)
|
||||
|
||||
print(f"3 concurrent anime add requests completed in {total_time:.2f}s")
|
||||
logger.info("3 concurrent anime add requests completed in %.2fs", total_time)
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
@@ -130,4 +133,4 @@ async def test_same_anime_concurrent_add(authenticated_client):
|
||||
keys = [r.json().get("key") for r in responses]
|
||||
assert keys[0] == keys[1], "Both responses should have the same key"
|
||||
|
||||
print(f"Concurrent same-anime requests handled correctly: {statuses}")
|
||||
logger.info("Concurrent same-anime requests handled correctly: %s", statuses)
|
||||
|
||||
Reference in New Issue
Block a user