From 6a1594af697cbe54806fff58e9d7b5e91e80fcc1 Mon Sep 17 00:00:00 2001 From: Jonathan Novak Date: Thu, 28 Jul 2016 12:39:50 -0700 Subject: [PATCH] TESTS: fix tests on circleci I'm not sure why this makes a differnece but the tests pass now. --- dead_pool_reaper_test.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/dead_pool_reaper_test.go b/dead_pool_reaper_test.go index f9fcd421..d23ba4fb 100644 --- a/dead_pool_reaper_test.go +++ b/dead_pool_reaper_test.go @@ -10,6 +10,7 @@ import ( func TestDeadPoolReaper(t *testing.T) { pool := newTestPool(":6379") ns := "work" + cleanKeyspace(ns, pool) conn := pool.Get() defer conn.Close() @@ -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") @@ -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") @@ -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() @@ -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") @@ -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")