diff --git a/worker_test.go b/worker_test.go index 23fdb0f5..f1bddf77 100644 --- a/worker_test.go +++ b/worker_test.go @@ -61,7 +61,7 @@ func TestWorkerBasics(t *testing.T) { _, err = enqueuer.Enqueue(job3, Q{"a": 3}) assert.Nil(t, err) - w := newWorker(ns, "1", pool, tstCtxType, nil, jobTypes) + w := newWorker(ns, "1", pool, tstCtxType, nil, jobTypes, nil) w.start() w.drain() w.stop() @@ -111,7 +111,7 @@ func TestWorkerInProgress(t *testing.T) { _, err := enqueuer.Enqueue(job1, Q{"a": 1}) assert.Nil(t, err) - w := newWorker(ns, "1", pool, tstCtxType, nil, jobTypes) + w := newWorker(ns, "1", pool, tstCtxType, nil, jobTypes, nil) w.start() // instead of w.forceIter(), we'll wait for 10 milliseconds to let the job start @@ -162,7 +162,7 @@ func TestWorkerRetry(t *testing.T) { enqueuer := NewEnqueuer(ns, pool) _, err := enqueuer.Enqueue(job1, Q{"a": 1}) assert.Nil(t, err) - w := newWorker(ns, "1", pool, tstCtxType, nil, jobTypes) + w := newWorker(ns, "1", pool, tstCtxType, nil, jobTypes, nil) w.start() w.drain() w.stop() @@ -214,7 +214,7 @@ func TestWorkerRetryWithCustomBackoff(t *testing.T) { enqueuer := NewEnqueuer(ns, pool) _, err := enqueuer.Enqueue(job1, Q{"a": 1}) assert.Nil(t, err) - w := newWorker(ns, "1", pool, tstCtxType, nil, jobTypes) + w := newWorker(ns, "1", pool, tstCtxType, nil, jobTypes, nil) w.start() w.drain() w.stop() @@ -271,7 +271,7 @@ func TestWorkerDead(t *testing.T) { assert.Nil(t, err) _, err = enqueuer.Enqueue(job2, nil) assert.Nil(t, err) - w := newWorker(ns, "1", pool, tstCtxType, nil, jobTypes) + w := newWorker(ns, "1", pool, tstCtxType, nil, jobTypes, nil) w.start() w.drain() w.stop() @@ -324,7 +324,7 @@ func TestWorkersPaused(t *testing.T) { _, err := enqueuer.Enqueue(job1, Q{"a": 1}) assert.Nil(t, err) - w := newWorker(ns, "1", pool, tstCtxType, nil, jobTypes) + w := newWorker(ns, "1", pool, tstCtxType, nil, jobTypes, nil) // pause the jobs prior to starting err = pauseJobs(ns, job1, pool) assert.Nil(t, err)