306
}
307
309
>
numTasks := 20
310
>
timerTasks := s.AddRandomTasks(
311
>
tasks.CategoryTimer,
312
>
numTasks,
313
>
func(workflowKey definition.WorkflowKey, taskID int64, visibilityTimestamp time.Time) tasks.Task {
314
>
return &tasks.UserTimerTask{
315
>
WorkflowKey: workflowKey,
316
>
TaskID: taskID,
317
>
VisibilityTimestamp: visibilityTimestamp,
318
>
}
319
>
},
320
)
321
323
>
loadedTasks := s.PaginateTasks(
324
>
tasks.CategoryTimer,
325
>
inclusiveMinTaskKey,
326
>
exclusiveMaxTaskKey,
327
>
rand.Intn(len(timerTasks)*2)+1,
328
>
)
329
>
s.Equal(timerTasks, loadedTasks)
330
}
331