createTestTimer function
WorkflowTimer
createTestTimer(
- String timerId,
- String executionId, {
- String stepName = 'timer-step',
- String? fireAt,
- TimerStatus status = TimerStatus.pending,
Creates a WorkflowTimer with sensible defaults for testing.
Implementation
WorkflowTimer createTestTimer(
String timerId,
String executionId, {
String stepName = 'timer-step',
String? fireAt,
TimerStatus status = TimerStatus.pending,
}) {
final now = nowTimestamp();
return WorkflowTimer(
workflowTimerId: timerId,
workflowExecutionId: executionId,
stepName: stepName,
fireAt: fireAt ?? pastTimestamp(ago: const Duration(minutes: 1)),
status: status,
createdAt: now,
);
}