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