mirror of
https://github.com/dograh-hq/dograh.git
synced 2026-07-01 08:59:46 +02:00
fix: fix tests
This commit is contained in:
parent
dfb9fd80d2
commit
a0e9b31b20
20 changed files with 94 additions and 74 deletions
|
|
@ -23,6 +23,7 @@ from pipecat.transports.base_transport import TransportParams
|
|||
from api.enums import WorkflowRunMode, WorkflowRunState
|
||||
from api.services.pipecat.audio_config import create_audio_config
|
||||
from api.services.pipecat.run_pipeline import _run_pipeline
|
||||
from api.services.pipecat.worker_runner import wait_for_pipeline_worker_started
|
||||
from api.tests.integrations._run_pipeline_helpers import (
|
||||
create_workflow_run_rows,
|
||||
patch_run_pipeline_externals,
|
||||
|
|
@ -116,7 +117,9 @@ async def test_run_pipeline_fires_initial_response_and_completes_run(
|
|||
run_task.result() # re-raise the failure
|
||||
assert captured_task, "create_pipeline_task was never invoked"
|
||||
pipeline_task = captured_task[0]
|
||||
await asyncio.wait_for(pipeline_task._pipeline_start_event.wait(), timeout=3.0)
|
||||
await wait_for_pipeline_worker_started(
|
||||
pipeline_task, timeout=3.0, run_task=run_task
|
||||
)
|
||||
# Let the initial response handler (set_node, queue LLMContextFrame)
|
||||
# complete before tearing things down.
|
||||
await asyncio.sleep(0.1)
|
||||
|
|
|
|||
|
|
@ -36,6 +36,7 @@ from pipecat.utils.time import time_now_iso8601
|
|||
from api.enums import WorkflowRunMode, WorkflowRunState
|
||||
from api.services.pipecat.audio_config import create_audio_config
|
||||
from api.services.pipecat.run_pipeline import _run_pipeline
|
||||
from api.services.pipecat.worker_runner import wait_for_pipeline_worker_started
|
||||
from api.tests.integrations._run_pipeline_helpers import (
|
||||
create_workflow_run_rows,
|
||||
patch_run_pipeline_externals,
|
||||
|
|
@ -186,8 +187,8 @@ async def _run_test_body(workflow_run_setup, db_session) -> None:
|
|||
assert captured_task, "create_pipeline_task was never invoked"
|
||||
pipeline_task = captured_task[0]
|
||||
|
||||
await asyncio.wait_for(
|
||||
pipeline_task._pipeline_start_event.wait(), timeout=3.0
|
||||
await wait_for_pipeline_worker_started(
|
||||
pipeline_task, timeout=3.0, run_task=run_task
|
||||
)
|
||||
|
||||
# Locate the assistant aggregator's LLM context (downstream of TTS).
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue