From d650baf5ae0b3b2e6635afdcbcba07c2b53ec1c1 Mon Sep 17 00:00:00 2001 From: Arseny Balobanov Date: Wed, 13 Apr 2022 23:11:00 +0300 Subject: [PATCH] [shopfront] Defer client closure. --- shopfront/shopfront_test.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/shopfront/shopfront_test.go b/shopfront/shopfront_test.go index d6fd5dd..bca110e 100644 --- a/shopfront/shopfront_test.go +++ b/shopfront/shopfront_test.go @@ -13,6 +13,7 @@ func TestShopfront(t *testing.T) { rdb := redis.NewClient(&redis.Options{ Addr: StartRedis(t), }) + defer func() { _ = rdb.Close() }() ctx := context.Background() @@ -48,6 +49,7 @@ func BenchmarkShopfront(b *testing.B) { rdb := redis.NewClient(&redis.Options{ Addr: StartRedis(b), }) + defer func() { _ = rdb.Close() }() ctx := context.Background() c := shopfront.New(rdb)