@@ -174,11 +174,11 @@ func BackendTest(t *testing.T, setup func(options ...backend.BackendOption) Test
174
174
require .NotNil (t , tk )
175
175
176
176
// Complete workflow task
177
- err = b .CompleteWorkflowTask (ctx , tk , wfi , core .WorkflowInstanceStateActive , tk .NewEvents , []* history.Event {}, []* history.Event {}, []history.WorkflowEvent {})
177
+ err = b .CompleteWorkflowTask (ctx , tk , wfi , core .WorkflowInstanceStateActive , tk .NewEvents , []* history.Event {}, []* history.Event {}, []* history.WorkflowEvent {})
178
178
require .NoError (t , err )
179
179
180
180
// Task is already completed, this should error
181
- err = b .CompleteWorkflowTask (ctx , tk , wfi , core .WorkflowInstanceStateActive , tk .NewEvents , []* history.Event {}, []* history.Event {}, []history.WorkflowEvent {})
181
+ err = b .CompleteWorkflowTask (ctx , tk , wfi , core .WorkflowInstanceStateActive , tk .NewEvents , []* history.Event {}, []* history.Event {}, []* history.WorkflowEvent {})
182
182
require .Error (t , err )
183
183
},
184
184
},
@@ -212,7 +212,7 @@ func BackendTest(t *testing.T, setup func(options ...backend.BackendOption) Test
212
212
activityScheduledEvent ,
213
213
}
214
214
215
- workflowEvents := []history.WorkflowEvent {}
215
+ workflowEvents := []* history.WorkflowEvent {}
216
216
217
217
err = b .CompleteWorkflowTask (ctx , task , wfi , core .WorkflowInstanceStateActive , events , activityEvents , []* history.Event {}, workflowEvents )
218
218
require .NoError (t , err )
@@ -257,7 +257,7 @@ func BackendTest(t *testing.T, setup func(options ...backend.BackendOption) Test
257
257
events [i ].SequenceID = sequenceID
258
258
}
259
259
260
- err = b .CompleteWorkflowTask (ctx , task , wfi , core .WorkflowInstanceStateFinished , events , []* history.Event {}, []* history.Event {}, []history.WorkflowEvent {})
260
+ err = b .CompleteWorkflowTask (ctx , task , wfi , core .WorkflowInstanceStateFinished , events , []* history.Event {}, []* history.Event {}, []* history.WorkflowEvent {})
261
261
require .NoError (t , err )
262
262
263
263
time .Sleep (time .Second )
@@ -285,7 +285,7 @@ func BackendTest(t *testing.T, setup func(options ...backend.BackendOption) Test
285
285
// Simulate context and sub-workflow cancellation
286
286
task , err := b .GetWorkflowTask (ctx )
287
287
require .NoError (t , err )
288
- err = b .CompleteWorkflowTask (ctx , task , instance , core .WorkflowInstanceStateActive , task .NewEvents , []* history.Event {}, []* history.Event {}, []history.WorkflowEvent {
288
+ err = b .CompleteWorkflowTask (ctx , task , instance , core .WorkflowInstanceStateActive , task .NewEvents , []* history.Event {}, []* history.Event {}, []* history.WorkflowEvent {
289
289
{
290
290
WorkflowInstance : subInstance1 ,
291
291
HistoryEvent : history .NewHistoryEvent (1 , time .Now (), history .EventType_WorkflowExecutionCanceled , & history.SubWorkflowCancellationRequestedAttributes {
@@ -374,6 +374,6 @@ func startWorkflow(t *testing.T, ctx context.Context, b backend.Backend, c *clie
374
374
require .NoError (t , err )
375
375
376
376
err = b .CompleteWorkflowTask (
377
- ctx , task , instance , core .WorkflowInstanceStateActive , task .NewEvents , []* history.Event {}, []* history.Event {}, []history.WorkflowEvent {})
377
+ ctx , task , instance , core .WorkflowInstanceStateActive , task .NewEvents , []* history.Event {}, []* history.Event {}, []* history.WorkflowEvent {})
378
378
require .NoError (t , err )
379
379
}
0 commit comments