From f66a65d6ca59c4b8307a1ff2e659ff847b8074ae Mon Sep 17 00:00:00 2001 From: Ken Hibino Date: Thu, 16 Jan 2020 21:01:27 -0800 Subject: [PATCH] Fix tests --- background_test.go | 5 ++--- client_test.go | 5 ++++- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/background_test.go b/background_test.go index 03e32e8..2acebbc 100644 --- a/background_test.go +++ b/background_test.go @@ -8,7 +8,6 @@ import ( "testing" "time" - "github.com/go-redis/redis/v7" "github.com/google/go-cmp/cmp" "go.uber.org/goleak" ) @@ -18,10 +17,10 @@ func TestBackground(t *testing.T) { ignoreOpt := goleak.IgnoreTopFunction("github.com/go-redis/redis/v7/internal/pool.(*ConnPool).reaper") defer goleak.VerifyNoLeaks(t, ignoreOpt) - r := redis.NewClient(&redis.Options{ + r := &RedisClientOpt{ Addr: "localhost:6379", DB: 15, - }) + } client := NewClient(r) bg := NewBackground(r, &Config{ Concurrency: 10, diff --git a/client_test.go b/client_test.go index 73c9190..7024f5d 100644 --- a/client_test.go +++ b/client_test.go @@ -15,7 +15,10 @@ import ( func TestClient(t *testing.T) { r := setup(t) - client := NewClient(r) + client := NewClient(&RedisClientOpt{ + Addr: "localhost:6379", + DB: 14, + }) task := NewTask("send_email", map[string]interface{}{"to": "customer@gmail.com", "from": "merchant@example.com"})