Signed-off-by: chavacava <salvadorcavadini+github@gmail.com>
This commit is contained in:
chavacava 2022-06-25 10:09:05 +00:00
parent cabdb13dad
commit 0887d9acf1

View File

@ -112,14 +112,14 @@ func TestDialTimeout(t *testing.T) {
for i, cfg := range testCfgs { for i, cfg := range testCfgs {
donec := make(chan error, 1) donec := make(chan error, 1)
go func(cfg Config) { go func(cfg Config, i int) {
// without timeout, dial continues forever on ipv4 black hole // without timeout, dial continues forever on ipv4 black hole
c, err := NewClient(t, cfg) c, err := NewClient(t, cfg)
if c != nil || err == nil { if c != nil || err == nil {
t.Errorf("#%d: new client should fail", i) t.Errorf("#%d: new client should fail", i)
} }
donec <- err donec <- err
}(cfg) }(cfg, i)
time.Sleep(10 * time.Millisecond) time.Sleep(10 * time.Millisecond)