Skip to content

Commit eafe9f4

Browse files
committed
Only cancel workflow timers
1 parent 6034491 commit eafe9f4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tester/tester.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -558,7 +558,7 @@ func (wt *workflowTester[TResult]) scheduleTimer(instance *core.WorkflowInstance
558558

559559
func (wt *workflowTester[TResult]) cancelTimer(instance *core.WorkflowInstance, event history.Event) {
560560
for i, t := range wt.timers {
561-
if t.Instance.InstanceID == instance.InstanceID && t.ScheduleEventID == event.ScheduleEventID {
561+
if t.Instance != nil && t.Instance.InstanceID == instance.InstanceID && t.ScheduleEventID == event.ScheduleEventID {
562562
wt.timers = append(wt.timers[:i], wt.timers[i+1:]...)
563563
break
564564
}

0 commit comments

Comments
 (0)