mirror of
https://github.com/redis/go-redis.git
synced 2025-08-08 23:42:06 +03:00
Fix WithContext race
This commit is contained in:
@@ -2,6 +2,7 @@ package redis_test
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"context"
|
||||
"fmt"
|
||||
"net"
|
||||
"strconv"
|
||||
@@ -283,6 +284,13 @@ var _ = Describe("races", func() {
|
||||
wg.Wait()
|
||||
Expect(received).To(Equal(uint32(C * N)))
|
||||
})
|
||||
|
||||
It("should WithContext", func() {
|
||||
perform(C, func(_ int) {
|
||||
err := client.WithContext(context.Background()).Ping().Err()
|
||||
Expect(err).NotTo(HaveOccurred())
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
var _ = Describe("cluster races", func() {
|
||||
|
Reference in New Issue
Block a user