Skip to content

Commit fd3814d

Browse files
author
Andrei Neagu
committed
copilot
1 parent a13cf50 commit fd3814d

File tree

8 files changed

+12
-13
lines changed

8 files changed

+12
-13
lines changed

packages/pytest-simcore/src/pytest_simcore/long_running_tasks.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ async def wrapper(*func_args, **func_kwargs):
2020

2121

2222
@pytest.fixture
23-
def uese_in_memory_lonng_running_tasks(mocker: MockerFixture) -> None:
23+
def use_in_memory_long_running_tasks(mocker: MockerFixture) -> None:
2424
mocker.patch.object(task, "RedisStore", InMemoryStore)
2525
# for testing the exclsive is not required so it's disabled
2626
mocker.patch.object(task, "exclusive", _mock_decorator_with_args)

packages/service-library/src/servicelib/redis/_client.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@ def __post_init__(self) -> None:
5959
decode_responses=self.decode_responses,
6060
client_name=self.client_name,
6161
)
62-
# NOTE: connection is done here already
6362
self._is_healthy = False
6463
self._health_check_task_started_event = asyncio.Event()
6564

@@ -78,7 +77,7 @@ async def _periodic_check_health() -> None:
7877
# NOTE: this achieves 2 very important things:
7978
# - ensure redis is working
8079
# - before shutting down an initialized Redis connection it must
81-
# make at least one call to the servicer, otherwise tests might hang
80+
# make at least one call to the server, otherwise tests might hang
8281
await self.ping()
8382

8483
_logger.info(

packages/service-library/tests/deferred_tasks/test__base_deferred_handler.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ class MockKeys(StrAutoEnum):
4343
GET_TIMEOUT = auto()
4444
START_DEFERRED = auto()
4545
ON_DEFERRED_CREATED = auto()
46-
RUN_DEFERRED_BEFORE_HADNLER = auto()
46+
RUN_DEFERRED_BEFORE_HANDLER = auto()
4747
RUN_DEFERRED_AFTER_HANDLER = auto()
4848
ON_DEFERRED_RESULT = auto()
4949
ON_FINISHED_WITH_ERROR = auto()
@@ -124,7 +124,7 @@ async def on_created(
124124

125125
@classmethod
126126
async def run(cls, context: DeferredContext) -> Any:
127-
mocks[MockKeys.RUN_DEFERRED_BEFORE_HADNLER](context)
127+
mocks[MockKeys.RUN_DEFERRED_BEFORE_HANDLER](context)
128128
result = await run(context)
129129
mocks[MockKeys.RUN_DEFERRED_AFTER_HANDLER](context)
130130
return result
@@ -322,7 +322,7 @@ async def _run_to_cancel(_: DeferredContext) -> None:
322322
await _assert_mock_call(mocks, key=MockKeys.ON_DEFERRED_CREATED, count=1)
323323
task_uid = TaskUID(mocks[MockKeys.ON_DEFERRED_CREATED].call_args_list[0].args[0])
324324

325-
await _assert_mock_call(mocks, key=MockKeys.RUN_DEFERRED_BEFORE_HADNLER, count=1)
325+
await _assert_mock_call(mocks, key=MockKeys.RUN_DEFERRED_BEFORE_HANDLER, count=1)
326326
await mocked_deferred_handler.cancel(task_uid)
327327

328328
await _assert_mock_call(mocks, key=MockKeys.ON_FINISHED_WITH_ERROR, count=0)

services/director-v2/tests/unit/test_api_route_dynamic_scheduler.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727

2828
@pytest.fixture
2929
def mock_env(
30-
uese_in_memory_lonng_running_tasks: None,
30+
use_in_memory_long_running_tasks: None,
3131
mock_exclusive: None,
3232
disable_rabbitmq: None,
3333
disable_postgres: None,

services/director-v2/tests/unit/test_modules_dynamic_sidecar_scheduler.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ async def _assert_get_dynamic_services_mocked(
124124

125125
@pytest.fixture
126126
def mock_env(
127-
uese_in_memory_lonng_running_tasks: None,
127+
use_in_memory_long_running_tasks: None,
128128
mock_exclusive: None,
129129
disable_postgres: None,
130130
disable_rabbitmq: None,

services/director-v2/tests/unit/test_modules_dynamic_sidecar_scheduler_task.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343

4444
@pytest.fixture
4545
def mock_env(
46-
uese_in_memory_lonng_running_tasks: None,
46+
use_in_memory_long_running_tasks: None,
4747
disable_postgres: None,
4848
disable_rabbitmq: None,
4949
mock_env: EnvVarsDict,

services/dynamic-sidecar/tests/conftest.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ def mock_rabbit_check(mocker: MockerFixture) -> None:
169169

170170
@pytest.fixture
171171
def base_mock_envs(
172-
uese_in_memory_lonng_running_tasks: None,
172+
use_in_memory_long_running_tasks: None,
173173
dy_volumes: Path,
174174
shared_store_dir: Path,
175175
compose_namespace: str,
@@ -211,7 +211,7 @@ def base_mock_envs(
211211

212212
@pytest.fixture
213213
def mock_environment(
214-
uese_in_memory_lonng_running_tasks: None,
214+
use_in_memory_long_running_tasks: None,
215215
mock_storage_check: None,
216216
mock_postgres_check: None,
217217
mock_rabbit_check: None,

services/storage/src/simcore_service_storage/modules/long_running_tasks.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
from .._meta import API_VTAG
88
from ..core.settings import ApplicationSettings
99

10-
_LONG_RUNNING_TASKS_NAESPACE: Final[Namespace] = "storage"
10+
_LONG_RUNNING_TASKS_NAMESPACE: Final[Namespace] = "storage"
1111

1212

1313
def setup_rest_api_long_running_tasks_for_uploads(app: FastAPI) -> None:
@@ -16,5 +16,5 @@ def setup_rest_api_long_running_tasks_for_uploads(app: FastAPI) -> None:
1616
app,
1717
router_prefix=f"/{API_VTAG}/futures",
1818
redis_settings=settings.STORAGE_REDIS,
19-
namespace=_LONG_RUNNING_TASKS_NAESPACE,
19+
namespace=_LONG_RUNNING_TASKS_NAMESPACE,
2020
)

0 commit comments

Comments
 (0)