[shopfront] Defer client closure.
This commit is contained in:
parent
f137c78c9a
commit
d650baf5ae
1 changed files with 2 additions and 0 deletions
|
@ -13,6 +13,7 @@ func TestShopfront(t *testing.T) {
|
||||||
rdb := redis.NewClient(&redis.Options{
|
rdb := redis.NewClient(&redis.Options{
|
||||||
Addr: StartRedis(t),
|
Addr: StartRedis(t),
|
||||||
})
|
})
|
||||||
|
defer func() { _ = rdb.Close() }()
|
||||||
|
|
||||||
ctx := context.Background()
|
ctx := context.Background()
|
||||||
|
|
||||||
|
@ -48,6 +49,7 @@ func BenchmarkShopfront(b *testing.B) {
|
||||||
rdb := redis.NewClient(&redis.Options{
|
rdb := redis.NewClient(&redis.Options{
|
||||||
Addr: StartRedis(b),
|
Addr: StartRedis(b),
|
||||||
})
|
})
|
||||||
|
defer func() { _ = rdb.Close() }()
|
||||||
|
|
||||||
ctx := context.Background()
|
ctx := context.Background()
|
||||||
c := shopfront.New(rdb)
|
c := shopfront.New(rdb)
|
||||||
|
|
Loading…
Reference in a new issue