Skip to content

Commit

Permalink
Fix worker tests (gocraft#108)
Browse files Browse the repository at this point in the history
  • Loading branch information
David Long authored and shdunning committed Sep 6, 2018
1 parent 23b73b8 commit 5db65ca
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions worker_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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()
Expand Down Expand Up @@ -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()
Expand Down Expand Up @@ -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()
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 5db65ca

Please sign in to comment.