@@ -207,7 +207,7 @@ func TestGoroutinePanic(t *testing.T) {
207
207
}
208
208
209
209
func TestHandleTimeout (t * testing.T ) {
210
- job := Job {
210
+ job := & Job {
211
211
Timeout : 100 * time .Millisecond ,
212
212
Payload : []byte ("foo" ),
213
213
}
@@ -222,7 +222,7 @@ func TestHandleTimeout(t *testing.T) {
222
222
assert .Error (t , err )
223
223
assert .Equal (t , context .DeadlineExceeded , err )
224
224
225
- job = Job {
225
+ job = & Job {
226
226
Timeout : 150 * time .Millisecond ,
227
227
Payload : []byte ("foo" ),
228
228
}
@@ -245,7 +245,7 @@ func TestHandleTimeout(t *testing.T) {
245
245
}
246
246
247
247
func TestJobComplete (t * testing.T ) {
248
- job := Job {
248
+ job := & Job {
249
249
Timeout : 100 * time .Millisecond ,
250
250
Payload : []byte ("foo" ),
251
251
}
@@ -259,7 +259,7 @@ func TestJobComplete(t *testing.T) {
259
259
assert .Error (t , err )
260
260
assert .Equal (t , errors .New ("job completed" ), err )
261
261
262
- job = Job {
262
+ job = & Job {
263
263
Timeout : 250 * time .Millisecond ,
264
264
Payload : []byte ("foo" ),
265
265
}
@@ -282,7 +282,7 @@ func TestJobComplete(t *testing.T) {
282
282
}
283
283
284
284
func TestTaskJobComplete (t * testing.T ) {
285
- job := Job {
285
+ job := & Job {
286
286
Timeout : 100 * time .Millisecond ,
287
287
Task : func (ctx context.Context ) error {
288
288
return errors .New ("job completed" )
@@ -294,7 +294,7 @@ func TestTaskJobComplete(t *testing.T) {
294
294
assert .Error (t , err )
295
295
assert .Equal (t , errors .New ("job completed" ), err )
296
296
297
- job = Job {
297
+ job = & Job {
298
298
Timeout : 250 * time .Millisecond ,
299
299
Task : func (ctx context.Context ) error {
300
300
return nil
@@ -311,7 +311,7 @@ func TestTaskJobComplete(t *testing.T) {
311
311
assert .NoError (t , err )
312
312
313
313
// job timeout
314
- job = Job {
314
+ job = & Job {
315
315
Timeout : 50 * time .Millisecond ,
316
316
Task : func (ctx context.Context ) error {
317
317
time .Sleep (60 * time .Millisecond )
0 commit comments