Skip to content

Commit

Permalink
tests: restore ignore goleak.IgnoreTopFunction
Browse files Browse the repository at this point in the history
kamikazechaser authored and hibiken committed Apr 18, 2023
1 parent c72bfef commit 8b057b8
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions server_test.go
Original file line number Diff line number Diff line change
@@ -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{})

0 comments on commit 8b057b8

Please sign in to comment.