Skip to content

Commit 897ab25

Browse files
Merge branch 'main' into ci/migrate-tasks-to-poe
2 parents a1f559b + 42fe382 commit 897ab25

File tree

1 file changed

+14
-5
lines changed

1 file changed

+14
-5
lines changed

tests/contrib/openai_agents/test_openai.py

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@
108108
from tests.contrib.openai_agents.research_agents.research_manager import (
109109
ResearchManager,
110110
)
111-
from tests.helpers import assert_task_fail_eventually, new_worker
111+
from tests.helpers import assert_eventually, assert_task_fail_eventually, new_worker
112112
from tests.helpers.nexus import create_nexus_endpoint, make_nexus_endpoint_name
113113

114114

@@ -1751,10 +1751,19 @@ async def test_session(client: Client):
17511751
execution_timeout=timedelta(seconds=10.0),
17521752
retry_policy=RetryPolicy(maximum_attempts=1),
17531753
)
1754-
await assert_task_fail_eventually(
1755-
workflow_handle,
1756-
message_contains="Temporal workflows don't support SQLite sessions",
1757-
)
1754+
1755+
async def check():
1756+
async for evt in workflow_handle.fetch_history_events():
1757+
# Sometimes just creating the sqlite session takes too long for a workflow in CI, so check both
1758+
if evt.HasField("workflow_task_failed_event_attributes") and (
1759+
"Temporal workflows don't support SQLite sessions"
1760+
in evt.workflow_task_failed_event_attributes.failure.message
1761+
or "Potential deadlock detected"
1762+
in evt.workflow_task_failed_event_attributes.failure.message
1763+
):
1764+
return
1765+
1766+
await assert_eventually(check)
17581767

17591768

17601769
async def test_lite_llm(client: Client, env: WorkflowEnvironment):

0 commit comments

Comments
 (0)