Skip to content

Commit 179eea6

Browse files
committed
fixing tests
1 parent c06d699 commit 179eea6

File tree

3 files changed

+4
-19
lines changed

3 files changed

+4
-19
lines changed

services/director-v2/tests/conftest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@
4343
"pytest_simcore.docker_registry",
4444
"pytest_simcore.docker_swarm",
4545
"pytest_simcore.environment_configs",
46+
"pytest_simcore.faker_products_data",
4647
"pytest_simcore.faker_projects_data",
4748
"pytest_simcore.faker_users_data",
4849
"pytest_simcore.minio_service",
@@ -355,7 +356,6 @@ async def wrapper(*args, **kwargs):
355356

356357
@pytest.fixture
357358
def mock_osparc_variables_api_auth_rpc(mocker: MockerFixture) -> None:
358-
359359
fake_data = ApiKeyGet.model_validate(ApiKeyGet.model_json_schema()["examples"][0])
360360

361361
async def _create(

services/director-v2/tests/unit/with_dbs/comp_scheduler/test_api_route_computations.py

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -363,11 +363,6 @@ def _mocked_get_pricing_unit(request, pricing_plan_id: int) -> httpx.Response:
363363
yield respx_mock
364364

365365

366-
@pytest.fixture
367-
def product_name(faker: Faker) -> str:
368-
return faker.name()
369-
370-
371366
@pytest.fixture
372367
def product_api_base_url(faker: Faker) -> AnyHttpUrl:
373368
return TypeAdapter(AnyHttpUrl).validate_python(faker.url())
@@ -911,7 +906,7 @@ async def test_get_computation_from_not_started_computation_task(
911906
node_states={
912907
t.node_id: NodeState(
913908
modified=True,
914-
currentStatus=RunningState.NOT_STARTED,
909+
current_status=RunningState.NOT_STARTED,
915910
progress=None,
916911
dependencies={
917912
NodeID(node)
@@ -983,7 +978,7 @@ async def test_get_computation_from_published_computation_task(
983978
node_states={
984979
t.node_id: NodeState(
985980
modified=True,
986-
currentStatus=RunningState.PUBLISHED,
981+
current_status=RunningState.PUBLISHED,
987982
dependencies={
988983
NodeID(node)
989984
for node, next_nodes in fake_workbench_adjacency.items()

services/web/server/tests/unit/with_dbs/04/notifications/test_notifications__db_comp_tasks_listening_task.py

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -304,9 +304,6 @@ async def _update_first_jupyter_task_output(
304304
) -> None:
305305
with log_context(logging.INFO, msg=f"Updating output {port_index + 1}"):
306306
async with sqlalchemy_async_engine.begin() as conn:
307-
# For JSON columns, we need to use jsonb_set or fetch-modify-update
308-
# Since it's JSON (not JSONB), let's use the safer fetch-modify approach
309-
# Use SELECT FOR UPDATE to lock the row for concurrent access
310307
result = await conn.execute(
311308
comp_tasks.select()
312309
.with_only_columns([comp_tasks.c.outputs])
@@ -326,13 +323,6 @@ async def _update_first_jupyter_task_output(
326323
.where(comp_tasks.c.task_id == first_jupyter_task["task_id"])
327324
)
328325

329-
# await asyncio.gather(
330-
# *(
331-
# _update_first_jupyter_task_output(i, {"data": i})
332-
# for i in range(number_of_inputs_linked)
333-
# )
334-
# )
335-
336326
@delayed_start(timedelta(seconds=2))
337327
async def _change_outputs_sequentially(sleep: float = 0.1) -> None:
338328
"""
@@ -383,6 +373,6 @@ async def _check_retrieve_rpc_called(expected_ports_retrieved: int) -> None:
383373
)
384374

385375
await _check_for_stability(_check_retrieve_rpc_called, number_of_inputs_linked)
386-
376+
await asyncio.wait_for(sequential_task, timeout=60)
387377
assert sequential_task.done(), "Sequential task did not complete"
388378
assert not sequential_task.cancelled(), "Sequential task was cancelled unexpectedly"

0 commit comments

Comments
 (0)