fix unit tests
This commit is contained in:
parent
407a953537
commit
d470615f78
@ -257,7 +257,7 @@ type directDial struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (d *directDial) connect(ctx context.Context, t *testing.T, port int, idx int) (*TimeoutConnection, error) {
|
func (d *directDial) connect(ctx context.Context, t *testing.T, port int, idx int) (*TimeoutConnection, error) {
|
||||||
conn, err := DialTimeoutConnectionEx("tcp", fmt.Sprintf("127.0.0.1:%d", port), time.Second, time.Second, time.Second, time.Second)
|
conn, err := DialTimeoutConnectionEx("tcp", fmt.Sprintf("127.0.0.1:%d", port), time.Second, time.Second, time.Second, time.Second, d.limit)
|
||||||
var ret *TimeoutConnection
|
var ret *TimeoutConnection
|
||||||
if conn != nil {
|
if conn != nil {
|
||||||
ret = conn.(*TimeoutConnection)
|
ret = conn.(*TimeoutConnection)
|
||||||
|
@ -180,7 +180,7 @@ func (cfg *connTimeoutTestConfig) dialerDial() (*TimeoutConnection, error) {
|
|||||||
|
|
||||||
// Dial a connection to the configured endpoint using a DialTimeoutConnectionEx
|
// Dial a connection to the configured endpoint using a DialTimeoutConnectionEx
|
||||||
func (cfg *connTimeoutTestConfig) directDial() (*TimeoutConnection, error) {
|
func (cfg *connTimeoutTestConfig) directDial() (*TimeoutConnection, error) {
|
||||||
ret, err := DialTimeoutConnectionEx("tcp", cfg.getEndpoint(), cfg.connectTimeout, cfg.timeout, cfg.readTimeout, cfg.writeTimeout)
|
ret, err := DialTimeoutConnectionEx("tcp", cfg.getEndpoint(), cfg.connectTimeout, cfg.timeout, cfg.readTimeout, cfg.writeTimeout, 0)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user