Skip to content

Commit f45d1be

Browse files
committed
3.9 compatibility
1 parent 98845c6 commit f45d1be

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

tests/nexus/test_workflow_caller_cancellation_types.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -242,10 +242,10 @@ async def _get_event_time(
242242
wf_handle: WorkflowHandle,
243243
event_type: EventType.ValueType,
244244
) -> datetime:
245-
event = await anext(
246-
e async for e in wf_handle.fetch_history_events() if e.event_type == event_type
247-
)
248-
return event.event_time.ToDatetime().replace(tzinfo=timezone.utc)
245+
async for event in wf_handle.fetch_history_events():
246+
if event.event_type == event_type:
247+
return event.event_time.ToDatetime().replace(tzinfo=timezone.utc)
248+
assert False, f"Event {event_type} not found in {wf_handle.id}"
249249

250250

251251
async def _assert_event_subsequence(

0 commit comments

Comments
 (0)