Skip to content

Commit a1297b1

Browse files
committed
test fix
1 parent f15ec1c commit a1297b1

1 file changed

Lines changed: 11 additions & 3 deletions

File tree

tests/expense/test_expense_workflow.py

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -362,10 +362,18 @@ async def register_decision_timeout_check(expense_id: str) -> None:
362362
# Check that we're called with 10 minute timeout
363363
activity_info = activity.info()
364364
timeout_calls.append(("wait", activity_info.start_to_close_timeout))
365-
# Simulate automatic decision if one was scheduled
365+
# In time-skipping mode, send the decision immediately
366366
if expense_id in mock_ui.scheduled_decisions:
367-
# Decision will be sent by the scheduled task
368-
pass
367+
decision = mock_ui.scheduled_decisions[expense_id]
368+
if expense_id in mock_ui.workflow_map:
369+
workflow_id = mock_ui.workflow_map[expense_id]
370+
handle = client.get_workflow_handle(workflow_id)
371+
try:
372+
# Send signal immediately when registering
373+
await handle.signal("expense_decision_signal", decision)
374+
except Exception:
375+
# Ignore errors in time-skipping mode
376+
pass
369377
return None
370378

371379
return register_decision_timeout_check

0 commit comments

Comments
 (0)