|
34 | 34 | from pytest_simcore.helpers.monkeypatch_envs import EnvVarsDict, setenvs_from_dict |
35 | 35 | from servicelib.fastapi.long_running_tasks.client import Client, periodic_task_result |
36 | 36 | from servicelib.fastapi.long_running_tasks.client import setup as client_setup |
| 37 | +from servicelib.long_running_tasks.errors import TaskExceptionError |
37 | 38 | from servicelib.long_running_tasks.models import TaskId |
38 | 39 | from simcore_service_dynamic_sidecar._meta import API_VTAG |
39 | 40 | from simcore_service_dynamic_sidecar.core.docker_utils import get_container_states |
@@ -258,7 +259,7 @@ async def test_user_services_fail_to_start( |
258 | 259 | with_compose_down: bool, |
259 | 260 | mock_user_services_fail_to_start: None, |
260 | 261 | ): |
261 | | - with pytest.raises(RuntimeError): |
| 262 | + with pytest.raises(TaskExceptionError): |
262 | 263 | async with periodic_task_result( |
263 | 264 | client=client, |
264 | 265 | task_id=await _get_task_id_create_service_containers( |
@@ -314,7 +315,7 @@ async def test_user_services_fail_to_stop_or_save_data( |
314 | 315 | # in case of manual intervention multiple stops will be sent |
315 | 316 | _EXPECTED_STOP_MESSAGES = 4 |
316 | 317 | for _ in range(_EXPECTED_STOP_MESSAGES): |
317 | | - with pytest.raises(RuntimeError): |
| 318 | + with pytest.raises(TaskExceptionError): |
318 | 319 | async with periodic_task_result( |
319 | 320 | client=client, |
320 | 321 | task_id=await _get_task_id_docker_compose_down(httpx_async_client), |
|
0 commit comments