@@ -20,7 +20,7 @@ func BackendTest(t *testing.T, setup func() backend.Backend, teardown func(b bac
20
20
f func (t * testing.T , ctx context.Context , b backend.Backend )
21
21
}{
22
22
{
23
- name : "Test_GetWorkflowTask_ReturnsNilWhenTimeout " ,
23
+ name : "GetWorkflowTask_ReturnsNilWhenTimeout " ,
24
24
f : func (t * testing.T , ctx context.Context , b backend.Backend ) {
25
25
ctx , cancel := context .WithTimeout (ctx , time .Millisecond )
26
26
defer cancel ()
@@ -30,7 +30,7 @@ func BackendTest(t *testing.T, setup func() backend.Backend, teardown func(b bac
30
30
},
31
31
},
32
32
{
33
- name : "Test_GetActivityTask_ReturnsNilWhenTimeout " ,
33
+ name : "GetActivityTask_ReturnsNilWhenTimeout " ,
34
34
f : func (t * testing.T , ctx context.Context , b backend.Backend ) {
35
35
ctx , cancel := context .WithTimeout (ctx , time .Millisecond )
36
36
defer cancel ()
@@ -40,7 +40,7 @@ func BackendTest(t *testing.T, setup func() backend.Backend, teardown func(b bac
40
40
},
41
41
},
42
42
{
43
- name : "Test_CreateWorkflowInstance_DoesNotError " ,
43
+ name : "CreateWorkflowInstance_DoesNotError " ,
44
44
f : func (t * testing.T , ctx context.Context , b backend.Backend ) {
45
45
instanceID := uuid .NewString ()
46
46
@@ -52,7 +52,7 @@ func BackendTest(t *testing.T, setup func() backend.Backend, teardown func(b bac
52
52
},
53
53
},
54
54
{
55
- name : "Test_CreateWorkflowInstance_SameInstanceIDErrors " ,
55
+ name : "CreateWorkflowInstance_SameInstanceIDErrors " ,
56
56
f : func (t * testing.T , ctx context.Context , b backend.Backend ) {
57
57
instanceID := uuid .NewString ()
58
58
executionID := uuid .NewString ()
@@ -71,7 +71,7 @@ func BackendTest(t *testing.T, setup func() backend.Backend, teardown func(b bac
71
71
},
72
72
},
73
73
{
74
- name : "Test_GetWorkflowTask_ReturnsTask " ,
74
+ name : "GetWorkflowTask_ReturnsTask " ,
75
75
f : func (t * testing.T , ctx context.Context , b backend.Backend ) {
76
76
wfi := core .NewWorkflowInstance (uuid .NewString (), uuid .NewString ())
77
77
err := b .CreateWorkflowInstance (ctx , history.WorkflowEvent {
@@ -88,7 +88,7 @@ func BackendTest(t *testing.T, setup func() backend.Backend, teardown func(b bac
88
88
},
89
89
},
90
90
{
91
- name : "Test_GetWorkflowTask_LocksTask " ,
91
+ name : "GetWorkflowTask_LocksTask " ,
92
92
f : func (t * testing.T , ctx context.Context , b backend.Backend ) {
93
93
wfi := core .NewWorkflowInstance (uuid .NewString (), uuid .NewString ())
94
94
err := b .CreateWorkflowInstance (ctx , history.WorkflowEvent {
@@ -113,7 +113,7 @@ func BackendTest(t *testing.T, setup func() backend.Backend, teardown func(b bac
113
113
},
114
114
},
115
115
{
116
- name : "Test_CompleteWorkflowTask_ReturnsErrorIfNotLocked " ,
116
+ name : "CompleteWorkflowTask_ReturnsErrorIfNotLocked " ,
117
117
f : func (t * testing.T , ctx context.Context , b backend.Backend ) {
118
118
wfi := core .NewWorkflowInstance (uuid .NewString (), uuid .NewString ())
119
119
err := b .CreateWorkflowInstance (ctx , history.WorkflowEvent {
@@ -128,7 +128,7 @@ func BackendTest(t *testing.T, setup func() backend.Backend, teardown func(b bac
128
128
},
129
129
},
130
130
{
131
- name : "Test_CompleteWorkflowTask_AddsNewEventsToHistory " ,
131
+ name : "CompleteWorkflowTask_AddsNewEventsToHistory " ,
132
132
f : func (t * testing.T , ctx context.Context , b backend.Backend ) {
133
133
startedEvent := history .NewHistoryEvent (time .Now (), history .EventType_WorkflowExecutionStarted , & history.ExecutionStartedAttributes {})
134
134
activityScheduledEvent := history .NewHistoryEvent (time .Now (), history .EventType_ActivityScheduled , & history.ActivityScheduledAttributes {}, history .ScheduleEventID (1 ))
@@ -188,6 +188,7 @@ func BackendTest(t *testing.T, setup func() backend.Backend, teardown func(b bac
188
188
c := client .New (b )
189
189
err := c .SignalWorkflow (ctx , "does-not-exist" , "signal" , "value" )
190
190
require .Error (t , err )
191
+ require .Equal (t , backend .ErrInstanceNotFound , err )
191
192
},
192
193
},
193
194
}
0 commit comments