diff --git a/server_test.go b/server_test.go index 9a68c8c..cfbf239 100644 --- a/server_test.go +++ b/server_test.go @@ -14,9 +14,14 @@ import ( "github.com/hibiken/asynq/internal/rdb" "github.com/hibiken/asynq/internal/testbroker" "github.com/hibiken/asynq/internal/testutil" + "go.uber.org/goleak" ) func TestServer(t *testing.T) { + // https://github.com/go-redis/redis/issues/1029 + ignoreOpt := goleak.IgnoreTopFunction("github.com/go-redis/redis/v8/internal/pool.(*ConnPool).reaper") + defer goleak.VerifyNone(t, ignoreOpt) + redisConnOpt := getRedisConnOpt(t) c := NewClient(redisConnOpt) defer c.Close() @@ -49,6 +54,10 @@ func TestServer(t *testing.T) { } func TestServerRun(t *testing.T) { + // https://github.com/go-redis/redis/issues/1029 + ignoreOpt := goleak.IgnoreTopFunction("github.com/go-redis/redis/v8/internal/pool.(*ConnPool).reaper") + defer goleak.VerifyNone(t, ignoreOpt) + srv := NewServer(RedisClientOpt{Addr: ":6379"}, Config{LogLevel: testLogLevel}) done := make(chan struct{})