Skip to content

Commit

Permalink
TESTS: fix tests on circleci
Browse files Browse the repository at this point in the history
I'm not sure why this makes a differnece but the tests pass now.
  • Loading branch information
cypriss committed Jul 28, 2016
1 parent 67c8dc2 commit 6a1594a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions dead_pool_reaper_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import (
func TestDeadPoolReaper(t *testing.T) {
pool := newTestPool(":6379")
ns := "work"
cleanKeyspace(ns, pool)

conn := pool.Get()
defer conn.Close()
Expand All @@ -18,7 +19,6 @@ func TestDeadPoolReaper(t *testing.T) {

// Create redis data
var err error
cleanKeyspace(ns, pool)
err = conn.Send("SADD", workerPoolsKey, "1")
assert.NoError(t, err)
err = conn.Send("SADD", workerPoolsKey, "2")
Expand Down Expand Up @@ -50,7 +50,7 @@ func TestDeadPoolReaper(t *testing.T) {
reaper := newDeadPoolReaper(ns, pool)
deadPools, err := reaper.findDeadPools()
assert.NoError(t, err)
assert.Equal(t, deadPools, map[string][]string{"2": {"type1", "type2"}, "3": {"type1", "type2"}})
assert.Equal(t, map[string][]string{"2": {"type1", "type2"}, "3": {"type1", "type2"}}, deadPools)

// Test requeueing jobs
_, err = conn.Do("lpush", redisKeyJobsInProgress(ns, "2", "type1"), "foo")
Expand Down Expand Up @@ -140,6 +140,7 @@ func TestDeadPoolReaperNoHeartbeat(t *testing.T) {
func TestDeadPoolReaperNoJobTypes(t *testing.T) {
pool := newTestPool(":6379")
ns := "work"
cleanKeyspace(ns, pool)

conn := pool.Get()
defer conn.Close()
Expand All @@ -148,7 +149,6 @@ func TestDeadPoolReaperNoJobTypes(t *testing.T) {

// Create redis data
var err error
cleanKeyspace(ns, pool)
err = conn.Send("SADD", workerPoolsKey, "1")
assert.NoError(t, err)
err = conn.Send("SADD", workerPoolsKey, "2")
Expand All @@ -172,7 +172,7 @@ func TestDeadPoolReaperNoJobTypes(t *testing.T) {
reaper := newDeadPoolReaper(ns, pool)
deadPools, err := reaper.findDeadPools()
assert.NoError(t, err)
assert.Equal(t, deadPools, map[string][]string{"2": {"type1", "type2"}})
assert.Equal(t, map[string][]string{"2": {"type1", "type2"}}, deadPools)

// Test requeueing jobs
_, err = conn.Do("lpush", redisKeyJobsInProgress(ns, "1", "type1"), "foo")
Expand Down

0 comments on commit 6a1594a

Please sign in to comment.