mirror of
https://github.com/redis/go-redis.git
synced 2025-06-14 01:21:30 +03:00
Use net.Conn instead of io.ReadWriteCloser.
This commit is contained in:
@ -3,7 +3,6 @@ package redis_test
|
||||
import (
|
||||
"bytes"
|
||||
"fmt"
|
||||
"io"
|
||||
"net"
|
||||
"runtime"
|
||||
"sort"
|
||||
@ -41,7 +40,7 @@ func sortStrings(slice []string) []string {
|
||||
|
||||
func (t *RedisTest) SetUpTest(c *C) {
|
||||
if t.client == nil {
|
||||
openConn := func() (io.ReadWriteCloser, error) {
|
||||
openConn := func() (net.Conn, error) {
|
||||
t.openedConnCount++
|
||||
return net.Dial("tcp", redisAddr)
|
||||
}
|
||||
@ -49,7 +48,7 @@ func (t *RedisTest) SetUpTest(c *C) {
|
||||
t.initedConnCount++
|
||||
return nil
|
||||
}
|
||||
closeConn := func(conn io.ReadWriteCloser) error {
|
||||
closeConn := func(conn net.Conn) error {
|
||||
t.closedConnCount++
|
||||
return nil
|
||||
}
|
||||
|
Reference in New Issue
Block a user