Skip to content

Commit

Permalink
TESTS: fix busted tests (gocraft#56)
Browse files Browse the repository at this point in the history
  • Loading branch information
shdunning committed Jul 12, 2017
1 parent f062583 commit e511e61
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions dead_pool_reaper_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,11 @@ func TestDeadPoolReaperNoHeartbeat(t *testing.T) {
err = conn.Flush()
assert.NoError(t, err)

// make sure test data was created
numPools, err := redis.Int(conn.Do("scard", workerPoolsKey))
assert.NoError(t, err)
assert.EqualValues(t, 3, numPools)

// Test getting dead pool ids
reaper := newDeadPoolReaper(ns, pool, []string{"type1"})
deadPools, err := reaper.findDeadPools()
Expand Down
2 changes: 1 addition & 1 deletion worker_pool_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ func TestWorkersPoolRunSingleThreaded(t *testing.T) {

// make sure we've enough jobs queued up to make an interesting test
jobsQueued := listSize(pool, redisKeyJobs(ns, job1))
assert.True(t, jobsQueued > 3, "should be at least 3 jobs queued up, but only found %v", jobsQueued)
assert.True(t, jobsQueued >= 3, "should be at least 3 jobs queued up, but only found %v", jobsQueued)

// now make sure the during the duration of job execution there is never > 1 job in flight
start := time.Now()
Expand Down

0 comments on commit e511e61

Please sign in to comment.