Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 14 additions & 5 deletions tests/contrib/openai_agents/test_openai.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@
from tests.contrib.openai_agents.research_agents.research_manager import (
ResearchManager,
)
from tests.helpers import assert_task_fail_eventually, new_worker
from tests.helpers import assert_eventually, assert_task_fail_eventually, new_worker
from tests.helpers.nexus import create_nexus_endpoint, make_nexus_endpoint_name


Expand Down Expand Up @@ -1751,10 +1751,19 @@ async def test_session(client: Client):
execution_timeout=timedelta(seconds=10.0),
retry_policy=RetryPolicy(maximum_attempts=1),
)
await assert_task_fail_eventually(
workflow_handle,
message_contains="Temporal workflows don't support SQLite sessions",
)

async def check():
async for evt in workflow_handle.fetch_history_events():
# Sometimes just creating the sqlite session takes too long for a workflow in CI, so check both
if evt.HasField("workflow_task_failed_event_attributes") and (
"Temporal workflows don't support SQLite sessions"
in evt.workflow_task_failed_event_attributes.failure.message
or "Potential deadlock detected"
in evt.workflow_task_failed_event_attributes.failure.message
):
return

await assert_eventually(check)


async def test_lite_llm(client: Client, env: WorkflowEnvironment):
Expand Down