Skip to content

Commit b478cd7

Browse files
committed
Schedule activities last when unit testing
1 parent 5f2c009 commit b478cd7

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

tester/tester.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -286,11 +286,6 @@ func (wt *workflowTester[TResult]) Execute(args ...interface{}) {
286286
}
287287
}
288288

289-
// Schedule activities
290-
for _, event := range result.ActivityEvents {
291-
wt.scheduleActivity(tw.instance, event)
292-
}
293-
294289
for _, workflowEvent := range result.WorkflowEvents {
295290
gotNewEvents = true
296291
wt.logger.Debug("Workflow event", "event_type", workflowEvent.HistoryEvent.Type)
@@ -310,6 +305,11 @@ func (wt *workflowTester[TResult]) Execute(args ...interface{}) {
310305

311306
wt.scheduleTimer(tw.instance, timerEvent)
312307
}
308+
309+
// Schedule activities
310+
for _, event := range result.ActivityEvents {
311+
wt.scheduleActivity(tw.instance, event)
312+
}
313313
}
314314

315315
for !wt.workflowFinished && !gotNewEvents {

0 commit comments

Comments
 (0)